A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
OCA Java SE 8 Programmer I Study Guide 1Z0-808
this week in the
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
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.
It is sorta covered in the
JavaRanch Style Guide
change font size in struts
Help me regarding select value in html:select...
how to set option to default ?
for loop in select struts tag
bean:message tag in option tag. is there a solution?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015