Announcement

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

    MultiComboBoxItem and ComboBoxItem difference with unknown value display

    Hi Isomorphic,

    We have noticed a difference in behavior between the MultiComboBoxItem and the ComboBoxItem when it comes to displaying an unknown value selection.

    We modified the showcase example for the https://smartclient.com/smartgwt/sho...bobox_category, as follows.

    Code:
            final MultiComboBoxItem suppliesItem = new MultiComboBoxItem("supplies", "Items");
            suppliesItem.setOptionDataSource(ItemSupplyXmlDS.getInstance());
            suppliesItem.setDisplayField("itemName");
            suppliesItem.setValueField("SKU");
            suppliesItem.setValue(new String[] { "58074604", "Unknown", "1089400", "6024900" });
            suppliesItem.setAutoFetchData(true);
            suppliesItem.setLayoutStyle(initialLayoutStyle);
    
            final ComboBoxItem suppliesItem2 = new ComboBoxItem("supplies2", "Items2");
            suppliesItem2.setMultiple(true);
            suppliesItem2.setOptionDataSource(ItemSupplyXmlDS.getInstance());
            suppliesItem2.setDisplayField("itemName");
            suppliesItem2.setValueField("SKU");
            suppliesItem2.setValue(new String[] { "58074604", "Unknown", "1089400", "6024900" });
            suppliesItem2.setAutoFetchData(true);
            suppliesItem2.setWidth(800);
    Both have a value selection that contains an unknown value that cannot be found in the ItemSupplyXmlDS data.

    You can see the difference below.

    Click image for larger version

Name:	unknown2023-03-25 191607.png
Views:	107
Size:	18.7 KB
ID:	269901

    The ComboBoxItem displays the unknown value using the raw value, whereas, the MultiComboBoxItem completely hides its existence.

    Is there any way to make the MultiComboBoxItem behave like the ComboBoxItem and show the unknown selection in this situation?

    Thanks
Working...
X