see here
https://issues.apache.org/jira/browse/WICKET-461
-igor
On 4/17/07, john mattucci [EMAIL PROTECTED] wrote:
I'm using an AjaxFormSubmitBehavior to render a little indicator on the
ongoing Ajax request which gets triggered
when the user clicks on the AjaxSubmitButton. The only problem is that the form
is getting sumitted prior to showing
the results ignoring ajax. If I remove the AjaxFormSubmitBehavior it works
fine. The onSubmit of the AjaxSubmitButton is never called.
By the time the onSubmit of
AjaxFormSubmitBehavior is called the form has already been submitted. How
would I go about fixing this?
Thank you for your time
*public*
LookupEmployeeForm(String id, IModel model) {
*super*(id, model);
add(
*new* TextField(cn));
add(
imgContainer);
add(
ajaxButton = *new* AjaxSubmitButton(ajaxLDAPSearch, *this*) {
*protected* *void* onSubmit(AjaxRequestTarget target, Form form) {
System.*out*.println(This never gets called);
}
});
ajaxButton.add(*new* AjaxFormSubmitIndicator());
}
*private* *class* AjaxFormSubmitIndicator *extends* AjaxFormSubmitBehavior
*implements* IAjaxIndicatorAware {
*public* AjaxFormSubmitIndicator() {
*super*(LookupEmployeeForm.*this*, onclick);
}
*public* String getAjaxIndicatorMarkupId() {
*return* imgContainer.getMarkupId();
}
@Override
*protected* *void* onSubmit(AjaxRequestTarget target) {
ListLDAPUser list =
ldapDao.getSearchResults((LDAPUser)employeeForm.getModelObject());
ldapUserDB.setUsers(list);
target.addComponent(
ajaxTable);
target.addComponent(
imgContainer);
System.
*out*.println(This gets called);
}
}
--
Live U's list of the best places to Eat, Study
Partyhttp://g.msn.com/8HMAENCA/2743??PS=47575
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user