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

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


    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"/>

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


  • #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:
        <binding property="prop1" required="true"/>
        <binding property="prop2" required="false"/>
        <binding property="prop8"/>


    • #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!


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


        • #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.