Announcement Announcement Module
Collapse
No announcement yet.
spring-webflow-2.0.xsd schema changes for binder Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • spring-webflow-2.0.xsd schema changes for binder

    Hi,

    Let say I have 10 variable and 2 are required field. When I use the binder I have to explicitly bind all 10 variable. Instead can we have bindAll=true attribute in binder. By default it may false. This will avoid to manual binding!

    Something like this,
    <binder bindAll="true">
    <binding property="variable1" required="true"/>
    <binding property="variable2" required="true"/>
    </binder>

    This should be bind all form fields instead only two. Any thoughts!!

    Thanks.

  • #2
    Could you specify more precisely what your question is. If you want to bind 8 variables and let 2 unbind then I think you donít have many choices: just bind 8 of them with binder tag like this:
    Code:
    <binder>
        <binding property="prop1" required="true"/>
        <binding property="prop2" required="false"/>
        ...
        <binding property="prop8"/>
    </binder>

    Comment


    • #3
      Well, I am lazy and I want the binder should take care to bind all the variable (which is mapped in jsp) without explicitly binding.

      If you want to add/delete more attributes, you have to do in model object and jsp and no need to touch flow xml. Is it make sense!

      Comment


      • #4
        If you want to bind all model's variables, what prevents you from specifying your model in 'model' attribute like this
        Code:
        <var name="myModel" class="your.model.ClassName"/>
        ...
        <view-state id="myView" model="myModel">
        ...
        </view-state>
        It will bind all properties of 'myModel' into your view.

        Comment


        • #5
          I think the point is that it is far easier to specify a small number of fields to bind than to specify a small number of fields to not bind.

          Comment

          Working...
          X