Package org.jboss.hal.core.mbui.form
Class GroupedForm<T extends ModelNode>
- java.lang.Object
-
- org.jboss.hal.core.mbui.form.GroupedForm<T>
-
- All Implemented Interfaces:
org.jboss.elemento.IsElement,Attachable,Form<T>
public class GroupedForm<T extends ModelNode> extends Object implements Form<T>
A form which groups attributes on different tabs. Each group will include the attributes specified by the grouped form builder.Internally this class uses a separate form for each group / tab. All forms share the same save, cancel and reset callbacks.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGroupedForm.Builder<T extends ModelNode>-
Nested classes/interfaces inherited from interface org.jboss.hal.ballroom.form.Form
Form.CancelCallback<T>, Form.FinishRemove<T>, Form.FinishReset<T>, Form.Operation, Form.PrepareRemove<T>, Form.PrepareReset<T>, Form.SaveCallback<T>, Form.State
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFormValidation(FormValidation<T> formValidation)CallsForm.addFormValidation(FormValidation)on all forms.voidattach()voidcancel()CallsForm.cancel()on the currently active form.voidclear()CallsForm.clear()on all forms.voiddetach()voidedit(T model)CallsForm.edit(Object)on the currently active form.elemental2.dom.HTMLElementelement()Iterable<FormItem>getBoundFormItems()<F> FormItem<F>getFormItem(String name)Iterable<FormItem>getFormItems()StringgetId()TgetModel()StateMachinegetStateMachine()booleanisTransient()ReturnsForm.isTransient()on the currently active form.booleanisUndefined()ReturnsForm.isUndefined()on the currently active form.voidremove()CallsForm.remove()on the currently active form.voidreset()CallsForm.reset()on the currently active form.booleansave()CallsForm.save()on the currently active form.voidsetCancelCallback(Form.CancelCallback<T> cancelCallback)voidsetPrepareRemove(Form.PrepareRemove<T> prepareRemove)voidsetPrepareReset(Form.PrepareReset<T> prepareReset)voidsetSaveCallback(Form.SaveCallback<T> saveCallback)voidview(T model)CallsForm.view(Object)on all forms.
-
-
-
Method Detail
-
element
public elemental2.dom.HTMLElement element()
-
attach
public void attach()
- Specified by:
attachin interfaceAttachable
-
detach
public void detach()
- Specified by:
detachin interfaceAttachable
-
isUndefined
public boolean isUndefined()
ReturnsForm.isUndefined()on the currently active form.- Specified by:
isUndefinedin interfaceForm<T extends ModelNode>
-
isTransient
public boolean isTransient()
ReturnsForm.isTransient()on the currently active form.- Specified by:
isTransientin interfaceForm<T extends ModelNode>
-
view
public void view(T model)
CallsForm.view(Object)on all forms.
-
clear
public void clear()
CallsForm.clear()on all forms.
-
edit
public void edit(T model)
CallsForm.edit(Object)on the currently active form.
-
save
public boolean save()
CallsForm.save()on the currently active form.
-
setSaveCallback
public void setSaveCallback(Form.SaveCallback<T> saveCallback)
- Specified by:
setSaveCallbackin interfaceForm<T extends ModelNode>
-
cancel
public void cancel()
CallsForm.cancel()on the currently active form.
-
setCancelCallback
public void setCancelCallback(Form.CancelCallback<T> cancelCallback)
- Specified by:
setCancelCallbackin interfaceForm<T extends ModelNode>
-
setPrepareReset
public void setPrepareReset(Form.PrepareReset<T> prepareReset)
- Specified by:
setPrepareResetin interfaceForm<T extends ModelNode>
-
reset
public void reset()
CallsForm.reset()on the currently active form.
-
setPrepareRemove
public void setPrepareRemove(Form.PrepareRemove<T> prepareRemove)
- Specified by:
setPrepareRemovein interfaceForm<T extends ModelNode>
-
remove
public void remove()
CallsForm.remove()on the currently active form.
-
getId
public String getId()
-
getModel
public T getModel()
-
getStateMachine
public StateMachine getStateMachine()
- Specified by:
getStateMachinein interfaceForm<T extends ModelNode>- Returns:
- the state machine which access to the current state.
-
getFormItem
public <F> FormItem<F> getFormItem(String name)
- Specified by:
getFormItemin interfaceForm<T extends ModelNode>
-
getFormItems
public Iterable<FormItem> getFormItems()
- Specified by:
getFormItemsin interfaceForm<T extends ModelNode>- Returns:
- return all form items.
-
getBoundFormItems
public Iterable<FormItem> getBoundFormItems()
- Specified by:
getBoundFormItemsin interfaceForm<T extends ModelNode>- Returns:
- only those form items which are bound to the model.
-
addFormValidation
public void addFormValidation(FormValidation<T> formValidation)
CallsForm.addFormValidation(FormValidation)on all forms.- Specified by:
addFormValidationin interfaceForm<T extends ModelNode>
-
-