File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts logic and html select" Watch "Struts logic and html select" New topic

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?

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

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

Thanks in advance,

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

Joined: May 26, 2003
Posts: 30050


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
I agree. Here's the link:
subject: Struts logic and html select
Similar Threads
logic:match , logic:notEqual not working
How to write retrieved data into javascript Array?
In List Highlighting previous selected values
Iterate Hashmap through struts
how to use logic:iterator tag inorder to iterate ArrayList consisting of HashMap