hi martijn,

your tipp with the cookie works! thank you!
markus

On Tue, Sep 23, 2008 at 10:19 AM, Martijn Dashorst <
[EMAIL PROTECTED]> wrote:

> In your case I would set a client side cookie that stores the portal
> id. This way you can identify which portal the user was visiting and
> make your PageExpiredPage customized.
>
> Martijn
>
> On Tue, Sep 23, 2008 at 10:00 AM, Markus Haspl <[EMAIL PROTECTED]> wrote:
> > On Mon, Sep 22, 2008 at 6:04 PM, Justin Morgan - Logic Sector <
> > [EMAIL PROTECTED]> wrote:
> >
> >> Create a custom Wicket session subclass that holds your portal:
> >>
> >> public class MySession extends WebSession {
> >>    private Portal      _portal;
> >>    public MySession(Request request) {
> >>        super(request);
> >>        LOGGER.debug("Instantiated");
> >>        _portal = new Portal();
> >>    }
> >>    public Portal getPortal() { return _portal; }
> >>    public void setPortal(Portal portal) { _portal = portal; }
> >> }
> >>
> >> Somewhere in your "normal" page:
> >> ((MySession) getSession()).setPortal(myPortal);
> >>
> >> Somewhere in your PageExpiredPage:
> >> Portal myPortal = ((MySession) getSession()).getPortal();
> >>
> >> In your Wicket Application subclass:
> >>    /** @see org.apache.wicket.Application#newSession(Request, Response)
> */
> >>    @Override
> >>    public Session newSession(Request request, Response response) {
> >>        return new MySession(request);
> >>    }
> >>
> >> Best regards,
> >>
> >> Justin
> >
> >
> > Thanks! But i thought that the Session will be invalide when the
> PageExpired
> > Error comes? Isn't that true? If not so, than your approach will be very
> > fine.
> >
>
>
>
> --
> Become a Wicket expert, learn from the best: http://wicketinaction.com
> Apache Wicket 1.3.4 is released
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to