Meaningless Drivel is fun!*
The moose likes Struts and the fly likes Need help on nested:text tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Need help on nested:text tag" Watch "Need help on nested:text tag" New topic

Need help on nested:text tag

konda Raju

Joined: Jan 20, 2000
Posts: 16
I have a collection of customerName Onjects.

I am using <nested:text tag to enter the customer name and a link to show the customer details. When a user clicks on the link I need to pass the customer name to the pop-up window. Can any body give some idea how can I pass the customer name to the pop-up window. Can we assign customized id to <nested:text tag.

Thanks in advance.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
In the logic:iterate tag, you can specify variable to contain the index of the iteration, and can then use that variable to set the id of the text field and to retrieve the value in a JavaScript expression. Example:

Note that for most Struts tags, the styleId attribute translates to an HTML id attribute. Also note that the indexId will be of type Integer, so you may need to translate it to a String in some cases.
[ April 28, 2008: Message edited by: Merrill Higginson ]

Consultant, Sima Solutions
konda Raju

Joined: Jan 20, 2000
Posts: 16
Merrill Thanks for your help it is working fine . I have one more question how to assign the our own value to style id attribute.

<nested:text size="11" maxlength="11" property="name" styleId='<bean:write property="id"/>' /> . I am trying this code it is not working. can you please give your suggestions on this

Thanks in advance
Consider Paul's rocket mass heater.
subject: Need help on nested:text tag
Similar Threads
Printing the contents of a JSP....
Sent collection through URL
Problem set session attribute
Problem with pop-up window
How to give the Target of pop-up window form as a frame in the main window