Developer

TextBoxAttribute class

Input attribute of textbox type.

Package

com.sybase365.mobiliser.brand.plugins.smapp.controls
Syntax
Syntax
public class TextBoxAttribute extends InputAttribute

Base class

Members

All members of TextBoxAttribute, including inherited members.

Constructors
Modifier and Type Constructor Description
public TextBoxAttribute(String, String, boolean) Constructor.
Methods
Modifier and Type Method Description
public InputValue getInputValue() More efficient way to check and obtain the value of the input attribute using a single database call.
public boolean isSet() Return True/False when the InputAttribute contains value or not, respectively.
Inherited members from InputAttribute
Modifier and Type Member Description
public InputType getInputType() Input type can be changed from the State Editor by checking/unchecking the input attribute checkbox, to set to InputType#SESSION or InputType#ATTRIBUTE, respectively.
public InputValue getInputValueWithWarning() Similar to getInputValue() but this method throws RequiredParameterMissingException when the input attribute is not optional (or mandatory) but the value is null (or not populated).
protected String getRawValue() Helper class used internally by the getInputValue(), getInputValueWithWarning(), and getValue().
protected String getRawValueLog() Helper class called internally by getRawValue().
public InputValue getValue() Get the InputValue with no warning.
public InputAttribute(String, String, boolean) Constructor.
public boolean isCheckboxEnabled() Whether the UI checkbox component is enabled or not.
public boolean isOptional() Whether the input attribute is optional.
public void setCheckboxEnabled(boolean) Enable or disable the checkbox.
public void setInputType(InputType) Input type can be changed from the State Editor by checking/unchecking the input attribute checkbox, to set it to InputType#SESSION or InputType#ATTRIBUTE, respectively.
public void setOptional(boolean) Set the input attribute optional status.
Inherited members from Attribute
Modifier and Type Member Description
public Attribute(String, String) Default value (if provided)
protected SmappStateProcessingContext getContext() Sets the processing engine context.
public String getDescription() Detailed description of the attribute.
public String getId() Attribute Id.
public String getText() The text that was entered in the input field on the state editor.
public void setContext(SmappStateProcessingContext) Sets the processing engine context.
public void setDescription(String) Detailed description of the attribute.
public void setId(String) Attribute Id.

Usage

The State Editor will display this input field using a textbox component, allowing user to enter value.

By default, this TextBoxAttribute is of InputAttribute.InputType#SESSION (so the checkbox will be checked), and the input field will be populated with the string ID of this input attribute. So during state processing, the input attribute value will be retrieved from the session variable of the input attribute ID.

Change the value of the input field, to retrieve the input attribute value from a different session variable name.

The textbox attribute type can be changed to InputAttribute.InputType#ATTRIBUTE so that the value in the input field is used as a static value.