You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Heping Zhang <ph...@gmail.com> on 2007/05/23 09:54:54 UTC
how to use more than one parameters in DirectLink
hi, all, I know how to use binding parameters in DirectLink if there is only
one parameter. However now I want two parameters and it keeps say "No
listener method named 'gotoPage' suitable for no listener parameters found
". I doubt I use it incorrectly. I write it this way:
<component id="gotoPage" type="DirectLink">
<binding name="listener" value="listener:gotoPage"/>
<binding name="parameters" value="profession,address"/>
</component>
public IPage gotoPage(Object[] parameters) {
//...
}
Is it wrong? how can I use it? Thank you.
Re: how to use more than one parameters in DirectLink
Posted by Heping Zhang <ph...@gmail.com>.
Thank you!
Re: how to use more than one parameters in DirectLink
Posted by Andrea Chiumenti <ki...@gmail.com>.
nearly!
<component id="gotoPage" type="DirectLink">
<binding name="listener" value="listener:gotoPage"/>
<binding name="parameters" value="ognl:{profession,address}"/>
</component>
ciao,
kiuma
On 5/23/07, Heping Zhang <ph...@gmail.com> wrote:
> hi, all, I know how to use binding parameters in DirectLink if there is only
> one parameter. However now I want two parameters and it keeps say "No
> listener method named 'gotoPage' suitable for no listener parameters found
> ". I doubt I use it incorrectly. I write it this way:
> <component id="gotoPage" type="DirectLink">
> <binding name="listener" value="listener:gotoPage"/>
> <binding name="parameters" value="profession,address"/>
> </component>
> public IPage gotoPage(Object[] parameters) {
> //...
> }
> Is it wrong? how can I use it? Thank you.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: how to use more than one parameters in DirectLink
Posted by Heping Zhang <ph...@gmail.com>.
Thank you, I've tried and it works. It is more conveniency. Thank you all!
Re: how to use more than one parameters in DirectLink
Posted by Stephane Decleire <sd...@cariboo-networks.com>.
You should use something like this :
<binding name="parameters" value="ognl:{profession,address}"/>
and since tap4, your listener could have a signature like this (with the
wright types for your parameters) :
public IPage gotoPage(Profession profession, Address address)
Stephane
Heping Zhang a écrit :
> hi, all, I know how to use binding parameters in DirectLink if there
> is only
> one parameter. However now I want two parameters and it keeps say "No
> listener method named 'gotoPage' suitable for no listener parameters
> found
> ". I doubt I use it incorrectly. I write it this way:
> <component id="gotoPage" type="DirectLink">
> <binding name="listener" value="listener:gotoPage"/>
> <binding name="parameters" value="profession,address"/>
> </component>
> public IPage gotoPage(Object[] parameters) {
> //...
> }
> Is it wrong? how can I use it? Thank you.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org