You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Andreas Bohnert <ab...@online.de> on 2003/11/20 18:30:22 UTC
how to pass parameters to bean::getter
hi,
can I pass parameters to my bean getter method during an @Insert
<Insert.html>?
lets say I have this:
<span jwcid="@Insert" value="ognl:language.method1"/>
this will look for an method1 getter inside my object language, right?
now I would like to pass a parameter to method1
like this
<span jwcid="@Insert" value="ognl:language.method1(987)"/>
to call
public String method1( int arg ) {
}
is that possible?
regards
andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: how to pass parameters to bean::getter
Posted by Harish Krishnaswamy <hk...@comcast.net>.
Yup, <span jwcid="@Insert" value="ognl:language.getMethod1(987)"/>
-Harish
Andreas Bohnert wrote:
> hi,
>
> can I pass parameters to my bean getter method during an @Insert
> <Insert.html>?
>
> lets say I have this:
> <span jwcid="@Insert" value="ognl:language.method1"/>
>
> this will look for an method1 getter inside my object language, right?
> now I would like to pass a parameter to method1
> like this
>
> <span jwcid="@Insert" value="ognl:language.method1(987)"/>
> to call
>
> public String method1( int arg ) {
>
> }
>
> is that possible?
>
> regards
> andreas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Library 'contrib' not found in application namespace.
Posted by Geoff Longman <gl...@intelligentworks.com>.
Let's see your web.xml file and what is the name of your .application file?
Could be that Tapestry is not picking up your .application file and is using
a standin Application object in its place. If this is the case then contrib
is never picked up.
Geoff
----- Original Message -----
From: "Timur Evdokimov" <ti...@jacum.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Friday, November 21, 2003 8:00 AM
Subject: Library 'contrib' not found in application namespace.
> hello everyone,
>
>
> I'm trying to get through nasty problem
>
> this is line from my .application file
>
> <library id="contrib"
> specification-path="/org/apache/tapestry/contrib/Contrib.library"/>
>
> this is line from my Border.html template
>
> <span jwcid="@contrib:InspectorButton"/>
>
> tapestry-contrib.jar is in classpath (it's Jboss, so tapestry.jar and
> tapestry-contrib.jar are in server/default/lib)
>
> when I try to load any page, I get the following exception:
>
> 2003-11-21 13:57:40,273 7319875 INFO [AbstractEngine] (1069413844304:)
> Uncaught exception
> org.apache.tapestry.ApplicationRuntimeException: Library 'contrib' not
found
> in application namespace.
> at
> org.apache.tapestry.engine.Namespace.createNamespace(Namespace.java:335)
> at
> org.apache.tapestry.engine.Namespace.getChildNamespace(Namespace.java:191)
> at
>
org.apache.tapestry.resolver.ComponentSpecificationResolver.resolve(Componen
> tSpecificationResolver.java:194)
> at
>
org.apache.tapestry.engine.DefaultTemplateSource$ParserDelegate.getAllowBody
> (DefaultTemplateSource.java:180)
> at
>
org.apache.tapestry.parse.TemplateParser.processComponentStart(TemplateParse
> r.java:1108)
> at
> org.apache.tapestry.parse.TemplateParser.startTag(TemplateParser.java:986)
> at
> org.apache.tapestry.parse.TemplateParser.parse(TemplateParser.java:629)
> at
> org.apache.tapestry.parse.TemplateParser.parse(TemplateParser.java:460)
> at
>
org.apache.tapestry.engine.DefaultTemplateSource.constructTemplateInstance(D
> efaultTemplateSource.java:483)
> at
>
org.apache.tapestry.engine.DefaultTemplateSource.parseTemplate(DefaultTempla
> teSource.java:457)
> at
>
org.apache.tapestry.engine.DefaultTemplateSource.getOrParseTemplate(DefaultT
> emplateSource.java:430)
> at
>
org.apache.tapestry.engine.DefaultTemplateSource.findStandardTemplate(Defaul
> tTemplateSource.java:407)
> at
>
org.apache.tapestry.engine.DefaultTemplateSource.findTemplate(DefaultTemplat
> eSource.java:310)
> at
>
org.apache.tapestry.engine.DefaultTemplateSource.getTemplate(DefaultTemplate
> Source.java:222)
> at
> org.apache.tapestry.BaseComponent.readTemplate(BaseComponent.java:136)
>
> am I doing something wrong?
>
> regards,
> Timur
>
> ----- Original Message -----
> From: "Andreas Bohnert" <ab...@online.de>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Friday, November 21, 2003 11:03 AM
> Subject: Re: how to pass parameters to bean::getter
>
>
> > thanks guys,
> > I still had to upgrade to a newer version of ognl.jar, but then it
works:)
> >
> > andreas
> >
> >
> >
> > Paul Ferraro wrote:
> >
> > > Yes, although not as a getter. In your first example, OGNL resolves
> > > the expression to: getLanguage().getMethod1()
> > > In your second example, OGNL resolves the expression to:
> > > getLanguage().method1(int).
> > > Refer to the OGNL user guide for a more detail explanation:
> > > http://www.ognl.org/2.6.3/Documentation/html/UsersGuide.html
> > >
> > > If, however, you are using an indexed property pattern (see the
> > > section on "OGNL Object Indexed Properties"):
> > > e.g.
> > > public String getMethod1(int index);
> > > public void setMethod1(int index, String value);
> > >
> > > then you can use OGNL's indexing notation:
> > > <span jwcid="@Insert" value="ognl:language:method1[987]"/>
> > >
> > > Hope this helps,
> > >
> > > Paul Ferraro
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Library 'contrib' not found in application namespace.
Posted by Timur Evdokimov <ti...@jacum.com>.
hello everyone,
I'm trying to get through nasty problem
this is line from my .application file
<library id="contrib"
specification-path="/org/apache/tapestry/contrib/Contrib.library"/>
this is line from my Border.html template
<span jwcid="@contrib:InspectorButton"/>
tapestry-contrib.jar is in classpath (it's Jboss, so tapestry.jar and
tapestry-contrib.jar are in server/default/lib)
when I try to load any page, I get the following exception:
2003-11-21 13:57:40,273 7319875 INFO [AbstractEngine] (1069413844304:)
Uncaught exception
org.apache.tapestry.ApplicationRuntimeException: Library 'contrib' not found
in application namespace.
at
org.apache.tapestry.engine.Namespace.createNamespace(Namespace.java:335)
at
org.apache.tapestry.engine.Namespace.getChildNamespace(Namespace.java:191)
at
org.apache.tapestry.resolver.ComponentSpecificationResolver.resolve(Componen
tSpecificationResolver.java:194)
at
org.apache.tapestry.engine.DefaultTemplateSource$ParserDelegate.getAllowBody
(DefaultTemplateSource.java:180)
at
org.apache.tapestry.parse.TemplateParser.processComponentStart(TemplateParse
r.java:1108)
at
org.apache.tapestry.parse.TemplateParser.startTag(TemplateParser.java:986)
at
org.apache.tapestry.parse.TemplateParser.parse(TemplateParser.java:629)
at
org.apache.tapestry.parse.TemplateParser.parse(TemplateParser.java:460)
at
org.apache.tapestry.engine.DefaultTemplateSource.constructTemplateInstance(D
efaultTemplateSource.java:483)
at
org.apache.tapestry.engine.DefaultTemplateSource.parseTemplate(DefaultTempla
teSource.java:457)
at
org.apache.tapestry.engine.DefaultTemplateSource.getOrParseTemplate(DefaultT
emplateSource.java:430)
at
org.apache.tapestry.engine.DefaultTemplateSource.findStandardTemplate(Defaul
tTemplateSource.java:407)
at
org.apache.tapestry.engine.DefaultTemplateSource.findTemplate(DefaultTemplat
eSource.java:310)
at
org.apache.tapestry.engine.DefaultTemplateSource.getTemplate(DefaultTemplate
Source.java:222)
at
org.apache.tapestry.BaseComponent.readTemplate(BaseComponent.java:136)
am I doing something wrong?
regards,
Timur
----- Original Message -----
From: "Andreas Bohnert" <ab...@online.de>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Friday, November 21, 2003 11:03 AM
Subject: Re: how to pass parameters to bean::getter
> thanks guys,
> I still had to upgrade to a newer version of ognl.jar, but then it works:)
>
> andreas
>
>
>
> Paul Ferraro wrote:
>
> > Yes, although not as a getter. In your first example, OGNL resolves
> > the expression to: getLanguage().getMethod1()
> > In your second example, OGNL resolves the expression to:
> > getLanguage().method1(int).
> > Refer to the OGNL user guide for a more detail explanation:
> > http://www.ognl.org/2.6.3/Documentation/html/UsersGuide.html
> >
> > If, however, you are using an indexed property pattern (see the
> > section on "OGNL Object Indexed Properties"):
> > e.g.
> > public String getMethod1(int index);
> > public void setMethod1(int index, String value);
> >
> > then you can use OGNL's indexing notation:
> > <span jwcid="@Insert" value="ognl:language:method1[987]"/>
> >
> > Hope this helps,
> >
> > Paul Ferraro
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: how to pass parameters to bean::getter
Posted by Andreas Bohnert <ab...@online.de>.
thanks guys,
I still had to upgrade to a newer version of ognl.jar, but then it works:)
andreas
Paul Ferraro wrote:
> Yes, although not as a getter. In your first example, OGNL resolves
> the expression to: getLanguage().getMethod1()
> In your second example, OGNL resolves the expression to:
> getLanguage().method1(int).
> Refer to the OGNL user guide for a more detail explanation:
> http://www.ognl.org/2.6.3/Documentation/html/UsersGuide.html
>
> If, however, you are using an indexed property pattern (see the
> section on "OGNL Object Indexed Properties"):
> e.g.
> public String getMethod1(int index);
> public void setMethod1(int index, String value);
>
> then you can use OGNL's indexing notation:
> <span jwcid="@Insert" value="ognl:language:method1[987]"/>
>
> Hope this helps,
>
> Paul Ferraro
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: how to pass parameters to bean::getter
Posted by Paul Ferraro <pm...@columbia.edu>.
Yes, although not as a getter. In your first example, OGNL resolves the
expression to: getLanguage().getMethod1()
In your second example, OGNL resolves the expression to:
getLanguage().method1(int).
Refer to the OGNL user guide for a more detail explanation:
http://www.ognl.org/2.6.3/Documentation/html/UsersGuide.html
If, however, you are using an indexed property pattern (see the section
on "OGNL Object Indexed Properties"):
e.g.
public String getMethod1(int index);
public void setMethod1(int index, String value);
then you can use OGNL's indexing notation:
<span jwcid="@Insert" value="ognl:language:method1[987]"/>
Hope this helps,
Paul Ferraro
Andreas Bohnert wrote:
> hi,
>
> can I pass parameters to my bean getter method during an @Insert
> <Insert.html>?
>
> lets say I have this:
> <span jwcid="@Insert" value="ognl:language.method1"/>
>
> this will look for an method1 getter inside my object language, right?
> now I would like to pass a parameter to method1
> like this
>
> <span jwcid="@Insert" value="ognl:language.method1(987)"/>
> to call
>
> public String method1( int arg ) {
>
> }
>
> is that possible?
>
> regards
> andreas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org