public class OptionMessageListTag
extends org.apache.struts.taglib.html.OptionsCollectionTag
A JSP tag that will take a java.util.List and render a set of HTML <option ...> markup using
the resource bundle.
The attributes are:
This tag will look up resources using: <basekey>.<listelement>.toString(). Thus, if your
base key was foo.bar.baz and your list contained [1, 2, 3], the resources rendered would be
foo.bar.baz.1, foo.bar.baz.2 and foo.bar.baz.3.
| Constructor and Description |
|---|
OptionMessageListTag() |
| Modifier and Type | Method and Description |
|---|---|
int |
doEndTag() |
int |
doStartTag()
Process the tag, generating and formatting the list.
|
protected Iterator |
getIterator(Object collection) |
void |
release() |
void |
setBaseKey(String baseKey)
Set the value of the base key in the application resource bundle.
|
void |
setBundle(String bundle)
Set the name of the resource bundle to use.
|
void |
setLocale(String locale)
Set the locale to use.
|
addOption, getFilter, getLabel, getName, getProperty, getStyle, getStyleClass, getValue, setFilter, setLabel, setName, setProperty, setStyle, setStyleClass, setValuepublic void setBundle(String bundle)
list - the el expression for the list variablepublic void setLocale(String locale)
list - the el expression for the list variablepublic void setBaseKey(String baseKey)
delimiter - the text to be printed between list itemspublic final int doStartTag()
throws javax.servlet.jsp.JspException
doStartTag in interface javax.servlet.jsp.tagext.TagdoStartTag in class org.apache.struts.taglib.html.OptionsCollectionTagjavax.servlet.jsp.JspException - if the scripting variable can not be found or if there is an error processing the tagpublic int doEndTag()
throws javax.servlet.jsp.JspException
doEndTag in interface javax.servlet.jsp.tagext.TagdoEndTag in class javax.servlet.jsp.tagext.TagSupportjavax.servlet.jsp.JspExceptionpublic void release()
release in interface javax.servlet.jsp.tagext.Tagrelease in class org.apache.struts.taglib.html.OptionsCollectionTagCopyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.