org.rhq.enterprise.gui.legacy.taglib
Class OptionMessageListTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.apache.struts.taglib.html.OptionsCollectionTag
org.rhq.enterprise.gui.legacy.taglib.OptionMessageListTag
- All Implemented Interfaces:
- Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
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:
- list - the name of the list containing the key suffixes
- baseKey - the base key in the resource bundle
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.
.
- See Also:
- Serialized Form
| Fields inherited from class org.apache.struts.taglib.html.OptionsCollectionTag |
filter, label, messages, name, property, value |
| Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
id, pageContext |
| Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
EVAL_BODY_AGAIN |
| Fields inherited from interface javax.servlet.jsp.tagext.Tag |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
| Methods inherited from class org.apache.struts.taglib.html.OptionsCollectionTag |
addOption, getFilter, getLabel, getName, getProperty, getStyle, getStyleClass, getValue, setFilter, setLabel, setName, setProperty, setStyle, setStyleClass, setValue |
| Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OptionMessageListTag
public OptionMessageListTag()
setBundle
public void setBundle(String bundle)
- Set the name of the resource bundle to use.
- Parameters:
list - the el expression for the list variable
setLocale
public void setLocale(String locale)
- Set the locale to use.
- Parameters:
list - the el expression for the list variable
setBaseKey
public void setBaseKey(String baseKey)
- Set the value of the base key in the application resource bundle.
- Parameters:
delimiter - the text to be printed between list items
doStartTag
public final int doStartTag()
throws javax.servlet.jsp.JspException
- Process the tag, generating and formatting the list.
- Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag- Overrides:
doStartTag in class org.apache.struts.taglib.html.OptionsCollectionTag
- Throws:
javax.servlet.jsp.JspException - if the scripting variable can not be found or if there is an error processing the tag
doEndTag
public int doEndTag()
throws javax.servlet.jsp.JspException
- Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag- Overrides:
doEndTag in class javax.servlet.jsp.tagext.TagSupport
- Throws:
javax.servlet.jsp.JspException
release
public void release()
- Specified by:
release in interface javax.servlet.jsp.tagext.Tag- Overrides:
release in class org.apache.struts.taglib.html.OptionsCollectionTag
getIterator
protected Iterator getIterator(Object collection)
throws javax.servlet.jsp.JspException
- Overrides:
getIterator in class org.apache.struts.taglib.html.OptionsCollectionTag
- Throws:
javax.servlet.jsp.JspException
Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.