You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Piller Sébastien <pi...@hmcrecord.ch> on 2008/05/08 09:41:47 UTC
Form doesn't fire onsubmit when nested in a wizard
Hello guys,
I have a problem with the wizard component in Wicket 1.3.1. I have a
user form panel, containing a form with several fields. I put it in a
wizard, and have the following problem:
FormUser
public class FormPerson extends Panel {
// ...
public FormPerson(String formid) {
super(formid);
name = new RequiredTextField("name");
firstname = new RequiredTextField("firstname");
address = new RequiredTextField("address");
zip = new RequiredTextField("zip");
city = new RequiredTextField("city");
....
form = new Form("formperson", new CompoundPropertyModel(xxx)) {
@Override
protected void onError() {
super.onError();
updateFieldsCssClasses();
System.out.println("ON ERROR");
}
@Override
public void onSubmit() {
super.onSubmit();
System.out.println("on submit : " + src.getFirstname());
}
};
add(form);
Now I put it in a Wizard component
- When there are errors on that form and I click the "next" button,
the method onError get correctly called
- When there are no errors and I click "next", the method onSubmit get
not called
Have you any idea on what's going wrong?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Form doesn't fire onsubmit when nested in a wizard
Posted by Per Newgro <pe...@gmx.ch>.
Hello Piller Sébastien:
do you first generate some errors, press next (errors), fix them and then
press next again?
Maybe error messages will not be reset.
Cheers
Per
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org