You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Apache Wiki <wi...@apache.org> on 2006/02/03 19:04:59 UTC
[Struts Wiki] Update of "StrutsWidgets" by MichaelJouravlev
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Struts Wiki" for change notification.
The following page has been changed by MichaelJouravlev:
http://wiki.apache.org/struts/StrutsWidgets
New page:
=== HTML SELECT element ===
Use <html:select> tag to create HTML SELECT widget.
{{{
<html:select name="addressForm" property="currentStateCode" size="1">
<html:optionsCollection name="stateList" value="stateCode" label="stateName"/>
</html:select>
}}}
HTML SELECT can be rendered either as dropdown box or as a listbox. To create a dropdown box set ''size'' less than 2 or do not specify ''size'' at all. To create a listbox specify ''size'' larger than 2.
<html:select> tag specifies current value:
* ''name'' is the name of plain javabean or an ActionForm; optional
* ''property'' is the property in the javabean that holds current value
<html:optionsCollection> specifies the collection that contains selectable items:
* ''name'' is the collection name; it can be defined in any scope;
* ''value'' specifies the property containing item value; corresponds to property from <html:select> tag
* ''label'' specifies the property containing item label; this is what is shown to a user.
attachment:selectwidget.gif
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org