The component links above are in SimpleTogglePanelsPressing CTRL-SHIFT-L at any time will bring up the Ajax Log (a4j:log component) | InputDescriptionThe PureInput is a standard input component, This demonstration is not using ajax.
Binding to attributes can be done in two ways: - using
PureEditableValue class. - using an object and attribute name
DemoSource
private PureEditableValue<String> name = new PureEditableValue<String>("");
private int number;
public PureComponent createDemoView() {
PurePanelGrid panel = new PurePanelGrid(2);
panel.add(new PureOutput("String input with <code>PureEditableValue</code>"));
panel.add(new PureInput(name));
panel.add(new PureOutput("int input with value binding"));
panel.add(new PureInput(this, "number"));
panel.add(new PureButton("Show input values", this, "logClick"));
panel.add(new PureOutput("String value=" + name.getValue() + ", int value=" + number));
return panel;
}
public void logClick() {
log.info("update");
}
public int getNumber() {
return number;
}
public void setNumber(int number) {
this.number = number;
}
. |