net.sf.springlayout.web.layout.taglib
Class AbstractFieldGroupTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by org.springframework.web.servlet.tags.RequestContextAwareTag
          extended by org.springframework.web.servlet.tags.HtmlEscapingAwareTag
              extended by net.sf.springlayout.web.layout.taglib.LayoutBindTag
                  extended by net.sf.springlayout.web.layout.taglib.AbstractFieldTag
                      extended by net.sf.springlayout.web.layout.taglib.AbstractHtmlAttributesTag
                          extended by net.sf.springlayout.web.layout.taglib.AbstractHtmlInputAttributesTag
                              extended by net.sf.springlayout.web.layout.taglib.AbstractFieldGroupTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.Tag, javax.servlet.jsp.tagext.TryCatchFinally
Direct Known Subclasses:
CheckBoxTag, RadioButtonsTag

public abstract class AbstractFieldGroupTag
extends AbstractHtmlInputAttributesTag

See Also:
Serialized Form

Field Summary
protected  java.lang.String prefix
           
protected  java.lang.String suffix
           
 
Fields inherited from class net.sf.springlayout.web.layout.taglib.AbstractHtmlInputAttributesTag
ACCESSKEY_ATTRIBUTE, disabled, DISABLED_ATTRIBUTE, ONBLUR_ATTRIBUTE, ONFOCUS_ATTRIBUTE
 
Fields inherited from class net.sf.springlayout.web.layout.taglib.AbstractHtmlAttributesTag
CLASS_ATTRIBUTE, cssErrorClass, DIR_ATTRIBUTE, LANG_ATTRIBUTE, mode, ONCHANGE_ATTRIBUTE, ONCLICK_ATTRIBUTE, ONDBLCLICK_ATTRIBUTE, ONKEYDOWN_ATTRIBUTE, ONKEYPRESS_ATTRIBUTE, ONKEYUP_ATTRIBUTE, ONMOUSEDOWN_ATTRIBUTE, ONMOUSEMOVE_ATTRIBUTE, ONMOUSEOUT_ATTRIBUTE, ONMOUSEOVER_ATTRIBUTE, ONMOUSEUP_ATTRIBUTE, prependMap, STYLE_ATTRIBUTE, TABINDEX_ATTRIBUTE, TITLE_ATTRIBUTE
 
Fields inherited from class net.sf.springlayout.web.layout.taglib.AbstractFieldTag
config, emptyDisplayString, fieldInstance
 
Fields inherited from class net.sf.springlayout.web.layout.taglib.LayoutBindTag
ignoreNestedPath, path, pathIfNestedNull, previousStatus, status
 
Fields inherited from class org.springframework.web.servlet.tags.RequestContextAwareTag
logger, REQUEST_CONTEXT_PAGE_ATTRIBUTE
 
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
AbstractFieldGroupTag()
           
 
Method Summary
protected  void appendEditModeOutput(java.lang.StringBuffer output)
          Builds the ouput which the tag must supply in Edit mode.
protected  void appendReadOnlyOutput(java.lang.StringBuffer output)
          Builds the ouput which the tag must supply in ReadOnly mode.
protected  java.lang.String deriveLabel(java.lang.Object radioObject)
           
protected  java.lang.String deriveValue(java.lang.Object radioObject)
           
 int getGroupSize()
          Gets the default group size of one for non grouped fields
 boolean isGroupedField()
          Does this field use a group of options rendered as separate fields such as a radio button or multiple checkboxes with the same name - default is false
abstract  void renderEachItem(java.lang.StringBuffer output, java.lang.Object item, int index)
           
 void setButtonGroup(java.util.Collection buttons)
          Sets the radio button group to be rendered.
 void setLabel(java.lang.String label)
          Sets the name of the JavaBean property which provides the label of the radio button.
 void setPrefix(java.lang.String prefix)
          Sets the text to be printed before the radio button.
 void setSuffix(java.lang.String suffix)
          Sets the text to be printed after the radio button.
 void setValue(java.lang.String value)
          Sets the name of the JavaBean property which provides the value of the radio button.
 
