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

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -