Hi Martin, 

Thank you very much for your reply, you definitely pointed me in the right
direction!

In case anyone else is looking at this in the future, the code for the
overriden methods ended up as follows:

---- CODE START ----
...
   @Override
   public Url mapHandler(IRequestHandler _requestHandler) {
      Url url;
      if (requestPathMatches(RequestCycle.get().getRequest())) {
         url = super.mapHandler(_requestHandler);
      } else {
         url = null;
      }
     
      return url;
   }

   @Override
   public IRequestHandler mapRequest(Request _request) {
      IRequestHandler requestHandler;
      if (requestPathMatches(_request)) {

         // set the Locale
         Session session = Session.get();
         session.setLocale(locale);

         requestHandler = super.mapRequest(_request);

      } else {
         requestHandler = null;
      }

      return requestHandler;
   }

   private boolean requestPathMatches(Request _request) {
      boolean retVal = path.equals(_request.getUrl().getPath());
   }
...
---- CODE END ----

Cheers

Simon


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Mapping-different-paths-to-the-same-page-and-updating-session-Locale-tp4580714p4581761.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to