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 2012/01/30 05:18:19 UTC

Strange form in a panel behaviour

I have a form in a panel inside the home page and all of its fields are
filled out with the correct values when the page is displayed. Obviously
being inside the form the Java object hierarchy matches the HTML
hierarchy.
 
However when you submit the form Wicket says:
 
Last cause: Could not find component
'body:_wicket_child2:_wicket_extend3:welcomePanel:loginForm' on page
'class com.sas.av.ui.wicket.templates.original.HomePage
 
How could the loginForm component be positioned correctly in the Java
component hierarchy when displaying but not when submitting?
 
Root cause:
org.apache.wicket.request.handler.ComponentNotFoundException: Could not
find component
'body:_wicket_child2:_wicket_extend3:welcomePanel:loginForm' on page
'class com.sas.av.ui.wicket.templates.original.HomePage
     at
org.apache.wicket.request.handler.PageAndComponentProvider.getComponent(
PageAndComponentProvider.java:181)
     at
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.getCom
ponent(ListenerInterfaceRequestHandler.java:92)
     at
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respon
d(ListenerInterfaceRequestHandler.java:239)
     at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(Req
uestCycle.java:781)
     at
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStac
k.java:64)
     at
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:2
55)
     at
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle
.java:212)
     at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(Req
uestCycle.java:283)
     at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter
.java:185)
     at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:
241)
     at
com.sas.av.ui.wicket.templates.original.MyWicketFilter.doFilter(Pagebloo
mFilter.java:96)
     at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:235)
     at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:206)
     at
com.sas.av.model.context.UrlRedirectorFilter.doFilter(UrlRedirectorFilte
r.java:77)
 
Using latest snapshot as of about 1 hour ago when I pull all changes on
wicket-1.5.x branch.
 
Yours sincerely,
 
Chris Colman
 
Pagebloom Team Leader,
Step Ahead Software

 
pagebloom - your business & your website growing together
 
Sydney: (+61 2) 9656 1278     Canberra: (+61 2) 6100 2120     
Email: chrisc@stepahead.com.au <ma...@stepahead.com.au> 
Website:
http://www.pagebloom.com <blocked::http://www.pagebloom.com/> 
http://develop.stepaheadsoftware.com
<blocked::http://develop.stepaheadsoftware.com/> 
 
 

Re: Strange form in a panel behaviour

Posted by Martin Grigorov <mg...@apache.org>.
On Mon, Jan 30, 2012 at 10:13 AM, Chris Colman
<ch...@stepaheadsoftware.com> wrote:
>>> Last cause: Could not find component
>>> 'body:_wicket_child2:_wicket_extend3:welcomePanel:loginForm' on page
>>> 'class com.sas.av.ui.wicket.templates.original.HomePage****
>
>>Do you do anything tricky related to the statelessness of the page
> together
>>with usage of onInitialize() ?
>>I remember such problems with stateless pages in 1.5 RCs but we solved
>>them. Maybe you found a new way to break it.
>
> I have set up the base class of all our pages to be a component
> resolver. It is responsible for resolving the welcomePanel above but the
> loginForm inside that panel is explicitly added i.e. not automatically
> resolved by the component resolver.
>
> Maybe it's because our pages all derive from a base class that defines
> <body> as a wicket component. Maybe after auto resolving things get
> added to the page itself instead of the body component - just throwing
> out random thoughts here ;)

Yes, I'd also bet the problem is related to the resolver.
If this is the case then we have to improve the error message too - it
should tell you which component exactly in this path is the missing
one.
A quickstart will make it easier to debug and fix.

