wood burning stoves*
The moose likes Struts and the fly likes multiple objects in a list -problem with html:hidden Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "multiple objects in a list -problem with html:hidden" Watch "multiple objects in a list -problem with html:hidden" New topic
Author

multiple objects in a list -problem with html:hidden

Aparna Sharma
Ranch Hand

Joined: Mar 12, 2003
Posts: 30
How does one handle multiple objects of the same kind?
for eg, I have a list of employees in a page. clicking on one of them takes me to a detail page. I want to set some hidden parameters so that I can populate the next page with the selected employee object's details.

but i can say <html:hidden property="ssn"> inside the logic:iterate tag only.
I am getting the html:hidden properties as null in the action class.
Is it bcoz there is not a way to distinguish b/w the different objects?

Has anyone come across this problem? Please let me know your comments/suggs.

Thanks,
Aparna


Aparna Sharma<br />SCJP 1.4 (yippeeee!)
David Hibbs
Ranch Hand

Joined: Dec 19, 2002
Posts: 374
Option A is to look at the name attribute of the html:hidden tag.

Option B is to set up some JavaScript on the link, generated within the iteration.


"Write beautiful code; then profile that beautiful code and make little bits of it uglier but faster." --The JavaPerformanceTuning.com team, Newsletter 039.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: multiple objects in a list -problem with html:hidden