Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts logic and html select

 
Nick Delauney
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34410
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nick,


You may want to consider using html:form, html:select and htmlption in the future.
 
Nick Delauney
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic