|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.japano.action.Parameter
public abstract class Parameter
Wraps a single HTTP parameter mapped to an Action property. This class is the base class for all action parameters.
Field Summary | |
---|---|
protected java.lang.String |
defaultValue
The default form value for this parameter. |
protected java.lang.String |
errorMessage
Error message displayed when the validation fails. |
protected Parametrized |
parent
Parent bean of this parameter. |
protected Validator |
validator
validator for this parameter or null . |
Constructor Summary | |
---|---|
Parameter()
|
Method Summary | |
---|---|
protected static java.lang.String |
addListVariable(org.japano.jasper.compiler.ServletWriter servletWriter,
java.lang.String varBaseName,
java.util.List l)
|
protected static void |
addStyleAttributes(Tag tag)
|
protected void |
appendAttribute(org.japano.jasper.compiler.ServletWriter servletWriter,
java.lang.String name,
java.lang.String value,
org.japano.jasper.compiler.CompilationContext context,
java.lang.Class target)
|
protected void |
appendStyleAttributes(org.japano.jasper.compiler.ServletWriter servletWriter,
java.lang.String styleId,
java.lang.String styleClass,
java.lang.String style,
org.japano.jasper.compiler.CompilationContext context)
|
java.lang.Object |
clone()
|
abstract void |
configure(MetadataTag tag)
Configures this paramater instance with information by the given MetadataTag. |
void |
configureValidation(MetadataTag validationTag)
|
abstract java.util.List |
createTags(ActionTag parent)
Generates a Tag for this type of parameter. |
java.lang.String |
getAccessorName()
|
abstract void |
getCode(org.japano.jasper.compiler.ServletWriter servletWriter,
org.japano.jasper.compiler.CompilationContext context,
java.lang.String styleId,
java.lang.String styleClass,
java.lang.String style)
Returns the input field code for this type of parameter |
java.lang.String |
getDefaultValue()
Getter for property defaultValue. |
java.lang.String |
getDescription()
Getter for property description. |
java.lang.String |
getErrorMessage()
|
java.lang.String |
getFieldId()
|
protected java.lang.reflect.Method |
getMutator(java.lang.Class beanClass)
|
java.lang.String |
getMutatorName()
|
java.lang.String |
getName()
setter for property name. |
java.lang.String |
getProperty()
setter for property property. |
java.lang.String |
getQualifiedName()
|
java.lang.String |
getRequiredMessage()
|
protected java.lang.String |
getTagName(java.lang.String actionName)
|
java.lang.Class |
getType()
|
protected java.lang.reflect.Method |
getValueMethod()
|
boolean |
isRequired()
Returns whether the parameter is required or not. |
static java.lang.String |
makeFieldId(java.lang.String text)
|
void |
set(java.lang.Object bean,
java.lang.String value)
|
void |
set(java.lang.Object bean,
java.lang.String[] value)
|
void |
setDefaultValue(java.lang.String defaultValue)
Setter for property defaultValue. |
void |
setDescription(java.lang.String description)
Setter for property description. |
void |
setName(java.lang.String name)
Setter for property name. |
void |
setParent(Parametrized parent)
|
void |
setProperty(java.lang.String property)
Setter for property property. |
void |
setValidator(Validator validator)
|
java.lang.String |
toString()
|
protected java.lang.String |
validate(Session session,
java.lang.String value)
|
protected JavaExpression |
valueExpression()
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Parametrized parent
null
if the parameter is the child
of an action.
protected Validator validator
null
.
protected java.lang.String errorMessage
protected java.lang.String defaultValue
Constructor Detail |
---|
public Parameter()
Method Detail |
---|
public boolean isRequired()
public java.lang.String getName()
public void setName(java.lang.String name)
name
- New value of property name.public java.lang.String getProperty()
public void setProperty(java.lang.String property)
property
- New value of property property.public java.lang.String getDescription()
public void setDescription(java.lang.String description)
description
- New value of property description.public java.lang.String getQualifiedName()
public java.lang.Class getType()
public java.lang.String getErrorMessage()
public void set(java.lang.Object bean, java.lang.String value)
public void set(java.lang.Object bean, java.lang.String[] value)
protected java.lang.String validate(Session session, java.lang.String value) throws InvalidParameterException
InvalidParameterException
public java.lang.String getMutatorName()
public java.lang.String getAccessorName()
public java.lang.String toString()
toString
in class java.lang.Object
public void setParent(Parametrized parent)
protected java.lang.reflect.Method getMutator(java.lang.Class beanClass)
protected java.lang.String getTagName(java.lang.String actionName)
public void configureValidation(MetadataTag validationTag)
protected JavaExpression valueExpression()
protected java.lang.reflect.Method getValueMethod()
protected void appendAttribute(org.japano.jasper.compiler.ServletWriter servletWriter, java.lang.String name, java.lang.String value, org.japano.jasper.compiler.CompilationContext context, java.lang.Class target)
protected static void addStyleAttributes(Tag tag)
protected void appendStyleAttributes(org.japano.jasper.compiler.ServletWriter servletWriter, java.lang.String styleId, java.lang.String styleClass, java.lang.String style, org.japano.jasper.compiler.CompilationContext context)
protected static java.lang.String addListVariable(org.japano.jasper.compiler.ServletWriter servletWriter, java.lang.String varBaseName, java.util.List l)
public java.lang.String getDefaultValue()
public void setDefaultValue(java.lang.String defaultValue)
defaultValue
- New value of property defaultValue.public java.lang.String getRequiredMessage()
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public void setValidator(Validator validator)
public abstract java.util.List createTags(ActionTag parent)
parent
- action tag this parameter is child of
null
public abstract void getCode(org.japano.jasper.compiler.ServletWriter servletWriter, org.japano.jasper.compiler.CompilationContext context, java.lang.String styleId, java.lang.String styleClass, java.lang.String style)
servletWriter
- ServletWritercontext
- PageNodeCreator contextstyleId
- HTML id attributestyleClass
- HTML class attributestyle
- HTML style attributepublic abstract void configure(MetadataTag tag)
public java.lang.String getFieldId()
public static java.lang.String makeFieldId(java.lang.String text)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |