Hi,

On Tue, Feb 17, 2015 at 2:07 PM, Karl-Heinz Golz <
[email protected]> wrote:

> hello,
>
> I'm faced with an error in following situation:
> User opens a webpage (e.g. Page1), do some other things, comes back
> after session time out and click some link (onClick-event) on the page.
>
> Then following exception is thrown:
>
>     at
>
> org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStream.java:526)
>     at
> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1438)
>     at
> org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1557)
>     at
>
> org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1532)
>     at
>
> org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1487)
>     at
>
> org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:71)
>     . . .
>
> I try to avoid that like this:
>
> public class Page1 extends WebPage {
>
>   public Page1() {
>     if (!UserSession.get().isUserSignedOn()) {
>         setResponsePage(new StartPage());
>

If you need to cancel the processing of the Page in its constructor you
should use "throw RestartResponseException()".


>         return;
>     } else
>         normalHandling();
>   }
>   . . .
> }
>
> I can see in log file that the if/else works as expected: the StartPage
> is handled (but not shown).
> But after that it tries to render Page1 again which throws the exception.
>
> What I finally want is: users should be led to the StartPage after
> session time out in any case.
>
> Any recommendations how I should handle this are very welcome.
>
> Many thanks in advance
> Karl-Heinz
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to