Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    "Required" fields not properly handled (D-02098)

    Hi,

    When I bind more than one component to a same DataSource and play around with the field
    "required" attribute explicitly, there seems to be some confusion and mix-up. Using the following
    example, some fields are defined as "required = true" in the data source but are overridden
    in a form definition. When I try to use that form alone it works fine, but if I combine it with a grid
    that is also bound to the same data source, my "required" overrides don't seem to be respected. I'm
    not really sure what triggers this behaviour though ...

    The search fields being "required = false", I'd be expecting the validate() method to pass even when
    those fields are empty. This isn't the case ...

    I've reproduced this issue with the latest 8.2p as well as with the FeatureExplorer hosted at www.smartclient.com,
    using the sample @ Grids -> Frozen Columns -> Simple Freeze (arbitrarily chosen).

    Any idea if this is a bug or if I'm doing anything wrong ? Thanks !

    Code:
    isc.VLayout.create
    ({
    membersMargin : 10,
    members :
    [
       isc.DynamicForm.create
       ({
          ID : 'searchForm',
          dataSource:  supplyItem,
          fields :
          [
             { name : 'itemName', required : false },
             { name : 'SKU', required : false }
          ]
        }),
    
        isc.Button.create
        ({
           title : 'Search',
           click : function()
           {
               if (searchForm.validate())
                 alert('all valid!');
           }
        })
    // -----------------------------
    // BEGIN : comment out the following block and the validate above passes!
    // -----------------------------
    , isc.ListGrid.create
        ({
            ID: "supplyList",
            width:500, height:224,
            dataSource: supplyItem,
            autoFetchData: true,
            fields:[
                {name:"itemName", frozen:true, width:150},
                {name:"category", width:100},
                {name:"SKU", width:100},
                {name:"units", width:80},
                {name:"description", width:250}
            ]
        })
    // -----------------------------
    // END : comment out the above block and the validate above passes!
    // -----------------------------
    ]
    });

    #2
    We've made a change to address this.
    Please try the next nightly build.

    Thanks
    Isomorphic Software

    Comment


      #3
      Preliminary testing looks good. Issue seem resolved. We'll do some regression testing and let you know if we find anything.

      Thanks for the quick turnaround.

      Comment

      Working...
      X