>
> In terms of trickiness with statelessness we do this in App.init:
>
> // Turn off page versioning to make it like 1.4.x
> getRequestCycleSettings().setRenderStrategy(IRequestCycleSettings.Render
> Strategy.ONE_PASS_RENDER);
> getPageSettings().setVersionPagesByDefault(false);
>
>
> Regards,
> Chris
>
>
>>
>>> ****
>>>
>>> ** **
>>>
>>> Root cause:****
>>>
>>> org.apache.wicket.request.handler.ComponentNotFoundException: Could
> not
>>> find component
>>'body:_wicket_child2:_wicket_extend3:welcomePanel:loginForm'
>>> on page 'class com.sas.av.ui.wicket.templates.original.HomePage
>>>
>>atorg.apache.wicket.request.handler.PageAndComponentProvider.getCompone
> nt(P
>>ageAndComponentProvider.java:181)
>>>
>>atorg.apache.wicket.request.handler.ListenerInterfaceRequestHandler.get
> Comp
>>onent(ListenerInterfaceRequestHandler.java:92)
>>>
>>atorg.apache.wicket.request.handler.ListenerInterfaceRequestHandler.res
> pond
>>(ListenerInterfaceRequestHandler.java:239)
>>>
>>atorg.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(
> Requ
>>estCycle.java:781)
>>>      at org.apache.wicket.request.RequestHandlerStack.execute
>>> (RequestHandlerStack.java:64)
>>>      at org.apache.wicket.request.cycle.RequestCycle.execute
>>> (RequestCycle.java:255)
>>>      at org.apache.wicket.request.cycle.RequestCycle.processRequest
>>> (RequestCycle.java:212)
>>>
>>atorg.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(
> Requ
>>estCycle.java:283)
>>>      at org.apache.wicket.protocol.http.WicketFilter.processRequest
>>> (WicketFilter.java:185)
>>>      at org.apache.wicket.protocol.http.WicketFilter.doFilter
>>> (WicketFilter.java:241)
>>>      at
> com.sas.av.ui.wicket.templates.original.MyWicketFilter.doFilter
>>> (PagebloomFilter.java:96)
>>>      at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
>>> (ApplicationFilterChain.java:235)
>>>      at org.apache.catalina.core.ApplicationFilterChain.doFilter
>>> (ApplicationFilterChain.java:206)
>>>      at com.sas.av.model.context.UrlRedirectorFilter.doFilter
>>> (UrlRedirectorFilter.java:77)****
>>>
>>> ** **
>>>
>>> Using latest snapshot as of about 1 hour ago when I pull all changes
> on
>>> wicket-1.5.x branch.****
>>>
>>> ** **
>>>
>>> Yours sincerely,****
>>>
>>> ** **
>>>
>>> Chris Colman****
>>>
>>>  ****
>>>
>>> Pagebloom Team Leader,****
>>>
>>> Step Ahead Software
>>>
>>> ****
>>>
>>> pagebloom - your business & your website growing together****
>>>
>>> ** **
>>>
>>> **Sydney**: (+61 2) 9656 1278     ****Canberra****: (+61 2) 6100 2120
>>> ****
>>>
>>> Email: chrisc@stepahead.com.au <//...@stepahead.com.au>****
>>>
>>> Website:****
>>>
>>> http://www.pagebloom.com****
>>>
>>> http://develop.stepaheadsoftware.com****
>>>
>>>  ****
>>>
>>> ** **
>>>
>>
>>
>>
>>--
>>Martin Grigorov
>>jWeekend
>>Training, Consulting, Development
>>http://jWeekend.com <http://jweekend.com/>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


RE: Strange form in a panel behaviour

Posted by Chris Colman <ch...@stepaheadsoftware.com>.
>> Last cause: Could not find component 
>> 'body:_wicket_child2:_wicket_extend3:welcomePanel:loginForm' on page 
>> 'class com.sas.av.ui.wicket.templates.original.HomePage****

>Do you do anything tricky related to the statelessness of the page
together
>with usage of onInitialize() ?
>I remember such problems with stateless pages in 1.5 RCs but we solved
>them. Maybe you found a new way to break it.

I have set up the base class of all our pages to be a component
resolver. It is responsible for resolving the welcomePanel above but the
loginForm inside that panel is explicitly added i.e. not automatically
resolved by the component resolver.

Maybe it's because our pages all derive from a base class that defines
<body> as a wicket component. Maybe after auto resolving things get
added to the page itself instead of the body component - just throwing
out random thoughts here ;)

In terms of trickiness with statelessness we do this in App.init:

// Turn off page versioning to make it like 1.4.x
getRequestCycleSettings().setRenderStrategy(IRequestCycleSettings.Render
Strategy.ONE_PASS_RENDER);
getPageSettings().setVersionPagesByDefault(false);


Regards,
Chris


>
>> ****
>>
>> ** **
>>
>> Root cause:****
>>
>> org.apache.wicket.request.handler.ComponentNotFoundException: Could
not
>> find component
>'body:_wicket_child2:_wicket_extend3:welcomePanel:loginForm'
>> on page 'class com.sas.av.ui.wicket.templates.original.HomePage
>>
>atorg.apache.wicket.request.handler.PageAndComponentProvider.getCompone
nt(P
>ageAndComponentProvider.java:181)
>>
>atorg.apache.wicket.request.handler.ListenerInterfaceRequestHandler.get
Comp
>onent(ListenerInterfaceRequestHandler.java:92)
>>
>atorg.apache.wicket.request.handler.ListenerInterfaceRequestHandler.res
pond
>(ListenerInterfaceRequestHandler.java:239)
>>
>atorg.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(
Requ
>estCycle.java:781)
>>      at org.apache.wicket.request.RequestHandlerStack.execute
>> (RequestHandlerStack.java:64)
>>      at org.apache.wicket.request.cycle.RequestCycle.execute
>> (RequestCycle.java:255)
>>      at org.apache.wicket.request.cycle.RequestCycle.processRequest
>> (RequestCycle.java:212)
>>
>atorg.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(
Requ
>estCycle.java:283)
>>      at org.apache.wicket.protocol.http.WicketFilter.processRequest
>> (WicketFilter.java:185)
>>      at org.apache.wicket.protocol.http.WicketFilter.doFilter
>> (WicketFilter.java:241)
>>      at
com.sas.av.ui.wicket.templates.original.MyWicketFilter.doFilter
>> (PagebloomFilter.java:96)
>>      at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
>> (ApplicationFilterChain.java:235)
>>      at org.apache.catalina.core.ApplicationFilterChain.doFilter
>> (ApplicationFilterChain.java:206)
>>      at com.sas.av.model.context.UrlRedirectorFilter.doFilter
>> (UrlRedirectorFilter.java:77)****
>>
>> ** **
>>
>> Using latest snapshot as of about 1 hour ago when I pull all changes
on
>> wicket-1.5.x branch.****
>>
>> ** **
>>
>> Yours sincerely,****
>>
>> ** **
>>
>> Chris Colman****
>>
>>  ****
>>
>> Pagebloom Team Leader,****
>>
>> Step Ahead Software
>>
>> ****
>>
>> pagebloom - your business & your website growing together****
>>
>> ** **
>>
>> **Sydney**: (+61 2) 9656 1278     ****Canberra****: (+61 2) 6100 2120
>> ****
>>
>> Email: chrisc@stepahead.com.au <//...@stepahead.com.au>****
>>
>> Website:****
>>
>> http://www.pagebloom.com****
>>
>> http://develop.stepaheadsoftware.com****
>>
>>  ****
>>
>> ** **
>>
>
>
>
>--
>Martin Grigorov
>jWeekend
>Training, Consulting, Development
>http://jWeekend.com <http://jweekend.com/>

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


Re: Strange form in a panel behaviour

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

On Mon, Jan 30, 2012 at 6:18 AM, Chris Colman
<ch...@stepaheadsoftware.com>wrote:

> ** **
>
> I have a form in a panel inside the home page and all of its fields are
> filled out with the correct values when the page is displayed. Obviously
> being inside the form the Java object hierarchy matches the HTML hierarchy.
> ****
>
> ** **
>
> However when you submit the form Wicket says:****
>
> ** **
>
> Last cause: Could not find component 'body:_wicket_child2:_wicket_extend3:welcomePanel:loginForm' on page 'class com.sas.av.ui.wicket.templates.original.HomePage****
>
> ** **
>
> How could the loginForm component be positioned correctly in the Java
> component hierarchy when displaying but not when submitting?
>

Do you do anything tricky related to the statelessness of the page together
with usage of onInitialize() ?
I remember such problems with stateless pages in 1.5 RCs but we solved
them. Maybe you found a new way to break it.


