Announcement Announcement Module
Collapse
No announcement yet.
Spring webflow 2 binding: nested object do not follow flow rule Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring webflow 2 binding: nested object do not follow flow rule

    I have an object that has a nested one that is binded in the same view:

    Code:
        class MyForm{
           private String var1;
           private String var2;
           private MyNestedForm nested;
        }
        
        class MyNestedForm{
           private String var3;
        }

    and in my jsp:

    Code:
       <form:input path="var1" /> 
        <form:input path="var2" /> 
        <form:input path="nested.var3"/>
    As I enter some value in var1 and var2 in my form everything goes well (validations, prev/back buttons...)
    But var3 maintain always the last value inserted! Even if I restart the flow from the beginning

    Do I missing something?

    Many thanks for your help.

  • #2
    Does anyone knows what's missing?
    the complex model I'm using works fine all the attributes EXCEPT for nested objects! Is this a norbal behaviour?
    Is it normal that a nested boject is not cleared among different executions?

    Comment


    • #3
      Hi Marcoa,
      Did you solved the problem? I am currently stuck with the same issue

      Comment


      • #4
        Originally posted by hiro View Post
        Hi Marcoa,
        Did you solved the problem? I am currently stuck with the same issue
        Hello, I did not go on searching more to find the best solution for this problem (I had other ones more important I had to solve first), but eventually I attempted to solve the problem with two solutions:
        1- (less engineered): I placed an @Scope("session") annotation into the nested class
        2- I've extended the flow with a new form to fill the nested object.

        hope it helps

        Marco.

        Comment

        Working...
        X