Announcement

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

    Bug with validateOnChange in DynamicForm

    Hi,

    please look at this code and the behavior which I demonstrate on the screencast below:

    Code:
    isc.DynamicForm.create({
        ID: "testForm",
        fields: [
            {name: "First name", required: true, validateOnChange:true},
            {name: "Last Name", required: true, validateOnChange:true}        
        ]
    });
    Screencast:
    http://www.youtube.com/watch?v=rdWef49x7nA

    What I do:
    1. Type in the first name + last name
    2. Clear both fields -> validator marks the fields as incorrect
    3. Try to type in the first name again -> after typing the first letter, my focus switch automatically to the second name!?

    Could you check this please?

    Cheers

    #2
    I'm having exactly the same problem as this old post describes. For some reason when two different validators have been triggered on a form the focus behaves oddly.

    Is there a workaround for this issue ?

    Using 3.1p NIGHTLY-2012-12-22.

    br,
    Marko

    Comment


      #3
      We're not seeing this behavior. Can you double check with the latest nightly build.
      If the problem persists, please show us a test case we can run on our end to reproduce it (and also include details of which browser you're seeing it on, and of course the full build version)

      Regards
      Isomorphic Software

      Comment


        #4
        Originally posted by Isomorphic View Post
        We're not seeing this behavior. Can you double check with the latest nightly build.
        If the problem persists, please show us a test case we can run on our end to reproduce it (and also include details of which browser you're seeing it on, and of course the full build version)

        Regards
        Isomorphic Software
        Hello,

        I'm experiencing the same problem.

        Using "Isomorphic SmartClient/SmartGWT Framework (v8.3p_2013-03-25/Pro Deployment 2013-03-25)"
        Browser independent

        Test scenario:

        1. click on the "Validate" button
        2. all fields are marked with error (required) and focus is set to the first field
        3. type anything
        4. after first character typed, the focus is set to the next field in error


        Test class:
        Code:
        package com.test.testcase.client;
        
        import com.google.gwt.core.client.EntryPoint;
        import com.smartgwt.client.widgets.form.DynamicForm;
        import com.smartgwt.client.widgets.form.fields.ButtonItem;
        import com.smartgwt.client.widgets.form.fields.TextItem;
        import com.smartgwt.client.widgets.form.fields.events.ClickEvent;
        import com.smartgwt.client.widgets.form.fields.events.ClickHandler;
        
        public class Main implements EntryPoint {
        
            public void onModuleLoad() {
        	final DynamicForm form = new DynamicForm();
        
        	form.setValidateOnChange(true);
        
        	TextItem txt1 = new TextItem();
        	txt1.setRequired(true);
        
        	TextItem txt2 = new TextItem();
        	txt2.setRequired(true);
        
        	TextItem txt3 = new TextItem();
        	txt3.setRequired(true);
        
        	ButtonItem validateItem = new ButtonItem();
        	validateItem.setTitle("Validate");
        	validateItem.addClickHandler(new ClickHandler() {
        	    public void onClick(ClickEvent event) {
        		form.validate(false);
        	    }
        	});
        
        	form.setFields(txt1, txt2, txt3, validateItem);
        
        	form.draw();
            }
        }

        Comment


          #5
          We have a developer assigned to look at this. We'll update when we have more information

          Thanks
          Isomorphic Software

          Comment


            #6
            This issue should be resolved in the next nightly build dated Aug 13 (3.1p and 4.0d branches)

            Regards
            Isomorphic Software

            Comment

            Working...
            X