Announcement Announcement Module
Collapse
No announcement yet.
FormBackingObject Method with a 'new Object()' ? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • FormBackingObject Method with a 'new Object()' ?

    As you can see in this posting, I have difficulties changing the formBackingObject's properties. I found out, that the FBO-Method is called twice: Once before form generation and once within the doSubmitAction.

    This is not good, because the object that backs the form does not really exist. It is simply a representation of some DB values, so I thought I create a new Object of an inner class in order to back my bean.

    In the doSubmitAction method I wanted to write the values back to the DB and then the object can be forgotten. Bad idea?

    PS: I started a new thread, because I think this has nothing to do with the original posting.

  • #2
    The formBackingObject method will only be called on a submit if the form isn't a session form. If it is it will use the object from the session. However that isn't the issue here.

    I also suggest you take a look at the form tags sample application shipped with spring, it explains quite clearly how to bind to collections.

    Comment

    Working...
    X