com.taggercat.tags
Class HTMLRadioButtonsTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by com.taggercat.tags.AbstractExpEvalTag
          extended by com.taggercat.tags.AbstractHTMLInputTag
              extended by com.taggercat.tags.HTMLRadioButtonsTag
All Implemented Interfaces:
com.taggercat.el.ELPropertyResolver, java.io.Serializable, javax.servlet.jsp.tagext.DynamicAttributes, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
Direct Known Subclasses:
HTMLCheckBoxesTag

public class HTMLRadioButtonsTag
extends AbstractHTMLInputTag

This tag creates a group of radio buttons that is filled from a Code Table, a List, Map, or an explicitly specified list of comma separated options. The List or Map object can be on any accessible scope.

List objects are used where the stored value is the same as the display value. Map objects are used when the stored value is a key to the display value ( a coded value list ).

If the listOptions attribute is set in conjunction with the listVar attribute, and the listVar instance does not exist, then the listVar named scope variable will be created from the listOptions attribute list.

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
HTMLRadioButtonsTag()
           
 
Method Summary
 int doEndTag()
          Resets the tags internal state.
 java.lang.String getPropertiesFile()
           
 java.lang.String getSelected()
          Gets the selected item.
 java.lang.String getSelectedStyleclass()
          Gets the CSS style class to be used to selected items in the option list.
 void setCodeTable(java.lang.String codeTable)
          Sets the codeTable name.
 void setListOptions(java.lang.String listOptions)
          Sets the listOptions attribute.
 void setListVar(java.lang.String listVar)
          Sets the listVar attribute .
 void setMapOptions(java.lang.String mapOptions)
          Sets the mapOptions attribute.
 void setPropertiesFile(java.lang.String propertiesFile)
           
 void setSelected(java.lang.String selected)
          Sets the selected attribute.
 void setSelectedStyleclass(java.lang.String selectedStyleclass)
          Sets the CSS style class to be used to selected items in the option list.
 void setStyleclass(java.lang.String styleclass)
          Sets the CSS style class to be used to items in the option list.
 void setValue(Model model, DataSource ds, TCEntity tcEntity)
          Sets the value field and attribute.
 
Methods inherited from class com.taggercat.tags.AbstractHTMLInputTag
addBaseAttributes, addBaseEnabledAttributes, doStartTag, getAccesskey, getAjaxValidationJSFunction, getCondition, getDisabled, getDsn, getField, getName, getOnblur, getOnchange, getOnclick, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnselect, getRowID, getStyle, getStyleclass, getStyleid, getTabindex, getTitle, getValue, isQbf, isShowDisabled, isXHTMLtag, setAccesskey, setAjaxValidationJSFunction, setCondition, setDisabled, setDsn, setDynamicAttribute, setField, setFormat, setId, setName, setNulls, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setPreserveHTML, setQbf, setReadonly, setRowID, setShowDisabled, setStyle, setStyleid, setTabindex, setTitle, setValue
 
Methods inherited from class com.taggercat.tags.AbstractExpEvalTag
getModel, resolveProperty, setScope, setVar
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLRadioButtonsTag

public HTMLRadioButtonsTag()
Method Detail

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Resets the tags internal state.

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class AbstractHTMLInputTag
Throws:
javax.servlet.jsp.JspException
Returns:
EVAL_PAGE

setValue

public void setValue(Model model,
                     DataSource ds,
                     TCEntity tcEntity)
              throws javax.servlet.jsp.JspException
Description copied from class: AbstractHTMLInputTag
Sets the value field and attribute.

Specified by:
setValue in class AbstractHTMLInputTag
Throws:
javax.servlet.jsp.JspException
Parameters:
model - the model
ds - the data source the field applies to
tcEntity - the TCEntity

getSelected

public java.lang.String getSelected()
Gets the selected item.

Returns:
the selected item

getSelectedStyleclass

public java.lang.String getSelectedStyleclass()
Gets the CSS style class to be used to selected items in the option list.

Returns:
the CSS style class to be used to selected items in the option list.

setListVar

public void setListVar(java.lang.String listVar)
Sets the listVar attribute .

Parameters:
listVar - the new listVar fieldValue

setSelected

public void setSelected(java.lang.String selected)
Sets the selected attribute. This is a value that is used to locate the current item in the option list. If a selected value is not specified, then the field value from the current tcEntity in the specified DSN is used.

Parameters:
selected - The new selected value

setListOptions

public void setListOptions(java.lang.String listOptions)
Sets the listOptions attribute. This is a comma-separated list of items to be used in the list. If you use this attribute without setting the listVar attribute, then the list is created with each tag instance. If you use this attribute, and set the listVar attribute, the list is created an saved to the listVar named scope attribute.

Parameters:
listOptions - The list of options

setMapOptions

public void setMapOptions(java.lang.String mapOptions)
Sets the mapOptions attribute. This attribute is a comma-separated string of name-value pairs of the form name1:value1,name2:value2,nameN:valueN and will be converted into a Map object. If you use this attribute without setting the listVar attribute, then the list is created with each tag instance. If you use this attribute, and set the listVar attribute, the list is created an saved to the listVar named scope attribute.

Parameters:
mapOptions - The map name-value pairs

getPropertiesFile

public java.lang.String getPropertiesFile()
Returns:
the propertiesFile

setPropertiesFile

public void setPropertiesFile(java.lang.String propertiesFile)
Parameters:
propertiesFile - the propertiesFile to set

setSelectedStyleclass

public void setSelectedStyleclass(java.lang.String selectedStyleclass)
Sets the CSS style class to be used to selected items in the option list.

Parameters:
selectedStyleclass - the CSS style class to be used to selected items in the option list.

setStyleclass

public void setStyleclass(java.lang.String styleclass)
Sets the CSS style class to be used to items in the option list.

Overrides:
setStyleclass in class AbstractHTMLInputTag
Parameters:
styleclass - the CSS style class to be used to items in the option list

setCodeTable

public void setCodeTable(java.lang.String codeTable)
Sets the codeTable name.

Parameters:
codeTable - the new codeTable value