there is an example of this in the new wicket-examples under request mapper examples.
-igor On Fri, Sep 16, 2011 at 11:41 AM, Jorge Gallardo <[email protected]> wrote: > Hi people, > > What is the best way to achieve this with Wicket 1.5? Still using the same > approach? > > Thanks! > JG > > On Thu, Dec 23, 2010 at 7:50 AM, Bas Gooren <[email protected]> wrote: > >> I think in wicket 1.4.x this is only possible with a custom mount point; In >> other words: >> >> Override/implement a version of bookmarkable page handling which takes into >> accoun the locale. >> Have a look at BookmarkablePageRequestTargetU**rlCodingStrategy. You could >> implement this class, overriding it's matches() method to match the mount >> path and the locale. For encoding and decoding you should be able to use the >> bookmarkable parts available in wicket. >> >> PageWithLocaleUrlCodingStrateg**y extends >> BookmarkablePageRequestTargetU**rlCodingStrategy >> { >> Locale locale; >> >> // constructors of BPRTUCS with added Locale param >> >> matches( IRequestTarget target ) { >> return super.matches(target) && getSession().getLocale().** >> equals(this.locale); >> } >> } >> >> You can then mount like this (in application.init): >> mount( new PageWithLocaleUrlCodingStrateg**y( "General", new >> Locale("en","US"), MainPage.class ) ); >> etc >> >> Hope this helps! >> >> Bas >> >> ----- Original Message ----- From: ""Thomas Götz"" <[email protected]> >> To: <[email protected]> >> Sent: Thursday, December 23, 2010 2:36 PM >> Subject: Re: Localized mount points for BookmarkablePages? >> >> >> >> Ok, thanks for that hint. But: if I mount the page using the method you >>> described, which mount name will be taken when referencing the page via a >>> BookmarkablePageLink? What I want to achieve is that if the current >>> user/session is set to locale "GERMAN" e.g., then all BookmarkablePageLinks >>> should be rendered with the german mount name, got my point? >>> >>> Cheers, >>> -Tom >>> >>> >>> ----- Ursprüngliche Nachricht ----- >>>> Von: Hans Lesmeister >>>> Gesendet: 23.12.10 13:05 Uhr >>>> An: [email protected] >>>> Betreff: Re: Localized mount points for BookmarkablePages? >>>> >>>> Hi, you van pass a list with alternates to the mount-annotation. Same >>>> can be done on mounting programmatically. >>>> >>>> Regards Hans >>>> >>>> >>>> >>>> Am 23.12.2010 um 12:29 schrieb Thomas Götz <[email protected]>: >>>> >>>> > Hi, >>>> > >>>> > is it possible to have localized mount points for BookmarkablePages? >>>> > >>>> > Example: >>>> > I have a BookmarkablePage GeneralPage.java which should be available >>>> > under >>>> > http://my.domain.com/General and >>>> > http://my.domain.com/Allgemein (german) >>>> > >>>> > ... depending on the current locale. Is this possible? If yes, could >>>> > someone >>>> > point me into the right direction? >>>> > >>>> > Cheers, >>>> > -Tom >>>> > >>>> > >>>> > >>>> > ------------------------------**------------------------------** >>>> --------- >>>> > To unsubscribe, e-mail: >>>> > users-unsubscribe@wicket.**apache.org<[email protected]> >>>> > For additional commands, e-mail: [email protected] >>>> > >>>> >>>> ------------------------------**------------------------------** >>>> --------- >>>> To unsubscribe, e-mail: >>>> users-unsubscribe@wicket.**apache.org<[email protected]> >>>> For additional commands, e-mail: [email protected] >>>> >>> >>> >>> ------------------------------**------------------------------**--------- >>> To unsubscribe, e-mail: >>> users-unsubscribe@wicket.**apache.org<[email protected]> >>> For additional commands, e-mail: [email protected] >>> >>> >>> >> >> ------------------------------**------------------------------**--------- >> To unsubscribe, e-mail: >> users-unsubscribe@wicket.**apache.org<[email protected]> >> For additional commands, e-mail: [email protected] >> >> > > > -- > Jorge Gallardo > ---------------------------------------- > [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
