What you are looking for is the notion of "conversation" scopes as Seam
calls it. This was a pretty big limitation with Spring until recently where
they added support for custom bean scopes in Spring 2.0. Google for Spring
custom bean scope.

Here are some links

http://www.infoq.com/articles/spring-2-intro  (see 'New bean scopes'
section)

http://www.artima.com/forums/flat.jsp?forum=276&thread=190451

http://jroller.com/page/eu?entry=more_fun_with_spring_scopes

Sanjiv

On 2/6/07, maskkkk <[EMAIL PROTECTED]> wrote:


Good Morning,

I have a question concerning session forms,

I wish to use a POJO that is stored in my session across multiple forms in
my application (one form backing object, multiple forms).

I can't seem to control what the  name of session attribute used to store
the form backing object in the session is.

It isn't for a wizard, the form backing object is just a list of settings
I
want the user to carry with them across the application.


action-servlet.xml wrote:
>
>     <bean id="mainPageController"
> class="com.concilerpress.webapp.action.MCPMainPageController">
>               <property name="commandClass"
> value="com.concilerpress.webapp.action.commandobject.AppState"/>
>               <property name="commandName" value="appState"/>
>               <property name="successView"
value="redirect:/main_page.html" />
>               <property name="cancelView" value="forward:/" />
>               <property name="formView" value="index"/>
>
>               <!-- Specified as a sessionForm -->
>               <property name="sessionForm" value="true" />
>     </bean>
>

Now when the form-backing object gets stored in the session I get a log
message that reads:


log.txt wrote:
>
>       Setting form session attribute
> [com.concilerpress.webapp.action.MainPageController.FORM.appState] to:
> [EMAIL PROTECTED]
>

Therefore, it would seem to me that this means my form-backing object is
stored in the session attribute:
com.concilerpress.webapp.action.MainPageController.FORM.appState

I can't seem to find a setter for setting the name of the session
attribute
which stores the form; Now given this fact, how can I retrieve the same
form
backing object from the session in a different part of the application?

Thank you,
   Andrew J. Leer
--
View this message in context:
http://www.nabble.com/Spring-MVC-Session-Forms--tf3180681s2369.html#a8826200
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to