You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Tran Fon <fo...@yahoo.fr> on 2002/11/27 15:15:13 UTC
RE: nested:iterator + multi-level-parameters passing
Thanks Sri,
I might not have read this page correctly but
I am not sure how yet... If so, can you give
me an example?
I am trying to pass in multi-level parameters
together. ( I change the subject too add level)
For example, country, city both need to be passed
over to the next page. For now, I am using jsp tag
as follow:
<a href="index.jsp?
country=<bean:write name="country"
property="name" />
& city=<bean:write name="city"
property="name"/>">
This is within my second level of the nested
tag. Any thoughts in how we can achieve this?
It will be nice if we can somehow define a
generic bean, with setField and getField property,
that can be automatically updated by the
html:link tag.
For example
<nested:link page="/index.jsp"
propertyBean=true> // this is the idea
And the the nested tag will automatically grab
all the property/value pairs within the tag to
generate the link
<a
href="/index.jsp?propertyA=valueA&propertyB=valueB..."
>
Any thoughts?
Thanks again,
Francis
--- Sri Sankaran <Sr...@sas.com> wrote:
> Please look at
>
http://jakarta.apache.org/struts/userGuide/struts-html.html#link.
> It explains how to use a Map to send multiple
> parameters. Since nested:link simply extends
> html:link this information is applicable in your
> case as well.
>
> Sri
>
> -----Original Message-----
> From: Tran Fon [mailto:fon_tran@yahoo.fr]
> Sent: Saturday, November 23, 2002 11:18 PM
> To: struts-user@jakarta.apache.org
> Cc: fon_tran@yahoo.fr
> Subject: nested:iterator + multi-parameters passing
>
>
> Hi guys,
>
> Has anyone tried to pass in multi-level parameters
> together, from nested:iterator, and pass them
> from nested:link? Any advices will be great.
>
> Here is an example of what I am looking for:
>
> <nested:root name="restDatabase">
> <nested:iterate id="country"
> property="countries">
> <nested:iterate id="city" property="cities" >
> <nested:link page="/index.jsp" ><bean:message
> name="city" property="name" /></nested:link>
> </nested:iterate>
> </nested:iterate>
> </nested:root>
>
> Inside nested:link, I would like to pass in
> not only the city name but also, the country name
> to the requested page. Maybe create a bean,
> that will hold the info and pass them over?
> I am wondering if we can do this already
> within Struts in a simple fashion.
>
> I tried paramId as well, but it can only hold
> on property, so not good...
>
> Thanks,
>
> Fon
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up
> now. http://mailplus.yahoo.com
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>