Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.webapp.admin
Class ActionsTag  view ActionsTag download ActionsTag.java

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended byjavax.servlet.jsp.tagext.BodyTagSupport
          extended byorg.apache.webapp.admin.ActionsTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag

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

JSP custom tag that renders an "instant actions" control. To the user, it appears as an HTML <select> element (i.e. a combo box), with the behavior of selecting a new page for the current frame or window when a different option is selected, without requiring a submit action. This tag has the following user-settable attributes:

FIXME - Internationalize the exception messages!

Version:
$Revision: 302726 $ $Date: 2004-02-27 09:59:07 -0500 (Fri, 27 Feb 2004) $

Field Summary
protected  java.util.ArrayList disableds
          The set of "disabled" flags for Actions displayed by this control.
protected static java.lang.String FUNCTION_TAG
          Attribute name used to indicate that we have generated the JavaScript function already on the current page.
protected  java.lang.String label
          HTML Label tag text.
protected  java.util.ArrayList labels
          The set of labels for the Actions displayed by this control.
protected  java.util.ArrayList selecteds
          The set of "selected" flags for Actions displayed by this control.
protected  int size
          The number of elements that will be displayed to the user.
protected  java.lang.String style
          The CSS style class to be applied to the entire rendered output of this "instant actions" object.
protected  java.util.ArrayList urls
          The set of URLs for the Actions displayed by this control.
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
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
ActionsTag()
           
 
Method Summary
(package private)  void addAction(java.lang.String label, boolean selected, boolean disabled, java.lang.String url)
          Add a new Action to the set that will be rendered by this control.
 int doEndTag()
          Render this instant actions control.
 int doStartTag()
          Default processing of the start tag returning EVAL_BODY_BUFFERED.
 java.lang.String getLabel()
           
 int getSize()
           
 java.lang.String getStyle()
           
 void release()
          Release all state information set by this tag.
 void setLabel(java.lang.String label)
           
 void setSize(int size)
           
 void setStyle(java.lang.String style)
           
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, 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, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
 

Field Detail

FUNCTION_TAG

protected static final java.lang.String FUNCTION_TAG
Attribute name used to indicate that we have generated the JavaScript function already on the current page. The value stored for this attribute is arbitrary - only its existence is relevant.

See Also:
Constant Field Values

labels

protected java.util.ArrayList labels
The set of labels for the Actions displayed by this control.


selecteds

protected java.util.ArrayList selecteds
The set of "selected" flags for Actions displayed by this control.


disableds

protected java.util.ArrayList disableds
The set of "disabled" flags for Actions displayed by this control.


urls

protected java.util.ArrayList urls
The set of URLs for the Actions displayed by this control.


size

protected int size
The number of elements that will be displayed to the user.


style

protected java.lang.String style
The CSS style class to be applied to the entire rendered output of this "instant actions" object.


label

protected java.lang.String label
HTML Label tag text.

Constructor Detail

ActionsTag

public ActionsTag()
Method Detail

getSize

public int getSize()

setSize

public void setSize(int size)

getStyle

public java.lang.String getStyle()

setStyle

public void setStyle(java.lang.String style)

getLabel

public java.lang.String getLabel()

setLabel

public void setLabel(java.lang.String label)

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Description copied from class: javax.servlet.jsp.tagext.BodyTagSupport
Default processing of the start tag returning EVAL_BODY_BUFFERED.


doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Render this instant actions control.


release

public void release()
Release all state information set by this tag.


addAction

void addAction(java.lang.String label,
               boolean selected,
               boolean disabled,
               java.lang.String url)
Add a new Action to the set that will be rendered by this control.