This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Struts and the fly likes Dynamically displaying html:option values Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Dynamically displaying html:option values" Watch "Dynamically displaying html:option values" New topic

Dynamically displaying html:option values

Saathvik Reddy
Ranch Hand

Joined: Jun 03, 2005
Posts: 228
I have this code in my JSP:

<html:select property = "combo" onchange="dispLayer('layer1')">
<logic resent name = "qvalues" >
<logic:iterate id = "qvalue" name = "qvalues" >
<html ption value = "<%=qvalue%>" >
<bean:write name = "qvalue" property = "value" />
</html ption>
</logic resent>

all the contents of combo box are generated dynamically. I am not able to get html ption value. I need this value becoz depending on this value my javascript will show and hides a layer. Please help me out with this??

Srilakshmi Vara
Ranch Hand

Joined: Jul 21, 2004
Posts: 169
try to use html ptions if the list is a java structure

Ex: <html ptions name="formName" property="listCodes" labelName="formName" labelProperty="list Names"/>
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Dynamically displaying html:option values
jQuery in Action, 3rd edition