> ****
>
> ** **
>
> Root cause:****
>
> org.apache.wicket.request.handler.ComponentNotFoundException: Could not
> find component 'body:_wicket_child2:_wicket_extend3:welcomePanel:loginForm'
> on page 'class com.sas.av.ui.wicket.templates.original.HomePage
>      atorg.apache.wicket.request.handler.PageAndComponentProvider.getComponent(PageAndComponentProvider.java:181)
>      atorg.apache.wicket.request.handler.ListenerInterfaceRequestHandler.getComponent(ListenerInterfaceRequestHandler.java:92)
>      atorg.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:239)
>      atorg.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:781)
>      at org.apache.wicket.request.RequestHandlerStack.execute
> (RequestHandlerStack.java:64)
>      at org.apache.wicket.request.cycle.RequestCycle.execute
> (RequestCycle.java:255)
>      at org.apache.wicket.request.cycle.RequestCycle.processRequest
> (RequestCycle.java:212)
>      atorg.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
>      at org.apache.wicket.protocol.http.WicketFilter.processRequest
> (WicketFilter.java:185)
>      at org.apache.wicket.protocol.http.WicketFilter.doFilter
> (WicketFilter.java:241)
>      at com.sas.av.ui.wicket.templates.original.MyWicketFilter.doFilter
> (PagebloomFilter.java:96)
>      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> (ApplicationFilterChain.java:235)
>      at org.apache.catalina.core.ApplicationFilterChain.doFilter
> (ApplicationFilterChain.java:206)
>      at com.sas.av.model.context.UrlRedirectorFilter.doFilter
> (UrlRedirectorFilter.java:77)****
>
> ** **
>
> Using latest snapshot as of about 1 hour ago when I pull all changes on
> wicket-1.5.x branch.****
>
> ** **
>
> Yours sincerely,****
>
> ** **
>
> Chris Colman****
>
>  ****
>
> Pagebloom Team Leader,****
>
> Step Ahead Software
>
> ****
>
> pagebloom - your business & your website growing together****
>
> ** **
>
> **Sydney**: (+61 2) 9656 1278     ****Canberra****: (+61 2) 6100 2120
> ****
>
> Email: chrisc@stepahead.com.au <//...@stepahead.com.au>****
>
> Website:****
>
> http://www.pagebloom.com****
>
> http://develop.stepaheadsoftware.com****
>
>  ****
>
> ** **
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

RE: Strange form in a panel behaviour

Posted by Chris Colman <ch...@stepaheadsoftware.com>.
I just added a quickstart and JIRA-4373.

It definitely is related to the use of an IComponentResolver. If the
panel containing the form is added explicitly the problem does not
occur.

>-----Original Message-----
>From: Igor Vaynberg [mailto:igor.vaynberg@gmail.com]
>Sent: Monday, 30 January 2012 3:29 PM
>To: users@wicket.apache.org
>Subject: Re: Strange form in a panel behaviour
>
>quickstart?
>
>-igor
>
>On Sun, Jan 29, 2012 at 8:18 PM, Chris Colman
><ch...@stepaheadsoftware.com>wrote:
>
>> ** **
>>
>> I have a form in a panel inside the home page and all of its fields
are
>> filled out with the correct values when the page is displayed.
Obviously
>> being inside the form the Java object hierarchy matches the HTML
>hierarchy.
>> ****
>>
>> ** **
>>
>> However when you submit the form Wicket says:****
>>
>> ** **
>>
>> Last cause: Could not find component
>'body:_wicket_child2:_wicket_extend3:welcomePanel:loginForm' on page
'class
>com.sas.av.ui.wicket.templates.original.HomePage****
>>
>> ** **
>>
>> How could the loginForm component be positioned correctly in the Java
>> component hierarchy when displaying but not when submitting?****
>>
>> ** **
>>
>> Root cause:****
>>
>> org.apache.wicket.request.handler.ComponentNotFoundException: Could
not
>> find component
>'body:_wicket_child2:_wicket_extend3:welcomePanel:loginForm'
>> on page 'class com.sas.av.ui.wicket.templates.original.HomePage
>>
>atorg.apache.wicket.request.handler.PageAndComponentProvider.getCompone
nt(P
>ageAndComponentProvider.java:181)
>>
>atorg.apache.wicket.request.handler.ListenerInterfaceRequestHandler.get
Comp
>onent(ListenerInterfaceRequestHandler.java:92)
>>
>atorg.apache.wicket.request.handler.ListenerInterfaceRequestHandler.res
pond
>(ListenerInterfaceRequestHandler.java:239)
>>
>atorg.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(
Requ
>estCycle.java:781)
>>      at org.apache.wicket.request.RequestHandlerStack.execute
>> (RequestHandlerStack.java:64)
>>      at org.apache.wicket.request.cycle.RequestCycle.execute
>> (RequestCycle.java:255)
>>      at org.apache.wicket.request.cycle.RequestCycle.processRequest
>> (RequestCycle.java:212)
>>
>atorg.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(
Requ
>estCycle.java:283)
>>      at org.apache.wicket.protocol.http.WicketFilter.processRequest
>> (WicketFilter.java:185)
>>      at org.apache.wicket.protocol.http.WicketFilter.doFilter
>> (WicketFilter.java:241)
>>      at
com.sas.av.ui.wicket.templates.original.MyWicketFilter.doFilter
>> (PagebloomFilter.java:96)
>>      at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
>> (ApplicationFilterChain.java:235)
>>      at org.apache.catalina.core.ApplicationFilterChain.doFilter
>> (ApplicationFilterChain.java:206)
>>      at com.sas.av.model.context.UrlRedirectorFilter.doFilter
>> (UrlRedirectorFilter.java:77)****
>>
>> ** **
>>
>> Using latest snapshot as of about 1 hour ago when I pull all changes
on
>> wicket-1.5.x branch.****
>>
>> ** **
>>
>> Yours sincerely,****
>>
>> ** **
>>
>> Chris Colman****
>>
>>  ****
>>
>> Pagebloom Team Leader,****
>>
>> Step Ahead Software
>>
>> ****
>>
>> pagebloom - your business & your website growing together****
>>
>> ** **
>>
>> **Sydney**: (+61 2) 9656 1278     ****Canberra****: (+61 2) 6100 2120
>> ****
>>
>> Email: chrisc@stepahead.com.au <//...@stepahead.com.au>****
>>
>> Website:****
>>
>> http://www.pagebloom.com****
>>
>> http://develop.stepaheadsoftware.com****
>>
>>  ****
>>
>> ** **
>>

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


Re: Strange form in a panel behaviour

Posted by Igor Vaynberg <ig...@gmail.com>.
quickstart?

-igor

On Sun, Jan 29, 2012 at 8:18 PM, Chris Colman
<ch...@stepaheadsoftware.com>wrote:

> ** **
>
> I have a form in a panel inside the home page and all of its fields are
> filled out with the correct values when the page is displayed. Obviously
> being inside the form the Java object hierarchy matches the HTML hierarchy.
> ****
>
> ** **
>
> However when you submit the form Wicket says:****
>
> ** **
>
> Last cause: Could not find component 'body:_wicket_child2:_wicket_extend3:welcomePanel:loginForm' on page 'class com.sas.av.ui.wicket.templates.original.HomePage****
>
> ** **
>
> How could the loginForm component be positioned correctly in the Java
> component hierarchy when displaying but not when submitting?****
>
> ** **
>
> Root cause:****
>
> org.apache.wicket.request.handler.ComponentNotFoundException: Could not
> find component 'body:_wicket_child2:_wicket_extend3:welcomePanel:loginForm'
> on page 'class com.sas.av.ui.wicket.templates.original.HomePage
>      atorg.apache.wicket.request.handler.PageAndComponentProvider.getComponent(PageAndComponentProvider.java:181)
>      atorg.apache.wicket.request.handler.ListenerInterfaceRequestHandler.getComponent(ListenerInterfaceRequestHandler.java:92)
>      atorg.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:239)
>      atorg.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:781)
>      at org.apache.wicket.request.RequestHandlerStack.execute
> (RequestHandlerStack.java:64)
>      at org.apache.wicket.request.cycle.RequestCycle.execute
> (RequestCycle.java:255)
>      at org.apache.wicket.request.cycle.RequestCycle.processRequest
> (RequestCycle.java:212)
>      atorg.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
>      at org.apache.wicket.protocol.http.WicketFilter.processRequest
> (WicketFilter.java:185)
>      at org.apache.wicket.protocol.http.WicketFilter.doFilter
> (WicketFilter.java:241)
>      at com.sas.av.ui.wicket.templates.original.MyWicketFilter.doFilter
> (PagebloomFilter.java:96)
>      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> (ApplicationFilterChain.java:235)
>      at org.apache.catalina.core.ApplicationFilterChain.doFilter
> (ApplicationFilterChain.java:206)
>      at com.sas.av.model.context.UrlRedirectorFilter.doFilter
> (UrlRedirectorFilter.java:77)****
>
> ** **
>
> Using latest snapshot as of about 1 hour ago when I pull all changes on
> wicket-1.5.x branch.****
>
> ** **
>
> Yours sincerely,****
>
> ** **
>
> Chris Colman****
>
>  ****
>
> Pagebloom Team Leader,****
>
> Step Ahead Software
>
> ****
>
> pagebloom - your business & your website growing together****
>
> ** **
>
> **Sydney**: (+61 2) 9656 1278     ****Canberra****: (+61 2) 6100 2120
> ****
>
> Email: chrisc@stepahead.com.au <//...@stepahead.com.au>****
>
> Website:****
>
> http://www.pagebloom.com****
>
> http://develop.stepaheadsoftware.com****
>
>  ****
>
> ** **
>