Announcement

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

    DynamicForm throws an error when calling setCanFocus(false) on it, in 6.1d

    I have an application that does a DynmaicForm.setCanFocus(false) when setting up the form. This has worked fine under the 6.0 version of SmartGWT, but now with 6.1d it throws the exception below, which causing the app to break. Any reason why?

    SmartClient Version: SNAPSHOT_v11.1d_2017-05-05/LGPL Development Only (built 2017-05-05)
    GWT:2.8.1

    13:30:30.737:WARN:Log:TypeError: Unable to get property 'length' of undefined or null reference
    Stack from error.stack:
    DynamicForm._canFocus () @ test.Main/sc/modules/ISC_Forms.js:275:143
    Canvas.initializeTabPosition () @ test.Main/sc/modules/ISC_Core.js:3279:328
    Canvas.init () @ test.Main/sc/modules/ISC_Core.js:2452:1
    Class.completeCreation () @ test.Main/sc/modules/ISC_Core.js:327:1
    Class.create () @ test.Main/sc/modules/ISC_Core.js:215:1829
    OR () @ Unknown script code:1:26888
    KC () @ Unknown script code:21:352
    Tm () @ Unknown script code:47:409
    g () @ Unknown script code:101:110
    ub () @ Unknown script code:294:20
    xb () @ Unknown script code:116:146
    Anonymous function () @ Unknown script code:659:39
    Km () @ Unknown script code:102:41
    Global code () @ Unknown script code:1:25227
    m () @ test.Main/test.Main.nocache.js:9:466
    Anonymous function () @ test.Main/test.Main.nocache.js:10:55
    d () @ test.Main/test.Main.nocache.js:6:71

    Standalone test case:

    Code:
    public void onModuleLoad() {
            HLayout layout = new HLayout(20);  
              
            final DynamicForm form = new DynamicForm();  
            form.setWidth(250);  
              
            TextItem usernameItem = new TextItem();  
            usernameItem.setTitle("Username");  
            usernameItem.setRequired(true);  
            usernameItem.setDefaultValue("bob");  
     
            TextItem emailItem = new TextItem();  
            emailItem.setTitle("Email");  
            emailItem.setRequired(true);  
            emailItem.setDefaultValue("bob@isomorphic.com");
            
            form.setFields(new FormItem[] {usernameItem, emailItem});
            
            form.setCanFocus(false); // This fails under 6.1d
            
            layout.addMember(form);   
     
            layout.draw();
        }
Working...
X