Class TextFieldTag
- java.lang.Object
-
- org.apache.commons.jelly.TagSupport
-
- net.sf.jguiraffe.gui.builder.components.tags.FormBaseTag
-
- net.sf.jguiraffe.gui.builder.components.tags.ComponentBaseTag
-
- net.sf.jguiraffe.gui.builder.components.tags.InputComponentTag
-
- net.sf.jguiraffe.gui.builder.components.tags.TextFieldTag
-
- All Implemented Interfaces:
ConditionalTag
,org.apache.commons.jelly.Tag
- Direct Known Subclasses:
PasswordFieldTag
public class TextFieldTag extends InputComponentTag
A specific input component tag that constructs a text field component.
Text fields are quite easy to define. In addition to the attributes inherited from the base classes the following attributes are supported by this tag handler class:
Attribute Description Optional columns Defines the number of columns the text field should have. yes maxlength Allows to define a maximum length for text the user can type into this text field. yes - Version:
- $Id: TextFieldTag.java 205 2012-01-29 18:29:57Z oheger $
- Author:
- Oliver Heger
-
-
Constructor Summary
Constructors Constructor Description TextFieldTag()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ComponentHandler<?>
createComponentHandler(ComponentManager manager, boolean create)
Creates the component handler for this text field.int
getColumns()
Returns the number of visible columns.int
getMaxlength()
Returns the maximum number of character that can be entered into this field.void
setColumns(int columns)
Setter method for the columns attributes.void
setMaxlength(int maxlength)
Setter method for the maxlength attribute.-
Methods inherited from class net.sf.jguiraffe.gui.builder.components.tags.InputComponentTag
addToGroups, checkName, createFieldHandler, getComponent, getComponentHandler, getComponentType, getDisplayName, getFieldValidator, getFormValidator, getGroups, getPropertyName, getReadTransformer, getTypeName, getWriteTransformer, handleGroups, insertField, isNoField, process, processBeforeBody, setComponentType, setDisplayName, setDisplayNamegrp, setDisplayNameres, setFieldValidator, setFormValidator, setGroups, setNoField, setPropertyName, setReadTransformer, setTypeName, setWriteTransformer
-
Methods inherited from class net.sf.jguiraffe.gui.builder.components.tags.ComponentBaseTag
getBackColor, getBackgroundColor, getConstraints, getFont, getFontRef, getForeColor, getForegroundColor, getName, getToolTipData, insertComponent, setBackColor, setConstraints, setFont, setFontRef, setForeColor, setName, setTooltip, setTooltipres, setTooltipresgrp
-
Methods inherited from class net.sf.jguiraffe.gui.builder.components.tags.FormBaseTag
canProcess, canProcess, convertToClass, convertToNumberWithUnit, convertToNumberWithUnit, doTag, findContainer, getBuilderData, getBuilderData, getIfName, getResourceText, getResourceText, getUnlessName, setIfName, setUnlessName
-
Methods inherited from class org.apache.commons.jelly.TagSupport
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody
-
-
-
-
Method Detail
-
getColumns
public int getColumns()
Returns the number of visible columns.- Returns:
- the number of columns
-
setColumns
public void setColumns(int columns)
Setter method for the columns attributes.- Parameters:
columns
- the attribute value
-
getMaxlength
public int getMaxlength()
Returns the maximum number of character that can be entered into this field. Values of 0 or less mean that there is no limit.- Returns:
- the number of characters this field can hold
-
setMaxlength
public void setMaxlength(int maxlength)
Setter method for the maxlength attribute.- Parameters:
maxlength
- the attribute value
-
createComponentHandler
protected ComponentHandler<?> createComponentHandler(ComponentManager manager, boolean create) throws FormBuilderException, org.apache.commons.jelly.JellyTagException
Creates the component handler for this text field.- Specified by:
createComponentHandler
in classInputComponentTag
- Parameters:
manager
- the component managercreate
- the create flag- Returns:
- the component handler
- Throws:
FormBuilderException
- if an error occursorg.apache.commons.jelly.JellyTagException
- if the tag is incorrectly used
-
-