|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.jsp.tagext.TagSupport
org.springframework.web.servlet.tags.RequestContextAwareTag
org.springframework.web.servlet.tags.HtmlEscapingAwareTag
net.sf.springlayout.web.layout.taglib.LayoutBindTag
net.sf.springlayout.web.layout.taglib.AbstractFieldTag
public abstract class AbstractFieldTag
Abstract class for creating field tags with support for binding to the model
and form field fieldDefinition. Uses the FormTag.CURRENT_PANEL
request attribute to get a handle to the layoutPanel for the current
form being displayed in order to evaluate the current field against it's field
definition.
This tag provides html passthrough for all general javascript events as well as
standard htmlAttributes applicable to all labels and fields. This code lends heavily
from the Spring form tags.
Field Summary | |
---|---|
protected static SpringLayoutConfiguration |
config
|
protected java.lang.String |
emptyDisplayString
|
protected OnPageFieldInstance |
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 | |
---|---|
AbstractFieldTag()
|
Method Summary | |
---|---|
protected abstract void |
addToFieldSet(FieldDefinition fieldDefinition,
OnPageFieldInstance fieldInstance)
Adds this OnPageFieldInstance to the appropriate set in the fieldDefinition |
protected abstract 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. |
abstract int |
doFieldStartTag()
Called in sub classes |
int |
doStartTagInternal()
Sets up a FieldStatus Field based on the current context
and config in the field definitions for use by spring field tags. |
protected FieldDefinition |
getFieldDefinition(javax.servlet.http.HttpServletRequest request)
|
int |
getGroupSize()
Gets the default group size of one for non grouped fields |
java.lang.StringBuffer |
getOutput()
Primarily for testing this allows the StringBuffer that this tag and it's children use to append their html output to be set and re-acquired. |
protected org.springframework.beans.BeanWrapper |
getWrappedCommand()
|
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 |
void |
setEmptyDisplayString(java.lang.String emptyDisplayString)
Sets the emptyDisplayString for this InputFieldTag. |
void |
setOutput(java.lang.StringBuffer output)
Sets the output which this AbstractFieldTag will use to append html. |
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 |
---|
protected OnPageFieldInstance fieldInstance
protected static SpringLayoutConfiguration config
protected java.lang.String emptyDisplayString
Constructor Detail |
---|
public AbstractFieldTag()
Method Detail |
---|
public java.lang.StringBuffer getOutput()
public void setOutput(java.lang.StringBuffer output)
output
- Sets the output which this AbstractFieldTag will use to append htmlpublic void setEmptyDisplayString(java.lang.String emptyDisplayString)
emptyDisplayString
- Sets the emptyDisplayString for this InputFieldTag.public int doStartTagInternal() throws java.lang.Exception
Sets up a FieldStatus
Field based on the current context
and config in the field definitions for use by spring field tags.
doStartTagInternal
in class LayoutBindTag
java.lang.Exception
RequestContextAwareTag.doStartTagInternal()
public abstract int doFieldStartTag() throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagException
protected void appendReadOnlyOutput(java.lang.StringBuffer output)
protected abstract void appendEditModeOutput(java.lang.StringBuffer output)
protected abstract void addToFieldSet(FieldDefinition fieldDefinition, OnPageFieldInstance fieldInstance)
fieldDefinition
- fieldInstance
- protected final FieldDefinition getFieldDefinition(javax.servlet.http.HttpServletRequest request)
public boolean isGroupedField()
public int getGroupSize()
protected org.springframework.beans.BeanWrapper getWrappedCommand()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |