Package de.mhus.lib.form
Interface FormControl
-
- All Known Implementing Classes:
DummyDataSource,FormControlAdapter
public interface FormControl
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidattachedForm(MForm form)Call if the control is added to the form.voiddoAction(String action, Object... params)This function can be called by custom code, e.g.voidfocus(UiComponent component)The component gets focus.booleannewValue(UiComponent component, Object newValue)Set a new value to the component.voidnewValueError(UiComponent component, Object newValue, Throwable t)voidreverted(UiComponent component)The value was reverted.voidsetup()The method is called after the form is initialized to set the default state.voidvalueSet(UiComponent component)The method is called after every value update.
-
-
-
Method Detail
-
attachedForm
void attachedForm(MForm form)
Call if the control is added to the form. Remember the form object.- Parameters:
form-
-
focus
void focus(UiComponent component)
The component gets focus.- Parameters:
component-
-
newValue
boolean newValue(UiComponent component, Object newValue)
Set a new value to the component. Return true if the value is valid.- Parameters:
component-newValue-- Returns:
- If the value was accepted.
-
reverted
void reverted(UiComponent component)
The value was reverted.- Parameters:
component-
-
newValueError
void newValueError(UiComponent component, Object newValue, Throwable t)
-
valueSet
void valueSet(UiComponent component)
The method is called after every value update.- Parameters:
component-
-
setup
void setup()
The method is called after the form is initialized to set the default state.
-
-