java - onSelectionChanged wont work -
i use wicket , have created list choice , overriden onselectionchanged:
listchoice<string> hotellist = new listchoice<string>("hotel", new propertymodel<string>(this, "selectedhotel"), hotellabels) { @override protected void onselectionchanged(string newselection) { super.onselectionchanged(newselection); system.out.print("tesy"); } };
but did not work - program never fires method. not want use onsubmit handle this. need action when clicked smth on list.
how in wicket?
final listchoice<string> hotellist = new listchoice<string>("hotel", new propertymodel<string>(this, "selectedhotel"), hotellabels); hotellist.add(new ajaxformcomponentupdatingbehavior("onchange") { protected void onupdate(ajaxrequesttarget target) { system.out.print(hotellist.getmodel().getobject()); } }); hotellist.setoutputmarkupid(true);
Comments
Post a Comment