Package com.onec.ui

Class InputSpec

java.lang.Object
com.onec.ui.InputSpec

public final class InputSpec extends Object
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");
 }
 
  • Constructor Details

    • InputSpec

      public InputSpec()
  • Method Details