The example is also online:
http://wicketstuff.org/wicket13/ajax/

So far I'm not sure what should the default look like
/mount/point|3|
or
/mount/point(3)
or maybe something else?

Does anyone have an opinion about this?

-Matej

On 7/29/07, Matej Knopp <[EMAIL PROTECTED]> wrote:
> I'm not entirely sure. First, this only works with mounts, so you need
> to mount a page to get this (specify a mount point). Although I don't
> see this as a big problem, because if you really care about URLs,
> you're mointing your pages anyway.
>
> But to make it default - I don't know. It's could in theory break
> existing applications, e.g. when someone is passing |3| as page
> parameter. Not very likely, I know, but it's a bit too late before 1.3
> to do such switch IMHO.
>
> -Matej
>
> On 7/29/07, ZedroS Schwart <[EMAIL PROTECTED]> wrote:
> > That's great !
> >
> > Could it become the basic behavior for wicket url ?
> >
> > Personally I find the current url behavior in wicket to be quite
> > unfriendly. In fact, it's among the few aspects I dislike in wicket :$
> >
> > ++
> > Joseph
> >
> > On 7/29/07, Matej Knopp <[EMAIL PROTECTED]> wrote:
> > > Hi folks,
> > >
> > > I've committed two classes that improve Wicket mounted URLs in a
> > > significant way. The URLs stay bookmarkable even after clicking a link
> > > or submitting form, and the AJAX changes are preserved on reload.
> > >
> > > Basically, what does is that when you hit a bookmarkable page such as
> > > /my/mount/point
> > > you are immediately redirected to *
> > > /my/mount/point|3|
> > > where |3| is the pageId. The URL is fully bookmarkable. The pageId in
> > > URL is ignored if page with given ID doesn't exist in session or
> > > doesn't match the mount point. Also this preserves the initial page
> > > parameters, so
> > >
> > > /my/mount/point/param1/value1 becomes /my/mount/point/param1/value1|3|.
> > >
> > > The | separators are configurable and can be changed to e.g. (3) or
> > > anything else you want. (Although [ ] get escaped so it doesn't look
> > > pretty).
> > >
> > > Good thing is that the URL remains stable and bookmarkable during the
> > > whole page existence, so you no longer see the ?wicket:interface=:3:::
> > > string in your URL.
> > >
> > > Usage is very simple, you just need to mount the page using
> > > HybridUrlCodingStrategy, e.g.
> > >
> > > mount(new HybridUrlCodingStrategy("ratings", RatingsPage.class));
> > > mount(new IndexedHybridUrlCodingStrategy("todo-list", TodoList.class));
> > >
> > > I've already change all Ajax examples to use this strategy, so to see
> > > it in action you just update wicket and wicket-examples from SVN, or
> > > wait until we redeploy the live examples.
> > >
> > > -Matej
> > >
> > > * The redirect is necessary for pages with AJAX stuff, so that the
> > > page instance is preserved on reload (otherwise with bookmarkable URL
> > > new instance of page would be created on every reload, which discards
> > > the AJAX changes)
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to