Announcement

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

    Unable to populate FilterBuilder enum field after upgrade to SmartGWT 6

    Hi I'm upgrading some legacy code compiled with SmartGWT 3.

    I have a FilterBuilder that I set a DataSource on. One of the fields in the datasource is DataSourceEnumField. The current working code looks like this to allow me to populate the field's options as a dropdown based on a custom enum object (DealStatus).

    Working SGWT3 code...
    Code:
    SelectItem dealStatusSelectItem = new SelectItem(Fields.DEAL_STATUS);
    dealStatusSelectItem.setValueMap(DealStatus.descriptionsMap());
    dealStatusSelectItem.setValueIcons(DealStatus.iconsMap());
    
    DataSourceEnumField dealStatus = new DataSourceEnumField(Fields.DEAL_STATUS);
    dealStatus.setValidOperators(ClientUtils.standardEnumOperators());
    dealStatus.setEditorProperties(dealStatusSelectItem);
    fields.add(dealStatus); // to datasource
    However after upgrading to SmartGWT 6 the dropdown in the FilterBuilder is populated with many blank entries (way more than my enum class contains). I've tried a few things but can't find any documentation on how to achieve this in 6.

    What do I need to change?

    Thanks


    #2
    We've made a change to address this issue. Please try the next nightly build, dated August 24.

    Regards
    Isomorphic Software

    Comment


      #3
      Hey, thanks for that. It now works but still has a couple of issues.

      1. Invalid enum value shown
      ​Select an enum field from the picker and select an entry. Now change the field picker to another enum field. In the dropdown you see the selected value from the first field which is not a valid entry for the second enum field.

      2. Icons not shown
      When manually (user via UI) constructing a new filter by selecting the enum field from the field picker I don't see the icons displayed. If I setCriteria programatically I see the icons shown correctly. Icons specified using setValueIcons as in the snippet in original post.

      Thanks

      Comment


        #4
        We've made a change which should address these issues in both the 11.1 and 11.0 branches. Please try the next nightly build, dated August 30 or above.

        Regards
        Isomorphic Software

        Comment


          #5
          Thanks!

          Comment

          Working...
          X