On 04/12/2011 04:36 PM, Thierry Peng wrote:
On 04/12/2011 03:20 PM, Tejash Tarun wrote:
Hi,

I am using tabs in my page.

When switching between the tabs I get this exception frequently (and not
every time).

java.lang.IllegalStateException: No Page found for component
[MarkupContainer [Component id = link]]
at org.apache.wicket.Component.getPage(Component.java:1819)
at
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:284)

...


Previously I faced the problem of difference of client-side state and
server-side state with chrome and got a fix implementing the solution at
this link:
http://www.richardnichols.net/2010/03/apache-wicket-force-page-reload-to-fix-ajax-back/

But now I see the simple switching between the tabs in IE8 gives me the
problem.

OS used: Windows7
Browser: IE8

Seeking help.

Thanks in advance,
Tejash

that's most probably a problem with the component hierarchy.

If you call getPage() on a component that is (not yet or not anymore) added to another component this exception happens.

A possible Condition can be:

someSubmitMethod(ajaxtarget target){
if(someLogicDecides())
{
    this.addOrReplace(new OtherPanel())
    target.addComponent(getPage()); //<= this getPage() cannot succeed
}
}

this may be not your case but there are many similar conditions with replace mechanism where this may happen. Look for replace mechanism and check them.

greetings

thierry

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

correction:

someSubmitMethod(ajaxtarget target){
if(someLogicDecides())
{
    this.replaceWith(new OtherPanel())
    target.addComponent(getPage()); //<= this getPage() cannot succeed
}
}

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

Reply via email to