A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Joined: Mar 27, 2006
Apr 30, 2007 09:07:00
I need to retrieve the value selected in the html:select option. How should I code for Getter and Setter methods in the form bean for the html:select option.
My code in the jsp is as follows
<html:select name="county" property="selectedCounty"> <html :-o ption value="Alleghany" /> <html :-o ption value="Ashe" /> <html :-o ption value="Pasquotank" /> <html :-o ption value="Peraquimmons" /> <html :-o ption value="Wake" /> <html :-o ption value="Wayne" /> </html:select>
Joined: Feb 15, 2005
Apr 30, 2007 21:11:00
There's nothing special about a single-value select statement. You code a getter and setter for a property of type
, just as you would with any other ActionForm property. In this case, getSelectedCounty, and setSelectedCounty.
I agree. Here's the link:
bean:message tag in option tag. is there a solution?
for loop in select struts tag
how to set option to default ?
Help me regarding select value in html:select...
change font size in struts
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014