Class FieldWrapper
- java.lang.Object
-
- org.appng.xml.BaseObject
-
- org.appng.xml.platform.FieldDef
-
- org.appng.api.FieldWrapper
-
- All Implemented Interfaces:
Serializable
public class FieldWrapper extends FieldDef
AFieldWrapper
extends aFieldDef
and adds the ability to read and set the field's string-representation (getStringValue()
/setStringValue(String)
) and also the object-representation (getObject()
/setObject(Object)
). This is achieved by using aBeanWrapper
.- Author:
- Matthias Müller
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FieldWrapper(FieldDef fieldDef, org.springframework.beans.BeanWrapper beanWrapper)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
backupFields()
boolean
equals(Object obj)
org.springframework.beans.BeanWrapper
getBeanWrapper()
Returns theBeanWrapper
used by thisFieldWrapper
to access the property.String
getBinding()
This is the name of the property used with the JavaBeans API.Condition
getCondition()
Gets the value of the condition property.BigInteger
getDisplayLength()
The maximum number of characters when displaying the field's value as string.List<FieldDef>
getFields()
Gets the value of the fields property.String
getFormat()
The format used for this field, presuming theFieldDef.type
supports formatting.String
getHidden()
If evaluating totrue
, the field will not be visible to the user.List<Icon>
getIcons()
Gets the value of the icons property.Label
getLabel()
Gets the value of the label property.Linkpanel
getLinkpanel()
Messages
getMessages()
Gets the value of the messages property.String
getName()
The name of the field.Object
getObject()
Returns the property that thisFieldWrapper
handles.List<FieldPermissions>
getPermissions()
Gets the value of the permissions property.String
getReadonly()
If evaluating totrue
, the field's value is readonly.Sort
getSort()
Gets the value of the sort property.String
getStringValue()
Returns theString
-value of the property that thisFieldWrapper
handles.Class<?>
getTargetClass()
Returns the target-type for the property that thisFieldWrapper
handles.FieldType
getType()
TheFieldType
, which decides about how the field is being displayed.Validation
getValidation()
Gets the value of the validation property.int
hashCode()
void
restoreFields()
void
setBinding(String value)
Sets the value of the binding property.void
setCondition(Condition value)
Sets the value of the condition property.void
setDisplayLength(BigInteger value)
Sets the value of the displayLength property.void
setFormat(String value)
Sets the value of the format property.void
setHidden(String value)
Sets the value of the hidden property.void
setLabel(Label value)
Sets the value of the label property.void
setLinkpanel(Linkpanel linkpanel)
void
setMessages(Messages value)
Sets the value of the messages property.void
setName(String value)
Sets the value of the name property.void
setObject(Object object)
Sets the property that thisFieldWrapper
handles.void
setReadonly(String value)
Sets the value of the readonly property.void
setSort(Sort value)
Sets the value of the sort property.void
setStringValue(String stringValue)
Sets theString
-value of the property that thisFieldWrapper
handles.void
setType(FieldType value)
Sets the value of the type property.void
setValidation(Validation value)
Sets the value of the validation property.String
toString()
static String
toString(FieldDef fieldDef)
-
Methods inherited from class org.appng.xml.platform.FieldDef
getTooltip, setTooltip
-
-
-
-
Method Detail
-
getObject
public Object getObject()
Returns the property that thisFieldWrapper
handles.- Returns:
- the property
-
setObject
public void setObject(Object object)
Sets the property that thisFieldWrapper
handles.- Parameters:
object
- the property
-
getStringValue
public String getStringValue()
Returns theString
-value of the property that thisFieldWrapper
handles.- Returns:
- the
String
-value
-
setStringValue
public void setStringValue(String stringValue)
Sets theString
-value of the property that thisFieldWrapper
handles.- Parameters:
stringValue
- theString
-value to set
-
getBeanWrapper
public org.springframework.beans.BeanWrapper getBeanWrapper()
Returns theBeanWrapper
used by thisFieldWrapper
to access the property.- Returns:
- the
BeanWrapper
-
getTargetClass
public Class<?> getTargetClass()
Returns the target-type for the property that thisFieldWrapper
handles.- Returns:
- the target-type
-
getSort
public Sort getSort()
Description copied from class:FieldDef
Gets the value of the sort property.
-
setSort
public void setSort(Sort value)
Description copied from class:FieldDef
Sets the value of the sort property.
-
getLabel
public Label getLabel()
Description copied from class:FieldDef
Gets the value of the label property.
-
setLabel
public void setLabel(Label value)
Description copied from class:FieldDef
Sets the value of the label property.
-
getIcons
public List<Icon> getIcons()
Description copied from class:FieldDef
Gets the value of the icons property.This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a
set
method for the icons property.For example, to add a new item, do as follows:
getIcons().add(newItem);
Objects of the following type(s) are allowed in the list
Icon
-
getCondition
public Condition getCondition()
Description copied from class:FieldDef
Gets the value of the condition property.- Overrides:
getCondition
in classFieldDef
- Returns:
- possible object is
Condition
-
setCondition
public void setCondition(Condition value)
Description copied from class:FieldDef
Sets the value of the condition property.- Overrides:
setCondition
in classFieldDef
- Parameters:
value
- allowed object isCondition
-
getPermissions
public List<FieldPermissions> getPermissions()
Description copied from class:FieldDef
Gets the value of the permissions property.This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a
set
method for the permissions property.For example, to add a new item, do as follows:
getPermissions().add(newItem);
Objects of the following type(s) are allowed in the list
FieldPermissions
- Overrides:
getPermissions
in classFieldDef
-
getValidation
public Validation getValidation()
Description copied from class:FieldDef
Gets the value of the validation property.- Overrides:
getValidation
in classFieldDef
- Returns:
- possible object is
Validation
-
setValidation
public void setValidation(Validation value)
Description copied from class:FieldDef
Sets the value of the validation property.- Overrides:
setValidation
in classFieldDef
- Parameters:
value
- allowed object isValidation
-
getMessages
public Messages getMessages()
Description copied from class:FieldDef
Gets the value of the messages property.- Overrides:
getMessages
in classFieldDef
- Returns:
- possible object is
Messages
-
setMessages
public void setMessages(Messages value)
Description copied from class:FieldDef
Sets the value of the messages property.- Overrides:
setMessages
in classFieldDef
- Parameters:
value
- allowed object isMessages
-
getFields
public List<FieldDef> getFields()
Description copied from class:FieldDef
Gets the value of the fields property.This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a
set
method for the fields property.For example, to add a new item, do as follows:
getFields().add(newItem);
Objects of the following type(s) are allowed in the list
FieldDef
-
setName
public void setName(String value)
Description copied from class:FieldDef
Sets the value of the name property.
-
getType
public FieldType getType()
Description copied from class:FieldDef
TheFieldType
, which decides about how the field is being displayed.
-
setType
public void setType(FieldType value)
Description copied from class:FieldDef
Sets the value of the type property.
-
getDisplayLength
public BigInteger getDisplayLength()
Description copied from class:FieldDef
The maximum number of characters when displaying the field's value as string.- Overrides:
getDisplayLength
in classFieldDef
- Returns:
- possible object is
BigInteger
-
setDisplayLength
public void setDisplayLength(BigInteger value)
Description copied from class:FieldDef
Sets the value of the displayLength property.- Overrides:
setDisplayLength
in classFieldDef
- Parameters:
value
- allowed object isBigInteger
-
getFormat
public String getFormat()
Description copied from class:FieldDef
The format used for this field, presuming theFieldDef.type
supports formatting.
-
setFormat
public void setFormat(String value)
Description copied from class:FieldDef
Sets the value of the format property.
-
getReadonly
public String getReadonly()
Description copied from class:FieldDef
If evaluating totrue
, the field's value is readonly.- Overrides:
getReadonly
in classFieldDef
- Returns:
- possible object is
String
-
setReadonly
public void setReadonly(String value)
Description copied from class:FieldDef
Sets the value of the readonly property.- Overrides:
setReadonly
in classFieldDef
- Parameters:
value
- allowed object isString
-
getHidden
public String getHidden()
Description copied from class:FieldDef
If evaluating totrue
, the field will not be visible to the user.
-
setHidden
public void setHidden(String value)
Description copied from class:FieldDef
Sets the value of the hidden property.
-
getBinding
public String getBinding()
Description copied from class:FieldDef
This is the name of the property used with the JavaBeans API. If no value is set, the binding is the combination ofMetaData.getBindClass()
(if any, separated with a dot) and the field's name.- Overrides:
getBinding
in classFieldDef
- Returns:
- possible object is
String
-
setBinding
public void setBinding(String value)
Description copied from class:FieldDef
Sets the value of the binding property.- Overrides:
setBinding
in classFieldDef
- Parameters:
value
- allowed object isString
-
getLinkpanel
public Linkpanel getLinkpanel()
-
backupFields
public void backupFields()
-
restoreFields
public void restoreFields()
-
setLinkpanel
public void setLinkpanel(Linkpanel linkpanel)
-
-