net.ontopia.topicmaps.webed.taglibs.form
Class ListTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by net.ontopia.topicmaps.webed.taglibs.form.ListTag
All Implemented Interfaces:
Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class ListTag
extends javax.servlet.jsp.tagext.TagSupport

INTERNAL: Custom tag that represents a list to select one or multiple values from (aka drop-down and scrolling menus) in an input form.

See Also:
Serialized Form

Nested Class Summary
 class ListTag.NameIdContainer
           
 
Field Summary
protected  String action_name
           
protected  String collection_name
           
protected  String id
           
protected  String klass
           
protected  String params
           
protected  String readonly
           
protected  String selected_name
           
protected static String TEMPLATE_FILE
          The default location where the velocity template can be retrieved from.
protected  String type
           
protected  String unspecified
           
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
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
ListTag()
           
 
Method Summary
 int doEndTag()
          Generate the required select tag.
 int doStartTag()
          Process the start tag, do nothing.
 void release()
          Release any acquired resources.
 void setAction(String action_name)
          Sets the name of the related action (required).
 void setClass(String klass)
          Sets the class attribute of the tag.
 void setCollection(String collection_name)
          Sets the variable name of the collection that contains the candidates for the object's value.
 void setId(String id)
          Sets the id of the tag.
 void setParams(String params)
          Sets the variable name(s) of the parameter(s) transmitted to the action separated by whitespaces (optional).
 void setReadonly(String readonly)
          Sets the the readonly flag of the tag.
 void setSelected(String selected_name)
          Sets the variable name of the currently set value.
 void setType(String type)
          Sets which type of menu should be used when presenting the selection list (allowed values are "dropdown" and "scrolling").
 void setUnspecified(String unspecified)
          Tells the tag what text to use for the '-unspecified-' item at the top of the list.
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEMPLATE_FILE

protected static final String TEMPLATE_FILE
The default location where the velocity template can be retrieved from.

See Also:
Constant Field Values

id

protected String id

readonly

protected String readonly

klass

protected String klass

action_name

protected String action_name

params

protected String params

collection_name

protected String collection_name

selected_name

protected String selected_name

type

protected String type

unspecified

protected String unspecified
Constructor Detail

ListTag

public ListTag()
Method Detail

doStartTag

public int doStartTag()
Process the start tag, do nothing.

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class javax.servlet.jsp.tagext.TagSupport
Returns:
EVAL_BODY_INCLUDE

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Generate the required select tag.

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class javax.servlet.jsp.tagext.TagSupport
Throws:
javax.servlet.jsp.JspException - if a JSP exception has occurred

release

public void release()
Release any acquired resources.

Specified by:
release in interface javax.servlet.jsp.tagext.Tag
Overrides:
release in class javax.servlet.jsp.tagext.TagSupport

setId

public void setId(String id)
Sets the id of the tag. This value will be used as the value of an ID attribute in the generated output.

Overrides:
setId in class javax.servlet.jsp.tagext.TagSupport

setReadonly

public void setReadonly(String readonly)
Sets the the readonly flag of the tag.


setClass

public void setClass(String klass)
Sets the class attribute of the tag. This value will be used as the value of the 'class' attribute in the generated output.


setAction

public void setAction(String action_name)
Sets the name of the related action (required).


setParams

public void setParams(String params)
Sets the variable name(s) of the parameter(s) transmitted to the action separated by whitespaces (optional).


setCollection

public void setCollection(String collection_name)
Sets the variable name of the collection that contains the candidates for the object's value.


setSelected

public void setSelected(String selected_name)
Sets the variable name of the currently set value.


setType

public void setType(String type)
Sets which type of menu should be used when presenting the selection list (allowed values are "dropdown" and "scrolling").

Note: If 'type' is not set, "dropdown" will be the default behaviour.


setUnspecified

public void setUnspecified(String unspecified)
Tells the tag what text to use for the '-unspecified-' item at the top of the list. If set to 'none' there will be no unspecified item. The default is '-unspecified-' as it was before.



Copyright © 2000-2012 Ontopia.