how to use more than one parameters in DirectLink

2007-05-23 Thread Heping Zhang

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

2007-05-23 Thread Andrea Chiumenti

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 [EMAIL PROTECTED] 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how to use more than one parameters in DirectLink

2007-05-23 Thread Heping Zhang

Thank you!


Re: how to use more than one parameters in DirectLink

2007-05-23 Thread Stephane Decleire

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how to use more than one parameters in DirectLink

2007-05-23 Thread Heping Zhang

Thank you, I've tried and it works. It is more conveniency. Thank you all!