[
http://www.stripesframework.org/jira/browse/STS-429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11299#action_11299
]
Christian Poitras commented on STS-429:
---------------------------------------
I am not sure if I understand what you want. In these cases, a code sample
would be great.
For examples, let's say I have an ActionBean like this.
public class MyAction implements ActionBean {
private List<Person> persons;
}
public class Person {
private String firstname;
}
If I understand, you would like to save all person's first name, is that right?
So you would like to write.
public class Person {
@Session
private String firstname;
}
I doubt this can work, since I programmed the interceptor to check only for
fields in an ActionBean. If it stores something else, this is an unpredictable
and untested "bug/feature".
If I'm right up to now, you would like to have something like this instead.
public class MyAction implements ActionBean {
@Session(field="firstname")
private List<Person> persons;
}
Thus saving all person's first name.
This is possible. And I would not like to have an interceptor that scans
anything beside action bean fields since the overhead of reflection would be
monstrous and I want this interceptor to be quick.
If I way off, can you provide a simple code example explaining how you want to
annotate and what is the intended result. Also, please read John and Gregg
comments to keep in mind that this interceptor is intended to be easy of use.
For the updates, I plan to add a new one today or next monday/tuesday. It will
contain some updates from other comments. For integration in Stripes, we will
have to wait for Tim's approval, I guess.
> @Session annotation to save and restore fields automatically
> ------------------------------------------------------------
>
> Key: STS-429
> URL: http://www.stripesframework.org/jira/browse/STS-429
> Project: Stripes
> Issue Type: New Feature
> Reporter: Christian Poitras
> Priority: Minor
> Attachments: session-plugin.jar, session-plugin2.jar,
> session-plugin3.jar, session-plugin4.jar, session-plugin5.jar
>
>
> I've added a @Session annotation and an interceptor that automatically saves
> annotated fields in session and restores the fields on following request.
> This could be a great add-on to Stripes.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://www.stripesframework.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development