Hi Sam,

I wrote a custom MountedMapper for the project I'm currently working on.
All it does, is not rendering the page version info for pages. For all
other components it is still turned on. IMHO this mimics the pre-1.5
behavior. We've been using it in production for quite a while now and it
works fine:

public static class NoHybridMountedMapper extends MountedMapper {
> public NoHybridMountedMapper(String mountPath, Class<? extends
> IRequestablePage> pageClass) {
> super(mountPath, pageClass);
> }
> @Override
> protected void encodePageComponentInfo(Url url, PageComponentInfo info) {
> final boolean isComponentListener = info != null &&
> info.getComponentInfo() != null;
> if (isComponentListener) {
> // only encode information about components, not pages
> super.encodePageComponentInfo(url, info);
> }
> }
> }


Hope this helps,

Cheers,

Thomas

On Thu, Jul 12, 2012 at 9:15 AM, Sam Zilverberg <samzilverb...@gmail.com>wrote:

> Thank you very much Jeremy!
> It was a good read through, very informative!
> I already browsed through Ivan's post but deemed it unrelevant to my
> problem on the first read.
> After reading the second post, then reading Ivan's post again, I now
> understand the page versioning system a lot better :)
>
> Sadly though now I'm not sure there is a solution to my problem and that I
> will have to cope with how the versioning/url works now.
> I'm looking for another way to encode the page version, possibly not into
> the url but using cookies/http headers/session/anything.
> I will search nabble/stackoverflow for this.
> If you already have links to posts dealing with this matter feel free to
> post them :)
> I will definitely post any links I find that are useful for anyone who
> encounters this post in the future.
>
>
> On Thu, Jul 12, 2012 at 2:43 AM, Jeremy Thomerson <
> jer...@wickettraining.com
> > wrote:
>
> > On Wed, Jul 11, 2012 at 6:41 PM, Jeremy Thomerson <
> > jer...@wickettraining.com
> > > wrote:
> >
> > >
> > > On Wed, Jul 11, 2012 at 2:54 PM, Sam Zilverberg <
> samzilverb...@gmail.com
> > >wrote:
> > >
> > >> I have no problem that the page is being constructed everytime.
> > >>
> > >
> > > Just one note here: the page is not being constructed every time.  Put
> a
> > > breakpoint or System.out.println in your constructor to verify this.
> >  There
> > > was a change in Wicket 1.5 that increases the page ID for each change
> > > rather than having the older ID and version number combination.
> > >
> > > See this post where Igor schooled me in the new stuff :)
> > > http://tinyurl.com/cmfrpj9
> > >
> > > --
> > > Jeremy Thomerson
> > > http://wickettraining.com
> > > *Need a CMS for Wicket?  Use Brix! http://brixcms.org*
> > >
> >
> > And see this post for the more direct answer to your original question:
> > http://tinyurl.com/cdl99xy
> >
> > --
> > Jeremy Thomerson
> > http://wickettraining.com
> > *Need a CMS for Wicket?  Use Brix! http://brixcms.org*
> >
>

Reply via email to