I have defined a dropdown using the AjaxFormComponentUpdatingBehavior for the
onchange event.  When I look at the html generated, the Ajax call is
associated with both the onchange and the onblur events.  I would like the
call to be done only on the onchange event, not the onblur event.  Is there
a way to get Wicket to stop generating the onblur Ajax call?

Here is the code defining the dropdown:

endDateDropDown = new DropDownChoice<Date>("endDateDropDown", new
PropertyModel(viewHistoryCriteria, "endDate"),
ProcessDateContext.getSixtyDayRange());
endDateDropDown.add(new AjaxFormComponentUpdatingBehavior("onchange") {
        protected void onUpdate(AjaxRequestTarget target) {
                if (criteriaDropDown.isEnabled()) {
                        populateCriteriaDropdown(target);
                }
        }
});

Here is the html generated which contains both the onchange and onblue event
calls:

<select valign="top" wicket:id="endDateDropDown"
name="criteriaPanel:endDateDropDown" id="endDateDropDown" onchange="var
wcall=wicketAjaxPost('?wicket:interface=:1:historyForm:criteriaPanel:endDateDropDown::IBehaviorListener:0:',
wicketSerialize(Wicket.$('endDateDropDown')),null,null, function() {return
Wicket.$('endDateDropDown') != null;}.bind(this));" onblur="var
wcall=wicketSubmitFormById('historyFormc',
'?wicket:interface=:1:historyForm:criteriaPanel:endDateDropDown::IActivePageBehaviorListener:1:&amp;wicket:ignoreIfNotActive=true',
null,null,null, function() {return
Wicket.$$(this)&amp;&amp;Wicket.$$('historyFormc')}.bind(this));;">

Thanks for your help with this.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxFormComponentUpdatingBehavior-Question-tp2968982p2968982.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]

Reply via email to