Hi Gunnar
I wanted it to work without needing to tell it when to do its stuff.
I based my changes on the requirement for displaying success messages after a
redirect.
The messages / errors only need to survive until the next request. So anything
in the request I put into the session (in the after method) and in the before
method, anything in the session, I remove and put into the request. Just like
you say, works like a charm.
Adam
Gunnar Hillert on 12/10/07 05:15, wrote:
Hi Adam,
Thanks for your comments. Yes, I looked at the sources for the
MessageStoreInterceptor and indeed it looks quite simple. I played around
with it tonight and I made the inteceptor annotations-aware.
I have added 2 method-level annotations: @StoreMessages and
@RetrieveMessages
This works like a charm :-) This will work for me as a start. I still need
to clean it up a bit....and can then send you what I have.
What changes did you you?
Regards,
Gunnar
Adam Hardy-3 wrote:
Gunnar,
the message store interceptor is quite lean. I have copied it and written
my own
version to give me the functionality I needed. Now with your comments, it
seems
like a prime target for further development by S2 to beef it up a bit to
provide
more options.
Maybe we could put in a patch with both our changes, if you implemented
what you
need?
Regards
Adam
Gunnar Hillert on 11/10/07 04:56, wrote:
Hi,
Is there a way to configure the message store interceptor via
annotations?
I started experimenting with the smarturls plugin for Struts 2
(http://code.google.com/p/smarturls-s2/) in order to get rid of my XML
configuration but noticed that I need the message store interceptor to
have
success message to survive redirects.
Well, it looks like the the message store interceptor does not have
annotations support (bummer). But maybe is there another way to solve
this
issue?
Thanks a lot!
Gunnar Hillert
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]