How do you put a function call to the java.util.Properties' onIncrement
,
onDecrement
, afterUpdate
or onStop
property of WicketStuff's Spinner configure method? I tried the following but the function is not called:
TextField<String> textField = new TextField<String>("textField ", new Model<String>("0"));
textField.add(new Spinner() {
@Override
protected void configure(Properties p) {
super.configure(p);
p.put("afterUpdate", "foo()");
}
});
void fun() {
System.out.println("Hello world!");
}
The Javadoc for these properties is:
onIncrement Function to call after incrementing
onDecrement Function to call after decrementing
afterUpdate Function to call after update of the value
onStop Function to call on click or mouseup (default=false)
Note that when setting other properties everything works fine.