Announcement

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

    FilterEditor SelectItem Items Disappear

    I have a ListGridField with icons indicating binary file type ("PDF","DOC","XLS",etc).

    For this ListGrid column, I'd like to implement a FilterEditor that lets the user pick from icons.

    Cribbing from this Showcase example, http://www.smartclient.com/smartgwt/showcase/#styled_combobox_category, I coded it like so:
    Code:
    setFilterEditorProperties(new SelectItem() {
     {
    
      @SuppressWarnings("serial")
      LinkedHashMap<String, String> valueMap = new LinkedHashMap<String, String>() {
    
       {
        put("PDF", "Acrobat");
        put("XLS", "Excel");
        put("DOT", "Word");
       }
      };
    
      setValueMap(valueMap);
    
      @SuppressWarnings("serial")
      LinkedHashMap<String, String> valueIcons = new LinkedHashMap<String, String>() {
    
       {
        put("PDF", GWT.getModuleBaseURL() + "Acrobat.png");
        put("XLS", GWT.getModuleBaseURL() + "Excel-16.gif");
        put("DOT", GWT.getModuleBaseURL() + "Word-16.gif");
       }
      };
    
      setValueIcons(valueIcons);
    
     }
    });
    On the first load of the page, all is as expected.

    The issue is that after the first use, the items start disappearing from the FilterEditor SelectItem.

    See attached graphics.

    Please advise, thanks.


    ------------------
    SmartClient Version: v9.0p_2013-12-31/PowerEdition Deployment (built 2013-12-31)

    IE8

    I'm not seeing any errors in the GWT/SGWT Dev Mode consoles.
    Attached Files

    #2
    You haven't really indicated enough information about how this SelectItem is set up, but generally, you could get this kind of behavior if the SelectItem were using an optionDataSource and the optionDataSource was returning partial lists or empty lists. A SelectItem that just has a valueMap never omits options.

    Comment

    Working...
    X