Package com.saperion.ngc.iform
Class ButtonAndFieldHandler
java.lang.Object
com.saperion.ngc.iform.ButtonAndFieldHandler
Helper class for IntelligentFormViewImpl to handle buttons and fields.
-
Constructor Summary
ConstructorsConstructorDescriptionButtonAndFieldHandler(IntelligentFormViewImpl form, IntelligentFormPresenter presenter) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleFieldsForIndexMask(boolean disabled) Handles the fields for index mask usage.voidRemoves all error messages from the fields.voidsetButtonMode(com.saperion.ngc.iform.IntelligentFormViewImpl.ButtonMode mode) Sets the buttons to disabled/enabled state according to the specified ButtonMode.voidsetButtonMode(com.saperion.ngc.iform.IntelligentFormViewImpl.ButtonMode mode, boolean ignoreDisabledBtn) Sets the buttons to disabled/enabled state according to the specified ButtonMode.voidsetFieldsDisabledState(boolean disabled) Sets the disabled state for all fields.voidsetFieldsReadonlyState(boolean disabled) Sets the readonly state for all fields.voidTriggers the validation for all fields.
-
Constructor Details
-
ButtonAndFieldHandler
Constructor.- Parameters:
form- the formpresenter- presenter
-
-
Method Details
-
setButtonMode
public void setButtonMode(com.saperion.ngc.iform.IntelligentFormViewImpl.ButtonMode mode) Sets the buttons to disabled/enabled state according to the specified ButtonMode.- Parameters:
mode- button mode
-
setButtonMode
public void setButtonMode(com.saperion.ngc.iform.IntelligentFormViewImpl.ButtonMode mode, boolean ignoreDisabledBtn) Sets the buttons to disabled/enabled state according to the specified ButtonMode. If ignoreDisabledBtn is true and any button is in disabled state, it ignores all actions- Parameters:
mode- button modeignoreDisabledBtn- flag to ignore disabled button
-
handleFieldsForIndexMask
public void handleFieldsForIndexMask(boolean disabled) Handles the fields for index mask usage.- Parameters:
disabled- set to true to disable all fields
-
setFieldsReadonlyState
public void setFieldsReadonlyState(boolean disabled) Sets the readonly state for all fields.- Parameters:
disabled- disabled state
-
setFieldsDisabledState
public void setFieldsDisabledState(boolean disabled) Sets the disabled state for all fields.- Parameters:
disabled- disabled state
-
validateFields
public void validateFields()Triggers the validation for all fields. -
removeValidationMessages
public void removeValidationMessages()Removes all error messages from the fields.
-