Hi Dirk, on selecting your radio choice, do an ajax request and disable your inner Login Form depending on the chosen value.
In this case, it won't be part of the form submit, which is executed by the wizard next click. This also should happen after your login is done by your ajax button. After login succeeded, just disable the inner login form, and the user should be able to proceed. Patrick Health AG| Patrick Davids | Softwareentwickler Tel. +49 40 524 709-258 | [email protected] Fax +49 40 524 709-258 | www.healthag.de EOS Health IT-Concept GmbH | Lübeckertordamm 1–3 | 20099 Hamburg | GmbH mit Sitz in Hamburg HRB 127591, Amtsgericht Hamburg | Ust-IdNr.: DE289113521 | Geschäftsführer: Jens Törper, Uwe Schäfer Save a tree – think before you print. -----Ursprüngliche Nachricht----- Von: Dirk Forchel [mailto:[email protected]] Gesendet: Donnerstag, 16. November 2017 18:19 An: [email protected] Betreff: Nested forms in WizardStep Currently we use the Wizard/WizardStep classes from wicket-extensions to set required data for an object (in our case a checkout process with some user Information, e.g. addresses etc.). The first step contains a Login form with two "required" input components for the credentials and a separate "Login" button and a Panel with two ratio buttons where the user must decide whether to go on without login (anonymous) or to register a new user account. Only the values for the ratio buttons should be triggered by this step with the "next" button. The Login itself should be triggered with the additional "login" button which is not part of the ButtonBar. As far as I know it's not good to have nested forms. We don't need to have forms inside our steps actually, since the Wizard itself has a form already. I've noticed that if the user hits the "next" button, the form validation for the login form ist triggered as well, but it should not. The form processing for the login form should actually not part of step, but the "login container" must be part of the view. What is the best solution to implement this scenario? I implemented the step without an additional form component and used an AjaxButton. In AjaxButton#onSubmit I implemented the authentication stuff. But further on I got some problems with updating the current state and how to go on to the next step. Also I've noticed, that pressing the "next" button would require some input for the credentials. So I'm a bit confused now. I hope, I could express myself clearly. Could someone give me some hint? Thank you very much. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
