Poitras Christian wrote:
> That's what I like about open source! Suggestions like this one is very
> interesting to add.
> It wouldn't be difficult to add a fieldKey (or key) attribute to annotation
> thus enabling sharing of a field between actionbeans.
>
> Example :
> public class ActionBean1 {
> @Session(key="myAttrib") private myAttrib;
> }
> public class ActionBean2 {
> @Session(key="myAttrib") private myAttrib;
> }
>
> When ActionBean1 saves field in session, ActionBean2 will get the value on
> later requests.
>
> For sure, this will need care when programming actionbeans, but is a very
> good add-on.
checking for duplicate keys could be done at startup of course, just
like for example stripernate where it searches for classes with the
@Entity annotation, but this might get a bit too heavy?
just a thought..
It would be very nice, just having something like
@Session(key="authenticatedUser")
User user;
to be able to access the logged in user very easily. A bit of DI, sort of ;)
Of course a getUser method on the context would also do the trick, but i
like the annotation.
-j
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development