Announcement

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

    gwt.mobile issue: AssertionError on tap SelectItem

    Hello!

    I am working on converting an existing smartgwt web app to a more minimal smartgwt.mobile version for better smartphone layout.

    I ran into a very strange problem with SelectItem. When it is generated in the constructor, I get no issues at all, but as soon as I tap it, it generates an AssertionError and the app crashes and generates a debug mode breakpoint in the js code in a function hinting something about "hidden".
    The TextItems in the Sample code works flawlessly. I also tried creating a ColorPickerItem, which should work out of the box (minimizing the risk of error on my part), but it generates the exact same error. We have tried it on multiple computers as well as multiple browers, which still generates the same error.

    If anyone have any idea of what could be causing this, it would be of immense help.
    I hope this is the best place to post these questions. If anyone could point me to groups/communities specificly targeted towards gwt.mobile, it would be great, since I had trouble finding resources around it.

    Sample code:
    Code:
    import java.util.ArrayList;
    import java.util.LinkedHashMap;
    
    import com.google.gwt.core.shared.GWT;
    import com.smartgwt.mobile.client.types.FormStyle;
    import com.smartgwt.mobile.client.widgets.ScrollablePanel;
    import com.smartgwt.mobile.client.widgets.form.DynamicForm;
    import com.smartgwt.mobile.client.widgets.form.fields.SelectItem;
    import com.smartgwt.mobile.client.widgets.form.fields.TextItem;
    
    public class MobileFilterPanel extends ScrollablePanel{
    
        private TextItem aTextItem = new TextItem("a", "a", "a");
        private TextItem bTextItem = new TextItem("b", "b", "b");
        private TextItem cTextItem = new TextItem("c", "c", "c");
        
        private SelectItem typeSelectItem = new SelectItem("type", "Type", "Type");
        private DynamicForm form;
        
        public MobileFilterPanel(String title) {
            super(title);
            
            form = new DynamicForm();
            form.setFormStyle(FormStyle.STYLE2);
    
            typeSelectItem.setName("division");  
            typeSelectItem.setTitle("Division");  
            typeSelectItem.setValueMap("Marketing", "Sales", "Manufacturing", "Services");  
            
            form.setFields(aTextItem, typeSelectItem, cTextItem);
            
            addMember(form);
            
        }
    SmartGWT Version: 2.8.0

    Browser: Chrome Version 57.0.2987.133 (64-bit)

    Javascript error:
    Code:
    undefined
    Exception: java.lang.AssertionError
    Error: java.lang.AssertionError
        at xJf_g$.E_g$ [as createError_0_g$] (MobileFastePortal-0.js:3244:10)
        at xJf_g$.O_g$ [as initializeBackingError_0_g$] (MobileFastePortal-0.js:3299:42)
        at xJf_g$.v_g$ (MobileFastePortal-0.js:3132:8)
        at xJf_g$.rJf_g$ (MobileFastePortal-0.js:49108:8)
        at xJf_g$ (MobileFastePortal-0.js:49143:10)
        at Lce_g$ (MobileFastePortal-0.js:33401:10)
        at WTg_g$.ZLg_g$ [as _isHidden_0_g$] (MobileFastePortal-0.js:69640:18)
        at WTg_g$.hMg_g$ [as checkRep_0_g$] (MobileFastePortal-0.js:69736:36)
        at WTg_g$.nMg_g$ [as show_1_g$] (MobileFastePortal-0.js:69862:8)
        at aXg_g$ (MobileFastePortal-0.js:73920:27)
        at cXg_g$ (MobileFastePortal-0.js:73997:7)
        at WTg_g$.nUg_g$ [as show_0_g$] (MobileFastePortal-0.js:72632:3)
        at Kth_g$.g1g_g$ [as showPicker_1_g$] (MobileFastePortal-0.js:76620:15)
        at Kth_g$.W_g_g$ [as _onEnd_0_g$] (MobileFastePortal-0.js:76050:16)
        at Kth_g$.H0g_g$ [as onBrowserEvent_0_g$] (MobileFastePortal-0.js:76402:14)
        at Kth_g$.xsh_g$ [as onBrowserEvent_0_g$] (MobileFastePortal-0.js:86824:36)
        at Pye_g$ (MobileFastePortal-0.js:36670:17)
        at Oye_g$ (MobileFastePortal-0.js:36659:3)
        at HTMLInputElement.ZEe_g$ (MobileFastePortal-0.js:38425:3)
        at Zgc_g$ (MobileFastePortal-0.js:19261:28)
        at ahc_g$ (MobileFastePortal-0.js:19317:16)
        at HTMLInputElement.<anonymous> (MobileFastePortal-0.js:19297:14)
    console.groupEnd

    #2
    Have you read the FAQ on when to use smartgwt.mobile and the SmartGWT Mobile Development ? There are specific scenarios when it could make sense to use SmartGWT.mobile but you don't appear to fall into one of those scenarios.

    Comment

    Working...
    X