Announcement

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

    SearchForm vs. "required" fields issue

    Hi,

    I have an issue with the SearchForm component vs. "required" fields. The problem is that
    fields marked as "required" in the data source, initially show up properly, but as soon as a
    validation fails, it forgets about the "hiliteRequiredFields=false" it should be observing ...

    To reproduce, you can use the following code in the ISC Feature Explorer :

    Code:
    isc.SearchForm.create
    ({
        ID: "boundForm",
        dataSource: "builtins",
        fields :
    [
      { name : 'intField1' },
      { name : 'intField2' },
      { name : 'intField3' }
    ]
    });
    Code:
    <DataSource ID="builtins">
        <fields>
            <field name="intField1" type="integer" title="Integer" required="true"/>
            <field name="intField2" type="integer" title="Integer" required="true"/>
            <field name="intField3" type="integer" title="Integer"/>
            <field name="intField4" type="integer" title="Integer"/>
        </fields>
    </DataSource>
    The scenario :

    1) Fields initially display properly.
    2) Go to each of the fields and enter alpha data (a,b,c,...) to trigger the numeric validation failure.
    3) Go back to each of the fields and clear the data, to remove the validation failure.
    4) You will notice that intField1 and intField2 which are marked "required" in the datasource will
    not clear their bold captions, validation icons, etc ... intField3 works as expected.

    Is this a known issue ? Is there any way around this behavior ?

    Thanks,

    #2
    How are you triggering validation on this test case?
    We tweaked the test to make it run in the feature explorer:
    Code:
    isc.DataSource.create({
    ID:"builtins",
    fields:[
    {name:"intField1", type:"integer", title:"Integer", required:true},
    {name:"intField2", type:"integer", title:"Integer", required:true},
    {name:"intField3", type:"integer", title:"Integer"},
    {name:"intField4", type:"integer", title:"integer"}
    
    ]
    });
    
    
    isc.SearchForm.create
    ({
        ID: "boundForm",
        dataSource: "builtins",
        fields :
    [
      { name : 'intField1' },
      { name : 'intField2' },
      { name : 'intField3' }
    ]
    });
    If you then enter "a" into each field, open the developer console and run "boundForm.validate()" the errors show up.
    If you clear the errors and again run "boundForm.validate()" the errors are cleared properly.

    Can you show us your full test case and step-by-step code to reproduce the problem?

    Thanks
    Isomorphic Software

    Comment


      #3
      I just run it as-is. When I enter 'a' in a field and tab to the next field, it gets automatically validated. Then
      enter 'a' in that second field and tab to the next, etc, etc ...

      I then go back to each of the fields and remove the 'a' value by pressing the delete key. In those fields that
      are marked 'required' the validation doesn't go away, whereas in those not marked 'required' it goes away ...

      You have the full code in my initial post ... There's no additional code to this.

      Let me know if you can't reproduce this. It's quite straight forward.

      Thanks,

      Comment


        #4
        I'm sorry, actually, add the following to the "SearchForm" definition ...

        Code:
        validateOnExit : true,
        Sorry about that. Thanks!

        Comment


          #5
          Hi guys,

          Were you able to reproduce this ? What's the status ?

          Thanks,

          Comment


            #6
            The validateOnExit line was key to reproducing it. Thanks.
            This is now fixed - please try the next nightly build (3.0p branch) to pick up the change.

            Comment


              #7
              Excellent news ... Tx! I'm assuming it'll also get rolled into 8.2p, right ?

              Also, we took a recent 8.2p build (SmartClient_SC_SNAPSHOT-2012-03-13_v82p)
              and noticed that the listGrid/treeGrid selectionChanged event has changed behavior
              on INTERNET EXPLORER, or does't get fired as it did priorly ... This behavior gap
              was noticed when we upgraded from SmartClient_SC_SNAPSHOT-2012-02-09_v82p
              to SmartClient_SC_SNAPSHOT-2012-03-13_v82p.

              Anyone else reported that ? Fixed lately ?

              Thanks,
              Last edited by yavery; 24 Mar 2012, 07:03.

              Comment


                #8
                There has been some work around listGrid selection recently. As far as we are aware there are no outstanding holes in this behavior in the latest code. There may have been a temporary regression of some sort in the build you mention. Regardless your best bet on this is to get the latest nightly and if you encounter issues let us know in a new thread so we can take a look at the specific issue you hit.

                Thanks

                Comment


                  #9
                  There was an issue with ListGrid::selectionChanged() but it turns out to have been fixed in the latest build.

                  Thanks!

                  Comment

                  Working...
                  X