You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by David Collins <dj...@basequote.co.uk> on 2004/04/29 13:34:20 UTC

Multiple parameters

Hi,

I am trying to work out how to pass multiple parameters via Direct Link.

I have a good search through the example code, searched through Tapestry in
Action and search through the documentation - but I have yet to find anything
that says how to format multiple parameters (it may be there - I just haven't
managed to spot it!)

For example - the below snippet is from the component documentation of 
DirectLink:

<a jwcid="@DirectLink" listener="ognl:listeners.customerSelectAction"
parameters="ognl:customer.id"> 

and if I wanted to pass multiple parameters in 'parameters' e.g. customer.id 
AND customer.fullName - how would this be done?

1) parameters="ognl:customer.id,customer.fullName" OR
2) parameters="ognl:customer.id customerfullName" 

etc using ; or | and so on and so forth as the delimiter.

Any help would be appreciated.

Thanks,

Dave 'cantseethewoodforthetrees' C





---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Multiple parameters

Posted by "based@free.fr" <ba...@free.fr>.
parameters="ognl:{customer.id,customerfullName}"

David Collins wrote:
> Hi,
> 
> I am trying to work out how to pass multiple parameters via Direct Link.
> 
> I have a good search through the example code, searched through Tapestry in
> Action and search through the documentation - but I have yet to find anything
> that says how to format multiple parameters (it may be there - I just haven't
> managed to spot it!)
> 
> For example - the below snippet is from the component documentation of 
> DirectLink:
> 
> <a jwcid="@DirectLink" listener="ognl:listeners.customerSelectAction"
> parameters="ognl:customer.id"> 
> 
> and if I wanted to pass multiple parameters in 'parameters' e.g. customer.id 
> AND customer.fullName - how would this be done?
> 
> 1) parameters="ognl:customer.id,customer.fullName" OR
> 2) parameters="ognl:customer.id customerfullName" 
> 
> etc using ; or | and so on and so forth as the delimiter.
> 
> Any help would be appreciated.
> 
> Thanks,
> 
> Dave 'cantseethewoodforthetrees' C
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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: Multiple parameters

Posted by Marius Siegas <ma...@elinara.ktu.lt>.
try:
ognl:new java.lang.Object[] {customer.id, customer.fullName}
OR just:
ognl:customer

and read ognl documentation at http://www.ognl.org/ before using it :)
good luck!

David Collins wrote:
> Hi,
> 
> I am trying to work out how to pass multiple parameters via Direct Link.
> 
> I have a good search through the example code, searched through Tapestry in
> Action and search through the documentation - but I have yet to find anything
> that says how to format multiple parameters (it may be there - I just haven't
> managed to spot it!)
> 
> For example - the below snippet is from the component documentation of 
> DirectLink:
> 
> <a jwcid="@DirectLink" listener="ognl:listeners.customerSelectAction"
> parameters="ognl:customer.id"> 
> 
> and if I wanted to pass multiple parameters in 'parameters' e.g. customer.id 
> AND customer.fullName - how would this be done?
> 
> 1) parameters="ognl:customer.id,customer.fullName" OR
> 2) parameters="ognl:customer.id customerfullName" 
> 
> etc using ; or | and so on and so forth as the delimiter.
> 
> Any help would be appreciated.
> 
> Thanks,
> 
> Dave 'cantseethewoodforthetrees' C
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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: Multiple parameters

Posted by Eric Schneider <er...@centralparksoftware.com>.
David,

The parameters binding can be bound to an Object or an Object[].

In your example you can bind the parameter attribute to a method that
returns and Object[].

Something like...

public Object[] getMyParameters() {
    return new Object[] { getCustomer().getId(),
getCustomer().getFullname() };
}

<a jwcid="@DirectLink" listener="ognl:listeners.customerSelectAction"
            parameters="ognl:myParameters">

There's probably a way you can do this right in the .page file.  I'll let
the ognl experts chime in on that.

Hope that helps,
Eric.

----- Original Message ----- 
From: "David Collins" <dj...@basequote.co.uk>
To: <ta...@jakarta.apache.org>
Sent: Thursday, April 29, 2004 7:34 AM
Subject: Multiple parameters


> Hi,
>
> I am trying to work out how to pass multiple parameters via Direct Link.
>
> I have a good search through the example code, searched through Tapestry
in
> Action and search through the documentation - but I have yet to find
anything
> that says how to format multiple parameters (it may be there - I just
haven't
> managed to spot it!)
>
> For example - the below snippet is from the component documentation of
> DirectLink:
>
> <a jwcid="@DirectLink" listener="ognl:listeners.customerSelectAction"
> parameters="ognl:customer.id">
>
> and if I wanted to pass multiple parameters in 'parameters' e.g.
customer.id
> AND customer.fullName - how would this be done?
>
> 1) parameters="ognl:customer.id,customer.fullName" OR
> 2) parameters="ognl:customer.id customerfullName"
>
> etc using ; or | and so on and so forth as the delimiter.
>
> Any help would be appreciated.
>
> Thanks,
>
> Dave 'cantseethewoodforthetrees' C
>
>
>
>
>
> ---------------------------------------------------------------------
> 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