Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

ListGridField - editorType=MultiComboBoxItem

$
0
0
I'm trying to use the MultiComboBoxItem as the editor for a ListGridField with multiple="true." It appears to be mostly working until I have made selections that cause the width of the buttons + the combobox to be wider than the field width after which I get errors in the development console and the UI becomes sluggish and basically unusable. I'm using an old build of 4.1p - 2014-09-18 - but was able to reproduce with the 01/29 build as well.

Errors:
08:48:25.876 [ERROR] [builtinds] 08:48:25.874:TMR8:WARN:HLayout:isc_HLayout_0:ignoring bad or negative left: NaN [enable 'sizing' log for stack trace]

com.smartgwt.client.core.JsObject$SGWT_WARN: 08:48:25.874:TMR8:WARN:HLayout:isc_HLayout_0:ignoring bad or negative left: NaN [enable 'sizing' log for stack trace]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
at java.lang.Thread.run(Thread.java:722)

08:49:50.844 [ERROR] [builtinds] 08:49:50.843:TMR0[E]:WARN:Canvas:Auto allocation of tab-indices has reached native browser ceiling - tab-order cannot be guaranteed for widgets on this page.

com.smartgwt.client.core.JsObject$SGWT_WARN: 08:49:50.843:TMR0[E]:WARN:Canvas:Auto allocation of tab-indices has reached native browser ceiling - tab-order cannot be guaranteed for widgets on this page.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
at java.lang.Thread.run(Thread.java:722)

I've reduced the problem to a test case:
Code:

public void onModuleLoad() {
            final ListGrid grid = new ListGrid();
            grid.setCanEdit(true);
            ListGridField number = new ListGridField("Number");
            ListGridField field = new ListGridField("animal");
            field.setCanEdit(true);
            field.setMultiple(true);
            MultiComboBoxItem editor = new MultiComboBoxItem();
            editor.setValueField("scientificName");
            editor.setDisplayField("commonName");
            editor.setOptionDataSource(DataSource.get("animals"));
            editor.setLayoutStyle(MultiComboBoxLayoutStyle.FLOW);
            field.setEditorProperties(editor);
            field.setOptionDataSource(DataSource.get("animals"));
            field.setValueField("scientificName");
            field.setDisplayField("commonName");
           
            grid.setFields(number,field);
            grid.setHeight(300);
            grid.setWidth(500);
            grid.setFixedRecordHeights(false);
            Record r = new Record();
            r.setAttribute("Number",5);
            grid.setData(new Record[] { r});
            grid.draw();
    }

thanks,
dan

Viewing all articles
Browse latest Browse all 4756

Trending Articles