The problem came in wicket 1.4.2 and its connected with NullPointer
exception which came from wicket-ajax.js -> line 1133
Here is the code:
if (submitButton!=null) {
try {
var btn = document.createElement("<input type='hidden'
name='"+submitButton+"' id='"+iframe.id+"-btn'
value='1'/>");
} catch (ex) {
var btn = document.createElement("input");
btn.type="hidden";
btn.name=submitButton;
btn.id=iframe.id+"-btn";
btn.value="1";
}
}
form.appendChild(btn); <-- buggy line
This line should be inside the if (submitButton!=null) statement
because in my case submitButton is null. Why its null ? In
AjaxFormSubmitBehavior#getEventHandler() the submitButton is set only
when getComponent() instanceof IFormSubmittingComponent .
DropDownChoice is not an instace of IFormSubmittingComponent. Fast
workaround ? Just change IFormSubmittingComponent to FormComponent both
of them have key method #getInputName() (with the same logic, this also
should be changed i think :) )
Should i add a jira issue for that problem ?
Michał Letyński pisze:
Hi i have simple select with AjaxFormSubmitBehavior attached to it.
After changing selection i get:
Error:
Wicket.Ajax.Call.failure: Error while parsing response: Could not find
root <ajax-response> element
Is it a known problem ?
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]