Interface IXItemPropertiesData
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AXItemPropertiesData, XItem, XItemRenderData
-
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(XPropertyEnum xPropertyEnum) booleanget(XPropertyEnum xPropertyEnum) getAlias()com.alibaba.fastjson.JSONArrayGets a list of custom HTML attributes that should be added to the form element.Gets an iterable over the name and values of all custom attributes that should be added to the form element.default StringgetAttributeValue(String name) Gets the value of a custom attribute that should be added to the form element.getId()getName()com.alibaba.fastjson.JSONArraybooleangetVrule()default booleanhasAttribute(String name) Checks whether a custom HTML attribute with the given name exists, irrespective of its value.default booleanisOfType(Class<? extends IXItemBasic> className) Checks whether this item is of the given class.booleanbooleandefault booleanChecks whether this item is itself repeated, see alsoXPropertyEnum.dynamic.booleandefault booleanChecks whether an upload allows multiple files for a single upload element.booleanbooleandefault voidput(String property, XPropertyValue value) Sets the given property to the given value.default StringremoveAttribute(String name) Removes a custom HTML attribute with the given name, irrespective of its value.default StringsetAttributeValue(String name, String value) sets the value of a custom attribute that should be added to the form element.
-
Method Details
-
getPropertyMap
Map<String, XPropertyValue> getPropertyMap() -
getClassName
String getClassName()- Returns:
- the className of an item XTextField, XPage etc.
-
isOfType
Checks whether this item is of the given class. This is a convenience method that compares the class name of this item with the simple name of the given class.- Parameters:
className- The class to compare this item to.- Returns:
- True if this item is an instance of the given element type, false otherwise.
-
get
- Parameters:
xPropertyEnum- - get a property by XPropertyEnum- Returns:
- - a new XProperty if not exist
-
get
- Parameters:
property- - get a property by name- Returns:
- - a new XProperty if not exist
-
contains
- Parameters:
property- the name of the property- Returns:
- true if property exist
-
contains
- Parameters:
xPropertyEnum- the enum of the property- Returns:
- true if property exist
-
getId
String getId()- Returns:
- the string value for the property id
-
getName
-
getAlias
-
getResolvedAlias
String getResolvedAlias()- Returns:
- The effective alias of this item, either the alias when not empty, or the name otherwise.
-
getAttributes
com.alibaba.fastjson.JSONArray getAttributes()Gets a list of custom HTML attributes that should be added to the form element. SeeXPropertyEnum.attributes.- Returns:
- A list of custom HTML attributes.
-
getAttributesEntries
Gets an iterable over the name and values of all custom attributes that should be added to the form element. SeeXPropertyEnum.attributes. When an attribute exists, but has no or an empty value, the returned list contains an entry with the empty string as a value.- Returns:
- An iterable with name value pairs of all custom attributes, the key is the attribute name, the value is the attribute value.
-
getAttributeValue
Gets the value of a custom attribute that should be added to the form element. SeeXPropertyEnum.attributes. Returns null when no such attribute was configured. Returns the empty string when an attribute with no value was configured.- Parameters:
name- Name of the attribute to get.- Returns:
- Value of the attribute.
-
put
Sets the given property to the given value. If the property does not exist, it is created. If the value is null, the property is removed.- Parameters:
property- The name of the property to set.value- The new value of the property. Null will remove the property.
-
setAttributeValue
sets the value of a custom attribute that should be added to the form element. SeeXPropertyEnum.attributes. Passing null as the value is equivalent to callingremoveAttribute(String).- Parameters:
name- Name of the attribute to set.value- New value of the attribute. null will remove the attribute.- Returns:
- The old value of the attribute, same as if you had called
getAttributeValue(String)beforehand.
-
removeAttribute
Removes a custom HTML attribute with the given name, irrespective of its value. SeeXPropertyEnum.attributes.- Parameters:
name- Name of the attribute to remove.- Returns:
- The old value of the attribute, same as if you had called
getAttributeValue(String)beforehand.
-
hasAttribute
Checks whether a custom HTML attribute with the given name exists, irrespective of its value. SeeXPropertyEnum.attributes. This method can be used e.g. for boolean attributes like "required", "readonly", or "multiple".- Parameters:
name- Name of the attribute to check.- Returns:
- Whether an attribute with the given name exists.
-
isUploadMultiple
default boolean isUploadMultiple()Checks whether an upload allows multiple files for a single upload element.- Returns:
- Whether the "multiple" attribute is set.
-
getParentId
String getParentId()- Returns:
- id of parent element
-
getOptions
com.alibaba.fastjson.JSONArray getOptions()- Returns:
- JSONArray of property Option
-
getRequiredgroup
String getRequiredgroup() -
getDatatype
String getDatatype() -
getMinvalue
String getMinvalue() -
getMaxvalue
String getMaxvalue() -
getVrule
String getVrule() -
getMaxfilesize
String getMaxfilesize() -
getFileextension
String getFileextension() -
getEquals
String getEquals() -
getRequiredif
String getRequiredif() -
getReadonlyif
String getReadonlyif() -
getHiddenif
String getHiddenif() -
getRequiredifcomp
String getRequiredifcomp() -
getRequiredifvalue
String getRequiredifvalue() -
getReadonlyifcomp
String getReadonlyifcomp() -
getReadonlyifvalue
String getReadonlyifvalue() -
getHiddenifcomp
String getHiddenifcomp() -
getHiddenifclear
String getHiddenifclear() -
getReadonlyifclear
String getReadonlyifclear() -
getHiddenifvalue
String getHiddenifvalue() -
getRequired
boolean getRequired()- Returns:
- true required equals 1
-
isValidateOnServerSide
boolean isValidateOnServerSide()- Returns:
trueifXPropertyEnum.servervalidateis set to1.
-
isStatusdependent
boolean isStatusdependent()- Returns:
- the statusdependent
-
isUsergrouppendent
boolean isUsergrouppendent()- Returns:
- the usergrouppendent
-
isRepeated
default boolean isRepeated()Checks whether this item is itself repeated, see alsoXPropertyEnum.dynamic. Note: This method only checks if the item is repeated, not whether it is inside a container that is repeated.- Returns:
- True if this item is repeated, false otherwise.
-
isReadonlyStatusdependent
boolean isReadonlyStatusdependent()- Returns:
- the readonly statusdependent
-
isReadonlyUsergrouppendant
boolean isReadonlyUsergrouppendant()- Returns:
- the readonly usergrouppendant
-