You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Chris Colman <ch...@stepaheadsoftware.com> on 2010/11/08 12:25:38 UTC

Still getting 'Could not find form parent' with 1.4.13 with message box on form validation

I show a message box via the Form.onError override and this works once
but when the user hits ok and then submit again we get the following
error:
 
It looks like there was a similar bug fixed in 1.4.13 but I still see
this error with 1.4.13.
WicketMessage: Could not find Form parent for [MarkupContainer
[Component id = okBtn]]
Root cause:
org.apache.wicket.WicketRuntimeException: Could not find Form parent for
[MarkupContainer [Component id = okBtn]]
     at
org.apache.wicket.markup.html.form.FormComponent.getForm(FormComponent.j
ava:737)
     at
org.apache.wicket.markup.html.form.Form$2.component(Form.java:611)
     at
org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:899
)
     at
org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:914
)
     at
org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:914
)
     at
org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:914
)
     at
org.apache.wicket.markup.html.form.Form.findSubmittingButton(Form.java:6
04)
     at
org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:899)
     at
org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmi
tBehavior.java:135)
     at
org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:
177)
     at
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDef
aultAjaxBehavior.java:300)
     at
org.apache.wicket.request.target.component.listener.BehaviorRequestTarge
t.processEvents(BehaviorRequestTarget.java:142)
     at
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(Ab
stractRequestCycleProcessor.java:92)
     at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java
:1250)
     at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
     at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
     at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
     at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484
)
     at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:
317)

RE: Still getting 'Could not find form parent' with 1.4.13 with message box on form validation

Posted by Chris Colman <ch...@stepaheadsoftware.com>.
Hi Igor,

Sorry about that description. I've created a generic MessageBox class using ModalWindow that I use to pop up messages to the user whenever I need to. In this particular case I'm popping it up when a form experiences a validation error: and onError is called.

It works really well the first time there is an error but after closing the MessageBox (ModalWindow) and then submitting the form again, still with invalid data, the okBtn's form parent can't be found for some reason.

At first I thought it might be related to and possibly fixed by

https://issues.apache.org/jira/browse/WICKET-3087

but the problem still occurs with 1.4.13.

I will attempt to cut down the code into a quickstart to reproduce it more easily.

Regards,
Chris


>-----Original Message-----
>From: Igor Vaynberg [mailto:igor.vaynberg@gmail.com]
>Sent: Tuesday, 9 November 2010 3:38 AM
>To: users@wicket.apache.org
>Subject: Re: Still getting 'Could not find form parent' with 1.4.13 with
>message box on form validation
>
>wicket doesnt have a "message box" so im not sure what you are talking
>about. i can also produce the stacktrace you have shown in at least 30
>different ways. so, how about showing some actual code so we can
>actually help you? :)
>
>-igor
>
>On Mon, Nov 8, 2010 at 3:25 AM, Chris Colman
><ch...@stepaheadsoftware.com> wrote:
>> I show a message box via the Form.onError override and this works once
>> but when the user hits ok and then submit again we get the following
>> error:
>>
>> It looks like there was a similar bug fixed in 1.4.13 but I still see
>> this error with 1.4.13.
>> WicketMessage: Could not find Form parent for [MarkupContainer
>> [Component id = okBtn]]
>> Root cause:
>> org.apache.wicket.WicketRuntimeException: Could not find Form parent for
>> [MarkupContainer [Component id = okBtn]]
>>     at
>> org.apache.wicket.markup.html.form.FormComponent.getForm(FormComponent.j
>> ava:737)
>>     at
>> org.apache.wicket.markup.html.form.Form$2.component(Form.java:611)
>>     at
>> org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:899
>> )
>>     at
>> org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:914
>> )
>>     at
>> org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:914
>> )
>>     at
>> org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:914
>> )
>>     at
>> org.apache.wicket.markup.html.form.Form.findSubmittingButton(Form.java:6
>> 04)
>>     at
>> org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:899)
>>     at
>> org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmi
>> tBehavior.java:135)
>>     at
>> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:
>> 177)
>>     at
>> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDef
>> aultAjaxBehavior.java:300)
>>     at
>> org.apache.wicket.request.target.component.listener.BehaviorRequestTarge
>> t.processEvents(BehaviorRequestTarget.java:142)
>>     at
>> org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(Ab
>> stractRequestCycleProcessor.java:92)
>>     at
>> org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java
>> :1250)
>>     at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
>>     at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
>>     at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
>>     at
>> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484
>> )
>>     at
>> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:
>> 317)
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>For additional commands, e-mail: users-help@wicket.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Still getting 'Could not find form parent' with 1.4.13 with message box on form validation

Posted by Igor Vaynberg <ig...@gmail.com>.
wicket doesnt have a "message box" so im not sure what you are talking
about. i can also produce the stacktrace you have shown in at least 30
different ways. so, how about showing some actual code so we can
actually help you? :)

-igor

On Mon, Nov 8, 2010 at 3:25 AM, Chris Colman
<ch...@stepaheadsoftware.com> wrote:
> I show a message box via the Form.onError override and this works once
> but when the user hits ok and then submit again we get the following
> error:
>
> It looks like there was a similar bug fixed in 1.4.13 but I still see
> this error with 1.4.13.
> WicketMessage: Could not find Form parent for [MarkupContainer
> [Component id = okBtn]]
> Root cause:
> org.apache.wicket.WicketRuntimeException: Could not find Form parent for
> [MarkupContainer [Component id = okBtn]]
>     at
> org.apache.wicket.markup.html.form.FormComponent.getForm(FormComponent.j
> ava:737)
>     at
> org.apache.wicket.markup.html.form.Form$2.component(Form.java:611)
>     at
> org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:899
> )
>     at
> org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:914
> )
>     at
> org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:914
> )
>     at
> org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:914
> )
>     at
> org.apache.wicket.markup.html.form.Form.findSubmittingButton(Form.java:6
> 04)
>     at
> org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:899)
>     at
> org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmi
> tBehavior.java:135)
>     at
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:
> 177)
>     at
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDef
> aultAjaxBehavior.java:300)
>     at
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarge
> t.processEvents(BehaviorRequestTarget.java:142)
>     at
> org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(Ab
> stractRequestCycleProcessor.java:92)
>     at
> org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java
> :1250)
>     at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
>     at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
>     at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
>     at
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484
> )
>     at
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:
> 317)
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org