Hi Isomorphic,
please see this BuiltInDS-based testcase (FF26 Dev mode using v11.1p_2017-11-16).
It seems that the MultiComboBoxItem is just not working when using the mouse to select entries first. I can see it working though here in the samples, so there must be some difference here.
Video, see that the selection is not working in the beginning, but is working when you enter a letter via keyboard first.
Also note how the 2nd MCBI is working without a keypress after the 1st MCBI is repaired by a keypress and that this is not the case for the 3rd MCBI.
It would be great if you could fix this one as I'd really like to use MultiComboBoxItem because it does look good and would a use here here perfectly.
I also have an additional question/issue:
Even if I close and repopen the window via my "Recreate" button, I only have one request in the Developer Console the whole time I'm using the different MCBI/CBI in the testcase.
Is this correct? If so, how can I force a data reload here?
Best regards
Blama
please see this BuiltInDS-based testcase (FF26 Dev mode using v11.1p_2017-11-16).
It seems that the MultiComboBoxItem is just not working when using the mouse to select entries first. I can see it working though here in the samples, so there must be some difference here.
Code:
package com.smartgwt.sample.client; import com.google.gwt.core.client.EntryPoint; import com.smartgwt.client.Version; import com.smartgwt.client.core.KeyIdentifier; import com.smartgwt.client.data.AdvancedCriteria; import com.smartgwt.client.data.Criterion; import com.smartgwt.client.data.DataSource; import com.smartgwt.client.types.MultiComboBoxLayoutStyle; import com.smartgwt.client.types.OperatorId; import com.smartgwt.client.util.Page; import com.smartgwt.client.util.PageKeyHandler; import com.smartgwt.client.util.SC; import com.smartgwt.client.widgets.IButton; import com.smartgwt.client.widgets.Window; import com.smartgwt.client.widgets.events.ClickEvent; import com.smartgwt.client.widgets.events.ClickHandler; import com.smartgwt.client.widgets.form.DynamicForm; import com.smartgwt.client.widgets.form.fields.ComboBoxItem; import com.smartgwt.client.widgets.form.fields.MultiComboBoxItem; import com.smartgwt.client.widgets.layout.VLayout; public class BuiltInDS implements EntryPoint { private VLayout mainLayout; private IButton recreateBtn; public void onModuleLoad() { KeyIdentifier debugKey = new KeyIdentifier(); debugKey.setCtrlKey(true); debugKey.setKeyName("D"); Page.registerKey(debugKey, new PageKeyHandler() { public void execute(String keyName) { SC.showConsole(); } }); mainLayout = new VLayout(20); mainLayout.setWidth100(); mainLayout.setHeight100(); recreateBtn = new IButton("Recreate"); recreateBtn.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { recreate(); } }); mainLayout.addMember(recreateBtn); recreate(); mainLayout.draw(); } private void recreate() { Window w = new Window(); w.setWidth("95%"); w.setHeight("95%"); w.setMembersMargin(0); w.setModalMaskOpacity(70); w.setTitle(" (" + Version.getVersion() + "/" + Version.getSCVersionNumber() + ")"); w.setTitle("MultiComboBoxItem problems with mouse selection" + w.getTitle()); w.setShowMinimizeButton(false); w.setIsModal(true); w.setShowModalMask(true); w.centerInPage(); final DynamicForm df = new DynamicForm(); df.setDataSource(DataSource.get("animals")); df.setHeight(200); df.setWidth(500); df.setTitleWidth(200); df.setAutoFetchData(false); MultiComboBoxItem mcbiFlow = new MultiComboBoxItem("TEST1"); mcbiFlow.setOptionDataSource(DataSource.get("animals")); mcbiFlow.setTitle("Favorite Animals Flow-MCBI"); mcbiFlow.setComboBoxProperties(new ComboBoxItemProperties()); mcbiFlow.setDisplayField("commonName"); mcbiFlow.setValueField("scientificName"); MultiComboBoxItem mcbiHorizontal = new MultiComboBoxItem("TEST2"); mcbiHorizontal.setOptionDataSource(DataSource.get("animals")); mcbiHorizontal.setTitle("Favorite Animals Horizontal-MCBI"); mcbiHorizontal.setLayoutStyle(MultiComboBoxLayoutStyle.HORIZONTALREVERSE); mcbiHorizontal.setComboBoxProperties(new ComboBoxItemProperties()); mcbiHorizontal.setDisplayField("commonName"); mcbiHorizontal.setValueField("scientificName"); MultiComboBoxItem mcbiVertical = new MultiComboBoxItem("TEST3"); mcbiVertical.setOptionDataSource(DataSource.get("animals")); mcbiVertical.setTitle("Favorite Animals Vertical-MCBI"); mcbiVertical.setLayoutStyle(MultiComboBoxLayoutStyle.VERTICAL); mcbiVertical.setComboBoxProperties(new ComboBoxItemProperties()); mcbiVertical.setDisplayField("commonName"); mcbiVertical.setValueField("scientificName"); ComboBoxItem testCBI = new ComboBoxItemProperties(); testCBI.setName("TEST4"); testCBI.setTitle("Favorite Animals CBI"); testCBI.setDisplayField("commonName"); testCBI.setValueField("scientificName"); df.setFields(mcbiFlow, mcbiHorizontal, mcbiVertical, testCBI); w.addItem(df); w.show(); } private class ComboBoxItemProperties extends ComboBoxItem { public ComboBoxItemProperties() { super(); setPickListCriteria(new AdvancedCriteria(new Criterion("commonName", OperatorId.GREATER_OR_EQUAL, "M"))); } } }
Also note how the 2nd MCBI is working without a keypress after the 1st MCBI is repaired by a keypress and that this is not the case for the 3rd MCBI.
It would be great if you could fix this one as I'd really like to use MultiComboBoxItem because it does look good and would a use here here perfectly.
I also have an additional question/issue:
Even if I close and repopen the window via my "Recreate" button, I only have one request in the Developer Console the whole time I'm using the different MCBI/CBI in the testcase.
Is this correct? If so, how can I force a data reload here?
Best regards
Blama
Comment