On Tue, Mar 27, 2012 at 2:53 PM, armhold <armh...@gmail.com> wrote:
> Martin wrote:
>
>> HomePageMapper is explicitly registered in SystemMapper (the default
>> compound root mapper).  The resource mapper example in
>> wicket-examples also mounts custom home mapper.
>
> Thanks Martin. I managed to get something working based on
> this. Here's a gist, in case anyone else is trying to get their home
> page mounted without the version query param:
> https://gist.github.com/2220564
>
> Mount it in WicketApplication like:
>
>        getRootRequestMapperAsCompound().add(new NoVersionHomePageMapper());
>
> To be honest I'm not sure what it means to return a compatibilityScore
>> 0, which indicates "I can handle this request better than the
> HomePageMapper", but to then go and return null from mapRequest(). But
> that's what I had to do to get it to work. Cargo-cult programming for sure.

you are using maphandler() to generate the url to the homepage. a
higher compat score meaning that your handler's maphandler will be
used instead of the built in homepagemapper's. the method from a
handler with the highest score is used.

and returning null from maprequest() simply means "i cant map this
request", but thats ok because wicket's homepagemapper can and does.

so in essence your mapper can generate urls but not process them.

-igor

>
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/I-don-t-want-url-page-count-parameter-localhost-8080-context-0-tp4481510p4510319.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to