Hyperic HQ Plugin API v. 4.4.0.2

org.hyperic.hq.ui.taglib
Class OptionMessageListTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by org.apache.struts.taglib.html.OptionsCollectionTag
          extended by org.hyperic.hq.ui.taglib.OptionMessageListTag
All Implemented Interfaces:
java.io.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:

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

Field Summary
 
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
 
Constructor Summary
OptionMessageListTag()
           
 
Method Summary
 int doEndTag()
           
 int doStartTag()
          Process the tag, generating and formatting the list.
protected  java.util.Iterator getIterator(java.lang.Object collection)
           
 void release()
           
 void setBaseKey(java.lang.String baseKey)
          Set the value of the base key in the application resource bundle.
 void setBundle(java.lang.String bundle)
          Set the name of the resource bundle to use.
 void setLocale(java.lang.String locale)
          Set the locale to use.
 
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
 

Constructor Detail

OptionMessageListTag

public OptionMessageListTag()
Method Detail

setBundle

public void setBundle(java.lang.String bundle)
Set the name of the resource bundle to use.

Parameters:
list - the el expression for the list variable

setLocale

public void setLocale(java.lang.String locale)
Set the locale to use.

Parameters:
list - the el expression for the list variable

setBaseKey

public void setBaseKey(java.lang.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 java.util.Iterator getIterator(java.lang.Object collection)
                                  throws javax.servlet.jsp.JspException
Overrides:
getIterator in class org.apache.struts.taglib.html.OptionsCollectionTag
Throws:
javax.servlet.jsp.JspException

Hyperic HQ Plugin API v. 4.4.0.2

Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.