org.apache.struts.taglib.html
Class OptionTag

java.lang.Object
  |
  +--javax.servlet.jsp.tagext.TagSupport
        |
        +--javax.servlet.jsp.tagext.BodyTagSupport
              |
              +--org.apache.struts.taglib.html.OptionTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class OptionTag
extends javax.servlet.jsp.tagext.BodyTagSupport

Tag for select options. The body of this tag is presented to the user in the option list, while the value attribute is the value returned to the server if this option is selected.

Version:
$Revision: 1.1 $ $Date$
Author:
Craig R. McClanahan
See Also:
Serialized Form

Field Summary
protected  java.lang.String bundle
          The name of the servlet context attribute containing our message resources.
protected static java.util.Locale defaultLocale
          The default locale for our server.
protected  boolean disabled
          Is this option disabled?
protected  java.lang.String key
          The key used to look up the text displayed to the user for this option, if any.
protected  java.lang.String locale
          The name of the attribute containing the Locale to be used for looking up internationalized messages.
protected static MessageResources messages
          The message resources for this package.
protected  java.lang.String text
          The message text to be displayed to the user for this tag (if any)
protected  java.lang.String value
          The server value for this option, also used to match against the current property value to determine whether this option should be marked as selected.
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext, parent, values
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
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
OptionTag()
           
 
Method Summary
 int doAfterBody()
          Process the body text of this tag (if any).
 int doEndTag()
          Process the end of this tag.
 int doStartTag()
          Process the start of this tag.
 java.lang.String getBundle()
           
 boolean getDisabled()
           
 java.lang.String getKey()
           
 java.lang.String getLocale()
           
 java.lang.String getValue()
           
 void release()
          Release any acquired resources.
 void setBundle(java.lang.String bundle)
           
 void setDisabled(boolean disabled)
           
 void setKey(java.lang.String key)
           
 void setLocale(java.lang.String locale)
           
 void setValue(java.lang.String value)
           
protected  java.lang.String text()
          Return the text to be displayed to the user for this option (if any).
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doInitBody, getBodyContent, getPreviousOut, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
 

Field Detail

defaultLocale

protected static final java.util.Locale defaultLocale
The default locale for our server.

messages

protected static MessageResources messages
The message resources for this package.

text

protected java.lang.String text
The message text to be displayed to the user for this tag (if any)

bundle

protected java.lang.String bundle
The name of the servlet context attribute containing our message resources.

disabled

protected boolean disabled
Is this option disabled?

key

protected java.lang.String key
The key used to look up the text displayed to the user for this option, if any.

locale

protected java.lang.String locale
The name of the attribute containing the Locale to be used for looking up internationalized messages.

value

protected java.lang.String value
The server value for this option, also used to match against the current property value to determine whether this option should be marked as selected.
Constructor Detail

OptionTag

public OptionTag()
Method Detail

getBundle

public java.lang.String getBundle()

setBundle

public void setBundle(java.lang.String bundle)

getDisabled

public boolean getDisabled()

setDisabled

public void setDisabled(boolean disabled)

getKey

public java.lang.String getKey()

setKey

public void setKey(java.lang.String key)

getLocale

public java.lang.String getLocale()

setLocale

public void setLocale(java.lang.String locale)

getValue

public java.lang.String getValue()

setValue

public void setValue(java.lang.String value)

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Process the start of this tag.
Overrides:
doStartTag in class javax.servlet.jsp.tagext.BodyTagSupport
Throws:
javax.servlet.jsp.JspException - if a JSP exception has occurred

doAfterBody

public int doAfterBody()
                throws javax.servlet.jsp.JspException
Process the body text of this tag (if any).
Overrides:
doAfterBody in class javax.servlet.jsp.tagext.BodyTagSupport
Throws:
javax.servlet.jsp.JspException - if a JSP exception has occurred

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Process the end of this tag.
Overrides:
doEndTag in class javax.servlet.jsp.tagext.BodyTagSupport
Throws:
javax.servlet.jsp.JspException - if a JSP exception has occurred

release

public void release()
Release any acquired resources.
Overrides:
release in class javax.servlet.jsp.tagext.BodyTagSupport

text

protected java.lang.String text()
                         throws javax.servlet.jsp.JspException
Return the text to be displayed to the user for this option (if any).
Throws:
javax.servlet.jsp.JspException - if an error occurs


Copyright © 2000-2001 - Apache Software Foundation