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

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.AutoCompleteFieldTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.Tag, javax.servlet.jsp.tagext.TryCatchFinally

public class AutoCompleteFieldTag
extends AbstractHtmlInputAttributesTag

Generates an input field bound to the specified path and field definition. Allows html attributes to be passed throught to the input control as well as client-side type validation.

Author:
Rob Monie, Adam Boas
See Also:
Serialized Form

Field Summary
static java.lang.String ALT_ATTRIBUTE
          The name of the 'alt' attribute.
static java.lang.String MAXLENGTH_ATTRIBUTE
          The name of the 'maxlength' attribute.
static java.lang.String ONSELECT_ATTRIBUTE
          The name of the 'onselect' attribute.
static java.lang.String READONLY_ATTRIBUTE
          The name of the 'readonly' attribute.
static java.lang.String SIZE_ATTRIBUTE
          The name of the 'size' attribute.
 
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
AutoCompleteFieldTag()
           
 
Method Summary
protected  void appendEditModeOutput(java.lang.StringBuffer output)
          Builds the ouput which the tag must supply in Edit mode.
protected  void appendInputAttributes(java.lang.StringBuffer attributeBuffer)
          Appends the HTML Attributes specific to an input tag to the StringBuffer provided.
protected  void appendReadOnlyOutput(java.lang.StringBuffer output)
          Builds the ouput which the tag must supply in ReadOnly mode.
protected  java.lang.String getBaseCssClass()
           
protected  boolean isDisabled()
           
 void setAlt(java.lang.String alt)
          Sets the alt for this InputFieldTag.
 void setJavascriptTypeValidation(java.lang.String javascriptTypeValidation)
          Attaches JavaScript validation to the rendered field.
 void setLabel(java.lang.String label)
           
 void setMaxlength(java.lang.String maxlength)
          Sets the maxlength for this InputFieldTag.
 void setOnselect(java.lang.String onselect)
          Sets the onselect for this InputFieldTag.
 void setOptionsTarget(java.lang.String optionsTarget)
           
 void setOptionsTargetType(java.lang.String optionsTargetType)
           
 void setReadonly(java.lang.String readonly)
          Sets the readonly for this InputFieldTag.
 void setSize(java.lang.String size)
          Sets the size for this InputFieldTag.
 void setType(java.lang.String type)
          Sets the type for this InputFieldTag.
 void setValue(java.lang.String value)
           
 
Methods inherited from class net.sf.springlayout.web.layout.taglib.AbstractHtmlInputAttributesTag
addToFieldSet, appendCommonHtmlAttributes, appendContextSensitiveHelp, doFieldStartTag, getHelpMessage, setAccesskey, setDisabled, setHelpMessage, setHelpMessageKey, setOnblur, setOnfocus
 
Methods inherited from class net.sf.springlayout.web.layout.taglib.AbstractHtmlAttributesTag
appendAllApplicableCssClasses, appendAttribute, 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, getGroupSize, getOutput, getWrappedCommand, isGroupedField, 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

MAXLENGTH_ATTRIBUTE

public static final java.lang.String MAXLENGTH_ATTRIBUTE
The name of the 'maxlength' attribute.

See Also:
Constant Field Values

ALT_ATTRIBUTE

public static final java.lang.String ALT_ATTRIBUTE
The name of the 'alt' attribute.

See Also:
Constant Field Values

ONSELECT_ATTRIBUTE

public static final java.lang.String ONSELECT_ATTRIBUTE
The name of the 'onselect' attribute.

See Also:
Constant Field Values

SIZE_ATTRIBUTE

public static final java.lang.String SIZE_ATTRIBUTE
The name of the 'size' attribute.

See Also:
Constant Field Values

READONLY_ATTRIBUTE

public static final java.lang.String READONLY_ATTRIBUTE
The name of the 'readonly' attribute.

See Also:
Constant Field Values
Constructor Detail

AutoCompleteFieldTag

public AutoCompleteFieldTag()
Method Detail

setLabel

public void setLabel(java.lang.String label)
Parameters:
label -

setValue

public void setValue(java.lang.String value)
Parameters:
value -

setOptionsTarget

public void setOptionsTarget(java.lang.String optionsTarget)
Parameters:
optionsTarget -

setOptionsTargetType

public void setOptionsTargetType(java.lang.String optionsTargetType)
Parameters:
optionsTargetType -

setAlt

public void setAlt(java.lang.String alt)
Sets the alt for this InputFieldTag.

Parameters:
alt - Sets the alt for this InputFieldTag.

setMaxlength

public void setMaxlength(java.lang.String maxlength)
Sets the maxlength for this InputFieldTag.

Parameters:
maxlength - Sets the maxlength for this InputFieldTag.

setOnselect

public void setOnselect(java.lang.String onselect)
Sets the onselect for this InputFieldTag.

Parameters:
onselect - Sets the onselect for this InputFieldTag.

setType

public void setType(java.lang.String type)
Sets the type for this InputFieldTag.

Parameters:
type - The type for this InputFieldTag.

setReadonly

public void setReadonly(java.lang.String readonly)
Sets the readonly for this InputFieldTag.

Parameters:
readonly - Sets the readonly for this InputFieldTag.

setSize

public void setSize(java.lang.String size)
Sets the size for this InputFieldTag.

Parameters:
size - Sets the size for this InputFieldTag.

setJavascriptTypeValidation

public void setJavascriptTypeValidation(java.lang.String javascriptTypeValidation)
Attaches JavaScript validation to the rendered field. For flexibility, this method takes a value which looks like JavaScript function call. For example, the following value
 decimal(2);
 range(0, 999);
 
would cause the following function calls to be rendered
  validateDecimal(<field-name>, 2, true) && validateRange(<field-name>, 0, 999, true)
 


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

appendInputAttributes

protected void appendInputAttributes(java.lang.StringBuffer attributeBuffer)
Appends the HTML Attributes specific to an input tag to the StringBuffer provided.

Parameters:
attributeBuffer - the StringBuffer to append the HTML Attributes to.

getBaseCssClass

protected java.lang.String getBaseCssClass()
Specified by:
getBaseCssClass in class AbstractHtmlAttributesTag

isDisabled

protected boolean isDisabled()
Overrides:
isDisabled in class AbstractHtmlInputAttributesTag


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