public abstract class CompositeFormItem extends AbstractFormItem<org.jboss.hal.dmr.ModelNode> implements ModelNodeItem
The composite form item uses the following semantics:
div element. In the readonly mode they're separated by hr
elements.| Constructor and Description |
|---|
CompositeFormItem(String name,
String label) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addFormItems(List<FormItem> formItems) |
void |
addValidationHandler(FormItemValidation<org.jboss.hal.dmr.ModelNode> validationHandler) |
com.google.gwt.event.shared.HandlerRegistration |
addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<org.jboss.hal.dmr.ModelNode> valueChangeHandler) |
elemental2.dom.HTMLElement |
asElement(Form.State state) |
void |
attach()
Calls
SuggestHandler.attach() in case there was one registered. |
void |
clearValue()
Sets the value and expression value to
null, clears any error marker and
shows the default value (if any). |
void |
detach() |
String |
getId(Form.State state) |
int |
getTabIndex() |
org.jboss.hal.dmr.ModelNode |
getValue() |
boolean |
isEmpty() |
boolean |
isEnabled() |
boolean |
isRequired() |
boolean |
isRestricted() |
protected abstract void |
persistModel(org.jboss.hal.dmr.ModelNode modelNode)
Called during
getValue() to persist the form items into the provided model. |
protected abstract void |
populateFormItems(org.jboss.hal.dmr.ModelNode modelNode)
Called during
AbstractFormItem.setValue(Object) to set the form items using the provided model. |
void |
registerSuggestHandler(SuggestHandler suggestHandler) |
void |
setEnabled(boolean enabled) |
void |
setFocus(boolean focus) |
void |
setId(String id) |
void |
setRequired(boolean required) |
void |
setRestricted(boolean restricted) |
void |
setTabIndex(int index) |
void |
setUndefined(boolean undefined) |
void |
setValue(org.jboss.hal.dmr.ModelNode value,
boolean fireEvent)
Sets the form item's value and shows the value in the appearances.
|
boolean |
supportsExpressions() |
boolean |
validate() |
addAppearance, addResolveExpressionHandler, assignDefaultValue, clearError, fireEvent, getExpressionValue, getLabel, getName, isDeprecated, isExpressionAllowed, isExpressionValue, isModified, isUndefined, mask, modifyExpressionValue, modifyValue, onSuggest, remember, setAccessKey, setDeprecated, setExpressionAllowed, setExpressionValue, setLabel, setModified, setName, setValue, showError, unmaskclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddResolveExpressionHandler, assignDefaultValue, clearError, getExpressionValue, getLabel, isDeprecated, isExpressionAllowed, isExpressionValue, isModified, isUndefined, mask, setDeprecated, setExpressionAllowed, setExpressionValue, setLabel, setModified, showError, unmaskprotected abstract void populateFormItems(org.jboss.hal.dmr.ModelNode modelNode)
AbstractFormItem.setValue(Object) to set the form items using the provided model.protected abstract void persistModel(org.jboss.hal.dmr.ModelNode modelNode)
getValue() to persist the form items into the provided model.public elemental2.dom.HTMLElement asElement(Form.State state)
asElement in interface FormItem<org.jboss.hal.dmr.ModelNode>asElement in class AbstractFormItem<org.jboss.hal.dmr.ModelNode>public void attach()
AbstractFormItemSuggestHandler.attach() in case there was one registered. If you override this method, please
call super.attach() to keep this behaviour.attach in interface Attachableattach in class AbstractFormItem<org.jboss.hal.dmr.ModelNode>public void detach()
detach in interface Attachabledetach in class AbstractFormItem<org.jboss.hal.dmr.ModelNode>public org.jboss.hal.dmr.ModelNode getValue()
getValue in interface com.google.gwt.user.client.TakesValue<org.jboss.hal.dmr.ModelNode>getValue in interface com.google.gwt.user.client.ui.HasValue<org.jboss.hal.dmr.ModelNode>getValue in class AbstractFormItem<org.jboss.hal.dmr.ModelNode>public void setValue(org.jboss.hal.dmr.ModelNode value,
boolean fireEvent)
AbstractFormItemnull.
Does not touch the modified and undefined flags. Should be called from business code like form
mapping.setValue in interface com.google.gwt.user.client.ui.HasValue<org.jboss.hal.dmr.ModelNode>setValue in class AbstractFormItem<org.jboss.hal.dmr.ModelNode>public com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<org.jboss.hal.dmr.ModelNode> valueChangeHandler)
addValueChangeHandler in interface com.google.gwt.event.logical.shared.HasValueChangeHandlers<org.jboss.hal.dmr.ModelNode>addValueChangeHandler in class AbstractFormItem<org.jboss.hal.dmr.ModelNode>public void clearValue()
AbstractFormItemnull, clears any error marker and
shows the default value (if any). Does not touch the modified and undefined flags. Should be
called from business code like form mapping.clearValue in interface FormItem<org.jboss.hal.dmr.ModelNode>clearValue in class AbstractFormItem<org.jboss.hal.dmr.ModelNode>public boolean isEmpty()
public String getId(Form.State state)
getId in interface FormItem<org.jboss.hal.dmr.ModelNode>getId in class AbstractFormItem<org.jboss.hal.dmr.ModelNode>public void setId(String id)
setId in interface FormItem<org.jboss.hal.dmr.ModelNode>setId in class AbstractFormItem<org.jboss.hal.dmr.ModelNode>public boolean supportsExpressions()
supportsExpressions in interface FormItem<org.jboss.hal.dmr.ModelNode>public void addValidationHandler(FormItemValidation<org.jboss.hal.dmr.ModelNode> validationHandler)
addValidationHandler in interface FormItem<org.jboss.hal.dmr.ModelNode>addValidationHandler in class AbstractFormItem<org.jboss.hal.dmr.ModelNode>public boolean validate()
validate in interface FormItem<org.jboss.hal.dmr.ModelNode>validate in class AbstractFormItem<org.jboss.hal.dmr.ModelNode>public void registerSuggestHandler(SuggestHandler suggestHandler)
registerSuggestHandler in interface FormItem<org.jboss.hal.dmr.ModelNode>registerSuggestHandler in class AbstractFormItem<org.jboss.hal.dmr.ModelNode>public boolean isRestricted()
isRestricted in interface FormItem<org.jboss.hal.dmr.ModelNode>isRestricted in class AbstractFormItem<org.jboss.hal.dmr.ModelNode>public void setRestricted(boolean restricted)
setRestricted in interface FormItem<org.jboss.hal.dmr.ModelNode>setRestricted in class AbstractFormItem<org.jboss.hal.dmr.ModelNode>public boolean isEnabled()
isEnabled in interface com.google.gwt.user.client.ui.HasEnabledisEnabled in class AbstractFormItem<org.jboss.hal.dmr.ModelNode>public void setEnabled(boolean enabled)
setEnabled in interface com.google.gwt.user.client.ui.HasEnabledsetEnabled in class AbstractFormItem<org.jboss.hal.dmr.ModelNode>public int getTabIndex()
getTabIndex in interface com.google.gwt.user.client.ui.FocusablegetTabIndex in class AbstractFormItem<org.jboss.hal.dmr.ModelNode>public void setTabIndex(int index)
setTabIndex in interface com.google.gwt.user.client.ui.FocusablesetTabIndex in class AbstractFormItem<org.jboss.hal.dmr.ModelNode>public void setFocus(boolean focus)
setFocus in interface com.google.gwt.user.client.ui.FocusablesetFocus in class AbstractFormItem<org.jboss.hal.dmr.ModelNode>public boolean isRequired()
isRequired in interface FormItem<org.jboss.hal.dmr.ModelNode>isRequired in class AbstractFormItem<org.jboss.hal.dmr.ModelNode>public void setRequired(boolean required)
setRequired in interface FormItem<org.jboss.hal.dmr.ModelNode>setRequired in class AbstractFormItem<org.jboss.hal.dmr.ModelNode>public void setUndefined(boolean undefined)
setUndefined in interface FormItem<org.jboss.hal.dmr.ModelNode>setUndefined in class AbstractFormItem<org.jboss.hal.dmr.ModelNode>Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.