I created a simple page with a DateField and an
AjaxFormComponentUpdatingBehavior where I want to read the model. The
following code does work in Wicket 1.4.16 (prints the selected date), but
does not in Wicket 1.5.5 (prints null):
public class DatePage extends WebPage {
private Date date;
public DatePage() {
super();
final DateField txtDate = new DateField("txtDate", new
PropertyModel(this,
"date")) {
@Override
protected DateTextField
newDateTextField(java.lang.String id,
PropertyModel dateFieldModel) {
DateTextField f = super.newDateTextField(id,
dateFieldModel);
f.add(createAjaxBehavior());
return f;
}
};
add(txtDate);
}
private AjaxFormComponentUpdatingBehavior createAjaxBehavior() {
return new AjaxFormComponentUpdatingBehavior("onchange") {
@Override
protected void onUpdate(AjaxRequestTarget target) {
System.out.println("*** date=" + date);
}
};
}
}
Does anyone know something about this?
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/DateField-and-AjaxFormComponentUpdatingBehavior-in-wicket-1-5-5-tp4551607p4551607.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]