[prev in list] [next in list] [prev in thread] [next in thread] 

List:       velocity-user
Subject:    Re: MessageTool - with messages in session
From:       Chris Searle <chris () empolis ! no>
Date:       2004-11-19 16:42:39
Message-ID: 87llcxbxj4.fsf () alice ! chrissearle ! org
[Download RAW message or body]

>>>>> "SK" == Shinobu Kawai <shinobu.kawai@gmail.com> writes:

    >> I think that StrutsUtils assumes that the messages are in the
    >> request only - is this correct? If so - is there a recommended
    >> solution?

    SK> You can make a patch and post it to bugzilla.
    SK> http://issues.apache.org/bugzilla/enter_bug.cgi?product=Velocity

I'll take a look.

To behave like struts it would need to retrieve from both request and
session (will need to find out what struts does with messages present
in both places).

There may be an issue with scoping of the tool though - especially
when the tiles tool is also used.

I know that here (with a custom tool descended from
ActionMessagesTool) which override init to add messages from the
session to the instance variable - the messages are only present in
the first tile (maybe only the layout - not finished debugging this
yet)!

This is I guess the code that automatically removes the messages from
the session so that they don't get displayed more than once. I'm not
sure how request vs. session scope of the tool affects this either
yet.

If I get it working I'll send a patch :-)

-- 
Chris Searle


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic