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

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
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 agree. Here's the link:
subject: Dynamically displaying html:option values
It's not a secret anymore!