Methods inherited from class net.sf.springlayout.web.layout.taglib.AbstractHtmlInputAttributesTag
addToFieldSet, appendCommonHtmlAttributes, appendContextSensitiveHelp, doFieldStartTag, getHelpMessage, isDisabled, setAccesskey, setDisabled, setHelpMessage, setHelpMessageKey, setOnblur, setOnfocus
 
Methods inherited from class net.sf.springlayout.web.layout.taglib.AbstractHtmlAttributesTag
appendAllApplicableCssClasses, appendAttribute, getBaseCssClass, getCssClass, setCssClass, setCssErrorClass, setCssStyle, setDir, setLang, setMode, setOnchange, setOnclick, setOndblclick, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setTabindex, setTitle
 
Methods inherited from class net.sf.springlayout.web.layout.taglib.AbstractFieldTag
doStartTagInternal, getFieldDefinition, getOutput, getWrappedCommand, setEmptyDisplayString, setOutput
 
Methods inherited from class net.sf.springlayout.web.layout.taglib.LayoutBindTag
doEndTag, doFinally, getEditor, getErrors, getPath, getProperty, isIgnoreNestedPath, setIgnoreNestedPath, setPath
 
Methods inherited from class org.springframework.web.servlet.tags.HtmlEscapingAwareTag
isHtmlEscape, setHtmlEscape
 
Methods inherited from class org.springframework.web.servlet.tags.RequestContextAwareTag
doCatch, doStartTag, getRequestContext
 
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

prefix

protected java.lang.String prefix

suffix

protected java.lang.String suffix
Constructor Detail

AbstractFieldGroupTag

public AbstractFieldGroupTag()
Method Detail

setButtonGroup

public void setButtonGroup(java.util.Collection buttons)
Sets the radio button group to be rendered.

Parameters:
buttons - Collection of JavaBeans, each representing one radio button. The type of the Collection elements can be anything, as long as JavaBean reflection can be performed on them.
See Also:
setValue(String), setLabel(String)

setValue

public void setValue(java.lang.String value)
Sets the name of the JavaBean property which provides the value of the radio button. This tag uses value to reflectively get the radio button values when iterating the Collection provided to setButtonGroup(Collection).

Parameters:
value - the name of the JavaBean property which provides the value of the radio button

setLabel

public void setLabel(java.lang.String label)
Sets the name of the JavaBean property which provides the label of the radio button. This tag uses label to reflectively get the radio button values when iterating the Collection provided to setButtonGroup(Collection).

If this method isn't called, the custom tag doesn't print any label.

Parameters:
label - the name of the JavaBean property which provides the label of the radio button

setPrefix

public void setPrefix(java.lang.String prefix)
Sets the text to be printed before the radio button.

Parameters:
prefix - the text to be printed before the radio button

setSuffix

public void setSuffix(java.lang.String suffix)
Sets the text to be printed after the radio button.

Parameters:
suffix - the text to be printed after the radio button

deriveValue

protected java.lang.String deriveValue(java.lang.Object radioObject)

deriveLabel

protected java.lang.String deriveLabel(java.lang.Object radioObject)

appendEditModeOutput

protected void appendEditModeOutput(java.lang.StringBuffer output)
Description copied from class: AbstractFieldTag
Builds the ouput which the tag must supply in Edit mode.

Specified by:
appendEditModeOutput in class AbstractFieldTag

appendReadOnlyOutput

protected void appendReadOnlyOutput(java.lang.StringBuffer output)
Description copied from class: AbstractFieldTag
Builds the ouput which the tag must supply in ReadOnly mode.

Overrides:
appendReadOnlyOutput in class AbstractFieldTag

renderEachItem

public abstract void renderEachItem(java.lang.StringBuffer output,
                                    java.lang.Object item,
                                    int index)

getGroupSize

public int getGroupSize()
Description copied from class: AbstractFieldTag
Gets the default group size of one for non grouped fields

Overrides:
getGroupSize in class AbstractFieldTag
Returns:

isGroupedField

public boolean isGroupedField()
Description copied from class: AbstractFieldTag
Does this field use a group of options rendered as separate fields such as a radio button or multiple checkboxes with the same name - default is false

Overrides:
isGroupedField in class AbstractFieldTag
Returns:


Copyright © 2005-2007 Spring Layout Team. All Rights Reserved.