You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Puneet Lakhina <pu...@gmail.com> on 2006/07/28 10:02:47 UTC

Dynamic Bean

Hi,
I have an application which queries the database to retrieve results of
search criteria, which is obtained via a form.
Now in the action of the form which obtains the query i build a collection
of beans which holds the results and then in the results page i use the
iterate tag to display some of the fields of the resulting collection.

What i want to do is to have a link to one of the fields in each result that
subsequently displays all the fields of of that particular result in a
separate page.

What i have though of doing is to pass that instance of bean as an attribute
in the request and then use it in that page. But dont know how to go about
doin this. I mean how do i set an attribute when a link is clicked??

its some thing like this

Id               Name
1                Puneet
2                OtherName

so when some one clicks on the id it takes to a different page which
displays all details of the person with that id

like

Name: Puneet
Address: somecity,somecountry
Otherdetaisl:


I hope somebody understnads me.
-- 
Puneet

Re: Dynamic Bean

Posted by Antonio Petrelli <br...@tariffenet.it>.
Puneet Lakhina ha scritto:
> its some thing like this
>
> Id               Name
> 1                Puneet
> 2                OtherName
>
> so when some one clicks on the id it takes to a different page which
> displays all details of the person with that id

You can use <html:link> tag, using paramId, paramName, paramProperty and 
paramScope (I suppose that the id is enough to determine the needed result).
http://struts.apache.org/1.x/struts-taglib/tlddoc/html/link.html

HTH
Antonio


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