aspose file tools
The moose likes Struts and the fly likes html:select and option Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "html:select and option" Watch "html:select and option" New topic
Author

html:select and option

geofrey pony
Greenhorn

Joined: Jul 18, 2006
Posts: 15
I want to combine html:select with normal <option> tag and not html ption or html ptions or html ptionsCollection etc.

e.g.
<html:select name="animalForm" property="animal" size="1" styleClass="dataInputField" styleId="5" onchange="animalChanged(this.value)">
<option value="lion">lion</option>
<option value="tiger">tiger</option>
<option value="ant">ant</option>
</select>

when selected value in the drop down is changed, the correct value is retreived at the server side however when the page reloads the value selected is the first value in the drop down and not the value that was selected by the user.

Is it that html:select must be combined with html ption or html ptions or html ptionsCollection and cannot be combined with <option> tag for this feature??

Thanks in advance
geofrey pony
Greenhorn

Joined: Jul 18, 2006
Posts: 15
Thanks everyone. My problem is sorted if I use the simple version of
htmlption
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: html:select and option
 
Similar Threads
how to fill a combobox with values from objects in an ArrayList...
Regarding html:select kind of URGENT
Can struts repopulate collection from html:select upon submit?
Help me regarding select value in html:select...
drop down list validation