Let me guess .. you need the form to create a AjaxSubmitLink instance. But the #findParent(Form.class) will return null until the component hierarchy is constructed, being so you cannot invoke it at component construction-time.
A possible workaround is to postpone the findParent(Form.class) method invocation instantiating a the AjaxSubmitLink using a form proxy. I've hacked this writing a custom AjaxFormSubmitBehavior that does not require the form instance on its constructor but just discover it - invoking #findParent(Form.class) method - when is required. Me fate sempre lavora.. ;) P On Jan 4, 2008 12:43 PM, Fabio Fioretti <[EMAIL PROTECTED]> wrote: > First of all, many compliments for the great Wicket 1.3 release: we're > looking forward to port our application to the new cool version! > > How can I get the Wizard's form from inside a WizardStep? I need it to > trigger an AjaxSubmitLink which should update a part of my model while > remaining inside that step. What leaves me clueless is the fact that > WizardStep instances are added to the WizardModel instead of the > Wizard, so doing something like this from inside the WizardStep: > > Form form = (Form)WizardStep.this.findParent(Form.class); > > seems to return null; moreover, this makes me wonder how the same > instruction inside WizardStep.AddFormValidatorAction.execute() can > succeed. > > I'm sure I'm missing something really stupid. Please forgive me. :-) > > > Thanks a lot, > > Fabio Fioretti - WindoM > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
