@JsType(namespace="hal.ui",
name="TableBuilder")
public static class ModelNodeTable.Builder<T extends ModelNode>
extends GenericOptionsBuilder<ModelNodeTable.Builder<T>,T>
| Modifier and Type | Class and Description |
|---|---|
static interface |
ModelNodeTable.Builder.JsNameFunction<T> |
| Modifier and Type | Method and Description |
|---|---|
ModelNodeTable<T> |
build()
Creates and returns the table.
|
ModelNodeTable.Builder<T> |
column(String attribute)
Adds a column which maps to the specified attribute.
|
ModelNodeTable.Builder<T> |
columns(Iterable<String> attributes) |
ModelNodeTable.Builder<T> |
columns(String first,
String... rest) |
ModelNodeTable.Builder<T> |
jsAdd(String type,
Object template,
String[] attributes,
CrudOperations.AddCallback callback)
Adds a button to add a new resource.
|
ModelNodeTable.Builder<T> |
jsButton(String text,
String scope,
ButtonHandler<T> handler)
Add a button which executes the specified callback.
|
ModelNodeTable.Builder<T> |
jsColumns(String[] columns)
Adds columns for the specified attributes.
|
ModelNodeTable.Builder<T> |
jsRemove(String type,
Object template,
ModelNodeTable.Builder.JsNameFunction<T> name,
JsCallback callback)
Adds a button to remove the selected resource.
|
protected ModelNodeTable.Builder<T> |
that()
In order to make builders work with inheritance, sub-builders must return a reference to their instance.
|
protected void |
validate() |
@JsIgnore public ModelNodeTable.Builder<T> columns(@NonNls String first, @NonNls String... rest)
@JsIgnore public ModelNodeTable.Builder<T> columns(Iterable<String> attributes)
public ModelNodeTable.Builder<T> column(@NonNls String attribute)
protected ModelNodeTable.Builder<T> that()
GenericOptionsBuilderthat in class GenericOptionsBuilder<ModelNodeTable.Builder<T extends ModelNode>,T extends ModelNode>thisprotected void validate()
validate in class GenericOptionsBuilder<ModelNodeTable.Builder<T extends ModelNode>,T extends ModelNode>public ModelNodeTable<T> build()
@JsMethod(name="add") public ModelNodeTable.Builder<T> jsAdd(String type, Object template, String[] attributes, CrudOperations.AddCallback callback)
type - The human readable resource type used in the dialog header and success message.template - The address template for the add operation. Must end in <resource
type>=<resource
name>.attributes - attributes which should be part of the add resource dialogcallback - the callback executed after the resource has been added@JsMethod(name="remove") public ModelNodeTable.Builder<T> jsRemove(String type, Object template, ModelNodeTable.Builder.JsNameFunction<T> name, JsCallback callback)
type - The human readable resource type used in the success message.template - The address template for the add operation. Must end in <resource
type>=<resourcename - A function to get the name of the selected resource.callback - The callback executed after the resource has been removed.@JsMethod(name="button") public ModelNodeTable.Builder<T> jsButton(String text, String scope, ButtonHandler<T> handler)
text - The text on the buttonscope - The scope: "selected" or "selectedSingle"handler - The callback to execute when the button is clicked@JsMethod(name="columns") public ModelNodeTable.Builder<T> jsColumns(String[] columns)
columns - The attributesCopyright © 2018 JBoss, a division of Red Hat. All rights reserved.