Results 1 to 2 of 2

Thread: Why does AbstractFormController remove form from session?

  1. #1

    Default Why does AbstractFormController remove form from session?

    Hello,

    I have a controller which sets sessionForm to true. As a result, I'm expecting that the form is going to be put in session and available to my JSP and all future controllers. However, when I debug and look in the session, the attribute is not there. When I debugged further I noticed that line 434 of AbstractFormController actually removes the session attribute. Is this a bug? What is the purpose of removing the session attribute? I thought the whole purpose of setting the sessionForm flag was to tell the controller framework to get and set the form in session but why would it remove it? Is this a bug?

    Thoughts?

    --Rexxe

  2. #2
    Join Date
    Aug 2004
    Location
    Toulouse, France
    Posts
    148

    Default

    This is not a bug.
    The sessionForm property tells the form controller to keep the formBackingObject in the session between the form rendering and the submittion. For instance, you can see that in case of errors of binding or validation, the session is repopulated with the form so that even in case of errors and resubmition, the onSubmit-like method access the form data grabbed from the session.
    Anyway, it is your duty, in the submit methods, to store the data in the session for future use.

    Olivier

Similar Threads

  1. OpenSessionInView and portlet support
    By garpinc2 in forum Web Flow
    Replies: 31
    Last Post: Apr 9th, 2010, 11:12 AM
  2. OpenSessionInView + CMT Session usage
    By alesj in forum Data
    Replies: 7
    Last Post: Aug 16th, 2005, 02:32 AM
  3. Loosing my SecureContext
    By sklakken in forum Security
    Replies: 3
    Last Post: Jul 21st, 2005, 01:44 PM
  4. Replies: 1
    Last Post: Mar 12th, 2005, 04:33 AM
  5. Replies: 3
    Last Post: Nov 19th, 2004, 07:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •