au.com.whitesquare.waf.taglib.html
Class SelectDataTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended byau.com.whitesquare.waf.taglib.html.SelectDataTag
All Implemented Interfaces:
IterationTag, JspTag, Serializable, Tag

public class SelectDataTag
extends TagSupport

A tag that has a type as a String or a SelectData.
the code looks up an object in the SelectDataCache, where as the SelectData is used directly.
Classes can be registered with the cache with a specific type.
There is a data attribute that is passed into the select data element that allows customisation of the data.

The default type is DYNAMIC, it accepts comma (,) seperated sets of data to show as the options.

Last Modified $Date: 2006/09/01 13:29:00 $

Version:
$Revision: 1.9 $
Author:
Steve Mactaggart
See Also:
DefaultSelectDataRenderer, Serialized Form

Field Summary
 
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
SelectDataTag()
           
 
Method Summary
 int doStartTag()
           
 String[] getSelectClasses()
           
 String[] getSelectValues()
          Returns an array of strings that contain the values to put into the option elements.
 String[] getTexts()
          Returns an array of strings that contain the text chunks to show to the user in the option elements.
 void init()
           
 void release()
           
 void setData(String data)
           
 void setType(Object type)
          The type of data to render, depending on the data supplied different logic will occur.
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, 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

SelectDataTag

public SelectDataTag()
Method Detail

doStartTag

public int doStartTag()
               throws JspException
Throws:
JspException
See Also:
Tag.doStartTag()

init

public void init()

release

public void release()
See Also:
Tag.release()

getTexts

public String[] getTexts()
Returns an array of strings that contain the text chunks to show to the user in the option elements.

Returns:
the text elements to render to the user.

getSelectValues

public String[] getSelectValues()
Returns an array of strings that contain the values to put into the option elements.

Returns:
the value elements to put in the option elements.

setType

public void setType(Object type)
The type of data to render, depending on the data supplied different logic will occur. The class needs to be either a String or a SelectData, if the data element is a String its key to a pre-configured set of elements to render, otherwise in this case an actual SelectData element that will contain the elements to render.

Parameters:
type - the key to a pre-configured set of elements to render.

setData

public void setData(String data)
Parameters:
data - The data to set.

getSelectClasses

public String[] getSelectClasses()
Returns:


Copyright © 2004 Whitesquare Software. All Rights Reserved.