Is there a way i can use this for the home page (which is the problem)?

I'm trying to use mount(new HybridUrlCodingStrategy("", getHomePage(),
true)); and i of course get the error:

"The mount path '/' is reserved for the application home page"

But unfortunately, like I've explained, I need to redirect from the
bookmarkable-like home page to the url which stores it's state - so that
subsequent requests get the latest version of that page.

Until looking at this way of doing it (which would be cleaner, and use less
code), I've basically extended
WebRequestCycleProcessor#resolve and checked to see if it resolved to a
BookmarkablePageRequestTarget, in which case i change the resolved target to
a RedirectRequestTarget in order to redirect away from the '/' url.

2008/11/14 Johan Compagner <[EMAIL PROTECTED]>

> Try hybridurlencoding.
> That is meant for bookmarkable redirects to a bookmarkable and interface
> url
>
> On 10/29/08, Antony Stubbs <[EMAIL PROTECTED]> wrote:
> > 2008/10/29 Igor Vaynberg <[EMAIL PROTECTED]>
> >
> >> On Wed, Oct 29, 2008 at 6:43 AM, Antony Stubbs <[EMAIL PROTECTED]
> >
> >> wrote:
> >>
> >> > With RENDER_TO_REDIRECT on, why does this:
> >>
> >> ^ this pattern implements the redirect-after-post like pattern
> >>
> >> >
> >>
> http://localhost:8080/non-gizmo-wicket-portlet-events/eventa/?wicket:interface=:11:basic-link:6:ILinkListener
> >> ::
> >> > redirect to
> >> >
> >>
> http://localhost:8080/non-gizmo-wicket-portlet-events/eventa/?wicket:interface=:11:6
> :
> >> ::
> >>
> >> the top url invokes the onclick of a link, after it is processed we
> >> redirect to a view url. this is so if the user presses refresh the
> >> onclick is not invoked again. like redirect-after-post but actually
> >> redirect-after-get for gets that cause actions on the serverside.
> >>
> >> > while
> >> > http://localhost:8080/non-gizmo-wicket-portlet-events/eventa/
> >> > doesn't redirect at all, and the browser points to:?
> >> > http://localhost:8080/non-gizmo-wicket-portlet-events/eventa/
> >> > Shouldn't you get:?
> >> >
> >>
> http://localhost:8080/non-gizmo-wicket-portlet-events/eventa/?wicket:interface=:0
> ::
> >> ::
> >>
> >> we do not redirect bookmarkable urls. we want a new instance created
> >> if the user presses refresh. if you were to invoke any action on that
> >> page then you would be redirected to ?wicket:interface=:0::::
> >>
> >
> > Can I force a redirect in this case? Perhaps by modifying what the
> > 'homepage' for the application is set to, so that it causes some no-op
> > action, causing the redirect? i.e. i don't want hompage, or '/'' to be
> > bookmarkable, I want it to redirect to a view url (a redirect seems to
> let
> > the portlet stuff work).
> >
> >
> >> also we cannot redirect because the url has to be bookmarkable, eg
> >> user actually being able to bookmark it in the browser. if we always
> >> redirected to a stateful url that wouldnt work very well :)
> >>
> >
> > Yes well that makes sense - so can I make the 'homepage' (or / request)
> not
> > bookmarkable, so that it resolves to a view?
> >
> >
> >> -igor
> >>
> >
> >
> >
> > --
> > ___________________________
> > http://stubbisms.wordpress.com/
> >
>



-- 
___________________________
http://stubbisms.wordpress.com/

Reply via email to