@JsType(namespace="hal.ui",
name="FormBuilder")
public static class ModelNodeForm.Builder<T extends ModelNode>
extends Object
"storage" => "configuration".| Modifier and Type | Method and Description |
|---|---|
ModelNodeForm.Builder<T> |
addOnly()
Use this flag if you just want to use the form to add model nodes.
|
ModelNodeForm<T> |
build()
Creates and returns the form.
|
ModelNodeForm.Builder<T> |
customFormItem(String attribute,
FormItemProvider provider) |
ModelNodeForm.Builder<T> |
exclude(Iterable<String> attributes) |
ModelNodeForm.Builder<T> |
exclude(String[] attributes) |
ModelNodeForm.Builder<T> |
exclude(String first,
String... rest) |
ModelNodeForm.Builder<T> |
fromRequestProperties()
Use this flag if you just want to use the form to add model nodes.
|
ModelNodeForm.Builder<T> |
include(Iterable<String> attributes) |
ModelNodeForm.Builder<T> |
include(String[] attributes) |
ModelNodeForm.Builder<T> |
include(String first,
String... rest) |
ModelNodeForm.Builder<T> |
includeRuntime()
Includes also attributes with
"storage" => "runtime" |
ModelNodeForm.Builder<T> |
jsExclude(String[] attributes)
Excludes the specified attributes
|
ModelNodeForm.Builder<T> |
jsInclude(String[] attributes)
Includes the specified attributes
|
ModelNodeForm.Builder<T> |
jsOnSave(org.jboss.hal.core.mbui.form.ModelNodeForm.Builder.JsSaveCallback<T> callback)
Calls the specified callback when the save button was clicked and no validation errors occurred.
|
ModelNodeForm.Builder<T> |
onCancel(Form.CancelCallback<T> cancelCallback) |
ModelNodeForm.Builder<T> |
onSave(Form.SaveCallback<T> saveCallback) |
ModelNodeForm.Builder<T> |
panelForOptionalAttributes()
By default the non-requried attributes are displayed together with the required attributes.
|
ModelNodeForm.Builder<T> |
prepareRemove(Form.PrepareRemove<T> removeCallback) |
ModelNodeForm.Builder<T> |
prepareReset(Form.PrepareReset<T> prepareReset) |
ModelNodeForm.Builder<T> |
readOnly()
Makes the form read-only.
|
ModelNodeForm.Builder<T> |
requiredOnly()
Includes only required attributes
|
ModelNodeForm.Builder<T> |
showDeprecated()
Includes also deprecated attributes
|
ModelNodeForm.Builder<T> |
singleton(Supplier<Operation> ping,
Callback addAction)
Use this method if you want to manage a singleton resource.
|
ModelNodeForm.Builder<T> |
singleton(Supplier<Operation> ping,
EmptyState emptyState)
Use this method if you want to manage a singleton resource.
|
ModelNodeForm.Builder<T> |
unboundFormItem(FormItem formItem) |
ModelNodeForm.Builder<T> |
unboundFormItem(FormItem formItem,
int position) |
ModelNodeForm.Builder<T> |
unboundFormItem(FormItem formItem,
int position,
com.google.gwt.safehtml.shared.SafeHtml helpText) |
ModelNodeForm.Builder<T> |
unsorted()
Doesn't sort the attributes alphabetically.
|
@JsIgnore public ModelNodeForm.Builder<T> include(String[] attributes)
@JsIgnore public ModelNodeForm.Builder<T> include(Iterable<String> attributes)
@JsIgnore public ModelNodeForm.Builder<T> include(@NonNls String first, @NonNls String... rest)
@JsIgnore public ModelNodeForm.Builder<T> exclude(String[] attributes)
@JsIgnore public ModelNodeForm.Builder<T> exclude(Iterable<String> attributes)
@JsIgnore public ModelNodeForm.Builder<T> exclude(@NonNls String first, @NonNls String... rest)
public ModelNodeForm.Builder<T> addOnly()
public ModelNodeForm.Builder<T> fromRequestProperties()
public ModelNodeForm.Builder<T> readOnly()
public ModelNodeForm.Builder<T> unsorted()
public ModelNodeForm.Builder<T> requiredOnly()
public ModelNodeForm.Builder<T> includeRuntime()
"storage" => "runtime"public ModelNodeForm.Builder<T> showDeprecated()
@JsIgnore public ModelNodeForm.Builder<T> singleton(Supplier<Operation> ping, Callback addAction)
SingletonStateMachine.
The specified operation is used to check whether the resource exists.
If the resource does not exist, a default empty state is displayed. The empty state will contain a button which will trigger the specified add action.
@JsIgnore public ModelNodeForm.Builder<T> singleton(Supplier<Operation> ping, EmptyState emptyState)
SingletonStateMachine.
The specified operation is used to check whether the resource exists.
If the resource does not exist, the specified empty state is displayed. The empty state must have a button which triggers the creation of the singleton resource.
Please make sure that the primary action of the empty state has a constraint attached to it.
@JsIgnore public ModelNodeForm.Builder<T> customFormItem(@NonNls String attribute, FormItemProvider provider)
@JsIgnore public ModelNodeForm.Builder<T> unboundFormItem(FormItem formItem)
@JsIgnore public ModelNodeForm.Builder<T> unboundFormItem(FormItem formItem, int position)
@JsIgnore public ModelNodeForm.Builder<T> unboundFormItem(FormItem formItem, int position, com.google.gwt.safehtml.shared.SafeHtml helpText)
@JsIgnore public ModelNodeForm.Builder<T> onSave(Form.SaveCallback<T> saveCallback)
@JsIgnore public ModelNodeForm.Builder<T> onCancel(Form.CancelCallback<T> cancelCallback)
@JsIgnore public ModelNodeForm.Builder<T> prepareReset(Form.PrepareReset<T> prepareReset)
@JsIgnore public ModelNodeForm.Builder<T> prepareRemove(Form.PrepareRemove<T> removeCallback)
@JsIgnore public ModelNodeForm.Builder<T> panelForOptionalAttributes()
public ModelNodeForm<T> build()
@JsMethod(name="include") public ModelNodeForm.Builder<T> jsInclude(String[] attributes)
@JsMethod(name="exclude") public ModelNodeForm.Builder<T> jsExclude(String[] attributes)
@JsMethod(name="onSave") public ModelNodeForm.Builder<T> jsOnSave(org.jboss.hal.core.mbui.form.ModelNodeForm.Builder.JsSaveCallback<T> callback)
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.