Package com.onec.ui
Class InputSpec
java.lang.Object
com.onec.ui.InputSpec
Declares custom input fields for an entity's list toolbar, from
EntityView.inputs(InputSpec).
An input sits in the toolbar next to the custom action buttons. It doesn't filter the list on
its own — instead its current value is handed to the ActionSpec handlers via
ActionContext.input(String) when a button is clicked. So you might add an "As of" date and
a "Reason" text field, then a "Generate report" button whose handler reads both.
public void inputs(InputSpec in) {
in.input("asOf").label("As of").type(InputType.DATE);
in.input("currency").label("Currency").type(InputType.SELECT).options("USD", "EUR").value("USD");
in.input("reason").label("Reason").type(InputType.TEXT).placeholder("optional");
}
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classFluent builder for one input; setters may be called in any order.static final recordA resolved toolbar input field. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionStart declaring an input with the given unique key (how the handler reads its value).inputs()
-
Constructor Details
-
InputSpec
public InputSpec()
-
-
Method Details
-
input
Start declaring an input with the given unique key (how the handler reads its value). -
inputs
-