Package de.mhus.lib.form
Class FormControlAdapter
- java.lang.Object
-
- de.mhus.lib.core.MLog
-
- de.mhus.lib.form.FormControlAdapter
-
- All Implemented Interfaces:
ILog,FormControl
- Direct Known Subclasses:
DummyDataSource
public class FormControlAdapter extends MLog implements FormControl
-
-
Constructor Summary
Constructors Constructor Description FormControlAdapter()
-
Method Summary
All Methods Instance Methods Concrete 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.
-
-
-
Field Detail
-
form
protected MForm form
-
-
Method Detail
-
focus
public void focus(UiComponent component)
Description copied from interface:FormControlThe component gets focus.- Specified by:
focusin interfaceFormControl
-
newValue
public boolean newValue(UiComponent component, Object newValue)
Description copied from interface:FormControlSet a new value to the component. Return true if the value is valid.- Specified by:
newValuein interfaceFormControl- Returns:
- If the value was accepted.
-
reverted
public void reverted(UiComponent component)
Description copied from interface:FormControlThe value was reverted.- Specified by:
revertedin interfaceFormControl
-
attachedForm
public void attachedForm(MForm form)
Description copied from interface:FormControlCall if the control is added to the form. Remember the form object.- Specified by:
attachedFormin interfaceFormControl
-
newValueError
public void newValueError(UiComponent component, Object newValue, Throwable t)
- Specified by:
newValueErrorin interfaceFormControl
-
valueSet
public void valueSet(UiComponent component)
Description copied from interface:FormControlThe method is called after every value update.- Specified by:
valueSetin interfaceFormControl
-
setup
public void setup()
Description copied from interface:FormControlThe method is called after the form is initialized to set the default state.- Specified by:
setupin interfaceFormControl
-
doAction
public void doAction(String action, Object... params)
Description copied from interface:FormControlThis function can be called by custom code, e.g. if a action is triggered.- Specified by:
doActionin interfaceFormControl
-
-