GeeCON Prague 2014*
The moose likes Struts and the fly likes Struts logic and html select Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts logic and html select" Watch "Struts logic and html select" New topic
Author

Struts logic and html select

Nick Delauney
Ranch Hand

Joined: Sep 28, 2002
Posts: 43
I need to set the value of the option tag to the same value as "item". Could anyone assist me on how this should be done?

From:
<logic:iterate id="item" name="liquidationType" ><option><bean:write name="item"/></option>
</logic:iterate>

To:
<logic:iterate id="item" name="liquidationType" >
<option value="get the item value here"><bean:write name="item"/></option>
</logic:iterate>

Thanks in advance,


N.D:"Anything worth having, takes time to get"
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30596
    
154

Nick,


You may want to consider using html:form, html:select and htmlption in the future.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Nick Delauney
Ranch Hand

Joined: Sep 28, 2002
Posts: 43
Thanks
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Struts logic and html select