com.taggercat.tags
Class QBFBooleanOptionListTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by com.taggercat.tags.QBFBooleanOptionListTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

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

This tag creates a QBF Option list for the specified dsn.field.

The option list defaults to Yes/No and the fields current value is set as the selected value.

You can optionally specify your own values for the display and stored values.

 

example:
<select name="customers.qbf.city" > <tc:qbfBooleanOptionList selected='customers.qbf.city' /> </select>

See Also:
Serialized Form
 

Field Summary
 
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
QBFBooleanOptionListTag()
          Create a new tag instance.
 
Method Summary
 int doEndTag()
           
 int doStartTag()
          Creates the QBF boolean option list, and sends it to the page.
 void setCodeValues(java.lang.String codes)
          Sets the possible code ( stored ) values in the option list.
 void setDisplayValues(java.lang.String values)
          Sets the possible choices in the option list.
 void setSelected(java.lang.String selected)
          Sets the selected attribute.
 void setStates(java.lang.String states)
          Sets the possible "states" in the option list.
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QBFBooleanOptionListTag

public QBFBooleanOptionListTag()
Create a new tag instance.

Method Detail

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

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Creates the QBF boolean option list, and sends it to the page.

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

setCodeValues

public void setCodeValues(java.lang.String codes)
Sets the possible code ( stored ) values in the option list. Specifically, these are the values used to set the property's value. There must be at least two of "true,false" in a comma separated list, and in the same order as the "Display" and "code" values.

Parameters:
codes - the supported code values

setDisplayValues

public void setDisplayValues(java.lang.String values)
Sets the possible choices in the option list. They must be in a comma separated list. If listing only true/false values, they must be listed in true/false order. If listing more than two value, or you are also list code & state values, they must all be listed in the same order.

Parameters:
values - The supported display values

setSelected

public void setSelected(java.lang.String selected)
Sets the selected attribute. If a matching code value is found in the CodeTable, then that item is selected in the option list. If a selected value is not specified, and DSN & Field are, then the current fields value will be selected.

Parameters:
selected - The new selected value

setStates

public void setStates(java.lang.String states)
Sets the possible "states" in the option list. There must be at least two of "true, false, and null" in a comma separated list, and in the same order as the "display" and "code" values.

Parameters:
states - the supported states