Re: EqualInputValidator inside WizardStep
On 10/29/07, Igor Vaynberg [EMAIL PROTECTED] wrote: hrm, i think a good solution to this would be to create a fresh inner form for every new step. so the outer form contains the wizard buttons, and an inner form contains the user's panel. i think for now you can do that yourself, simply embed a form into your step's panel and add the validator to that, be sure to let us know if that works. eelco what do you think? That's not a bad idea. You could also directly get the form by calling getForm or by overriding newForm on the wizard class. But nested forms like this has it's elegance... just never though of it before. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EqualInputValidator inside WizardStep
hrm, i think a good solution to this would be to create a fresh inner form for every new step. so the outer form contains the wizard buttons, and an inner form contains the user's panel. i think for now you can do that yourself, simply embed a form into your step's panel and add the validator to that, be sure to let us know if that works. eelco what do you think? -igor On 10/29/07, Daniel Kröger [EMAIL PROTECTED] wrote: Hi, I need to check two TextFields for equality within a WizardStep, so i added an EqualInputValidator to the Wizard's form inside the onBeforeRender() method of the WizardStep: protected void onBeforeRender() { super.onBeforeRender(); final Form form = ((Wizard) getModelObject()).getForm(); form.add(new EqualInputValidator(emailField, emailConfirmationField)); } I think this was the wrong approach because now every other WizardStep is complaining: IFormValidator in form `orderWizard:form` depends on a component that has been removed from the page or is no longer visible. Offending component id `order.customer.email`. What is the right way to use an EqualInputValidator inside a WizardStep? Thanks in advance for your help! Best regards Daniel - 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]
Re: EqualInputValidator inside WizardStep
Adding the validator to an embedded form worked! Thanks for your help, Igor! Daniel -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Monday, October 29, 2007 6:01 PM To: users@wicket.apache.org Subject: Re: EqualInputValidator inside WizardStep hrm, i think a good solution to this would be to create a fresh inner form for every new step. so the outer form contains the wizard buttons, and an inner form contains the user's panel. i think for now you can do that yourself, simply embed a form into your step's panel and add the validator to that, be sure to let us know if that works. eelco what do you think? -igor On 10/29/07, Daniel Kröger [EMAIL PROTECTED] wrote: Hi, I need to check two TextFields for equality within a WizardStep, so i added an EqualInputValidator to the Wizard's form inside the onBeforeRender() method of the WizardStep: protected void onBeforeRender() { super.onBeforeRender(); final Form form = ((Wizard) getModelObject()).getForm(); form.add(new EqualInputValidator(emailField, emailConfirmationField)); } I think this was the wrong approach because now every other WizardStep is complaining: IFormValidator in form `orderWizard:form` depends on a component that has been removed from the page or is no longer visible. Offending component id `order.customer.email`. What is the right way to use an EqualInputValidator inside a WizardStep? Thanks in advance for your help! Best regards Daniel - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]