that will not work because the locale isn't get through the
Session.getLocale() at that time.
it is set in the session for the first time in 1.3 its in the constructor:

   protected Session(Application application, Request request)
   {
       this.locale = request.getLocale();


but i guess in 1.2 it was done outside the constructor

Session session = newSession()
session.setLocale(request.getLocale())

so the only thing to do here on the wicket side is override the request
class itself from the WebApplication:

   protected WebRequest newWebRequest(final HttpServletRequest
servletRequest)
   {
       return new ServletWebRequest(servletRequest);
   }

and return one that doesn't call getLocale on the given request.

But this doesn't change the thing that cocoon is really borked if you can't
call getLocale...

johan


On 5/28/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote:


In the mean time, I think you could override getLocale in your custom
session, at least that was possible.

Martijn

On 5/28/07, Erik van Oosten <[EMAIL PROTECTED]> wrote:
>
> Hi Luca,
>
> Wicket uses the locale for finding resources (including the templates).
You
> could do without but I am afraid it goes too far to let Wicket do
something
> about Cocoon's incomplete HttpServletRequest implementation.
>
> So these are the options I see:
> 1. Make Cocoon behave itself by submitting a patch that will implement
> HttpServletRequest#getLocale properly.
> 2. Wrap Cocoon's request with something of your own which returns a
proper
> Locale.
>
> Since I do not know Cocoon, I can not help you with finding out you how
to
> do this.
>
> Regards,
>     Erik.
>
>
> Luca Marrocco wrote:
> >
> > the first two line is quite interesting:
> > java.lang.UnsupportedOperationException
> >       at
> >
org.apache.cocoon.servletservice.util.BlockCallHttpServletRequest.getLocale
(BlockCallHttpServletRequest.java:160)
> >       at
> > wicket.protocol.http.servlet.ServletWebRequest.getLocale(
ServletWebRequest.java:91)
> >
> > my question in wicket side of problem is. It is necessary getLocale?
> > Can i inibite this call in wicket configuration?
> >
> > Luca
> >
>
> --
> Erik van Oosten
> http://2007.rubyenrails.nl/
> http://day-to-day-stuff.blogspot.com/
> --
> View this message in context:
http://www.nabble.com/integrating-wicket-and-cocoon-tf3824772.html#a10834370
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>
-------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


--
Join the wicket community at irc.freenode.net: ##wicket
Wicket 1.2.6 contains a very important fix. Download Wicket now!
http://wicketframework.org

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to