Announcement

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

    5.1p/6.1p ValueIcon problem with two images created, one with wrong URL

    Hi Isomorphic,

    I have a strange error I can't reproduce (using current 5.1/Simplicity or 6.1/Tahoe based skins, tested with v10.1p_2017-10-05 and v11.1p_2017-10-05). I have longstanding problems with icons as ListGridField values and filters (I'll create a testcase for this as well). Now I tried using valueIcons instead.
    Here I have a strange issue that the framework generates two images for the value (as background and - failing - as img-tag)
    Unfortunately I'm not able reproduce the issue, but I have a testcase that very closely matches my application setup. Perhaps you already have a idea how this could happen?

    This is the erroneous markup I get:
    Click image for larger version

Name:	IMG-Markup.png
Views:	140
Size:	28.8 KB
ID:	249515
    Of course, the URL of the IMG-tag does not work, It's only that "Y" is the value (field of type="text" length="1", no escapeHTML).



    This is my testcase screenshot, which does not show the issue (correct - only one IMG-tag):
    Click image for larger version

Name:	IMG-Markup-OK.png
Views:	80
Size:	16.4 KB
ID:	249516

    BuiltInDS.java:
    Code:
    package com.smartgwt.sample.client;
    
    import java.util.LinkedHashMap;
    
    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.GroupStartOpen;
    import com.smartgwt.client.types.ListGridFieldType;
    import com.smartgwt.client.types.OperatorId;
    import com.smartgwt.client.types.RecordComponentPoolingMode;
    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.fields.SelectItem;
    import com.smartgwt.client.widgets.grid.HoverCustomizer;
    import com.smartgwt.client.widgets.grid.ListGrid;
    import com.smartgwt.client.widgets.grid.ListGridField;
    import com.smartgwt.client.widgets.grid.ListGridRecord;
    import com.smartgwt.client.widgets.layout.VLayout;
    
    public class BuiltInDS extends VLayout implements EntryPoint {
        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();
                }
            });
    
            // DefaultApperanceSetter.setDefaultApperance();
    
            setWidth100();
            setHeight100();
    
            recreateBtn = new IButton("Recreate");
            recreateBtn.addClickHandler(new ClickHandler() {
                @Override
                public void onClick(ClickEvent event) {
                    new MyWindow().show();
                }
            });
            addMember(recreateBtn);
            new MyWindow().show();
            draw();
        }
    
        private class MyWindow extends Window {
            public MyWindow() {
                setWidth("95%");
                setHeight("95%");
                setMembersMargin(0);
                setModalMaskOpacity(70);
                setTitle(" (" + Version.getVersion() + "/" + Version.getSCVersionNumber() + ")");
                setTitle("ValueIcon problem with two images (img-tag and CSS background-image)" + getTitle());
                setShowMinimizeButton(false);
                setIsModal(true);
                setShowModalMask(true);
                centerInPage();
    
                ListGrid valueIconTest = new ValueIconTest();
                addItem(valueIconTest);
                ListGrid valueIconTest2 = new ValueIconTest();
                addItem(valueIconTest2);
            }
        }
    
        private class ValueIconTest extends ListGrid {
            public ValueIconTest() {
                super(DataSource.get("animals"));
                setWidth(1000);
                setHeight(500);
                setShowFilterEditor(true);
    
                setAutoFetchData(false);
                setShowRecordComponents(true);
                setShowRecordComponentsByCell(true);
                setRecordComponentPoolingMode(RecordComponentPoolingMode.RECYCLE);
                setPoolComponentsPerColumn(true);
                setRecordComponentHeight(22);
                setCanGroupBy(false);
                setCanReorderFields(true);
                setGroupStartOpen(GroupStartOpen.ALL);
                setSortByGroupFirst(true);
                setAllowFilterExpressions(true);
    
                setGroupByField("lifeSpan");
    
                ListGridField lifeSpanLGF = new ListGridField("lifeSpan");
                ListGridField commonNameLGF = new ListGridField("commonName");
                ListGridField statusLGF = new StatusListGridField("status");
                ListGridField status2LGF = new StatusListGridField("status2");
    
                setFields(commonNameLGF, lifeSpanLGF, statusLGF, status2LGF);
                setSortField("commonName");
                fetchData(new AdvancedCriteria(new Criterion("commonName", OperatorId.LESS_OR_EQUAL, "F")));
            }
    
            @Override
            protected String getCellCSSText(ListGridRecord record, int rowNum, int colNum) {
                String cssText = "color:#888;";
                return cssText;
            }
        }
    
        private class StatusListGridField extends ListGridField {
            public StatusListGridField(String name) {
                super(name);
    
                setType(ListGridFieldType.IMAGE);
                setValueIconSize(16);
                setValueMap(getIconValueMap());
                setHoverCustomizer(new HoverCustomizer() {
                    @Override
                    public String hoverHTML(Object value, ListGridRecord record, int rowNum, int colNum) {
                        if (record == null)
                            return null;
                        else
                            switch (record.getAttribute("status")) {
                            case "Threatened":
                                return "TEST2-Threatened";
                            case "Endangered":
                                return "TEST2-Endangered";
                            case "Not Endangered":
                                return "TEST2-Not Endangered";
                            case "Not currently listed":
                                return "TEST2-Not currently listed";
                            case "May become threatened":
                                return "TEST2-May become threatened";
                            case "Protected":
                                return "TEST2-Protected";
                            default:
                                return null;
                            }
                    }
                });
                setShowHover(true);
                setHoverWidth(100);
    
                setWidth(150);
                setCanDragResize(false);
                setCanFilter(true);
                setFilterEditorProperties(new SelectItemStatus());
            }
    
            private LinkedHashMap<String, String> getIconValueMap() {
                LinkedHashMap<String, String> vM = new LinkedHashMap<String, String>();
                vM.put("Threatened", "[SKINIMG]actions/approve.png");
                vM.put("Endangered", "[SKINIMG]actions/exclamation.png");
                vM.put("Not Endangered", "[SKINIMG]actions/help.png");
                vM.put("Not currently listed", "[SKINIMG]actions/prev.png");
                vM.put("May become threatened", "[SKINIMG]actions/cancel.png");
                vM.put("Protected", "");
                return vM;
            }
        }
    
        private class SelectItemStatus extends SelectItem {
            public SelectItemStatus() {
                super();
                setValueMap(getDisplayMap());
                setAllowEmptyValue(true);
                setMultiple(true);
            }
    
            private LinkedHashMap<String, String> getDisplayMap() {
                LinkedHashMap<String, String> vM = new LinkedHashMap<String, String>();
                vM.put("Threatened", "TEST-Threatened");
                vM.put("Endangered", "TEST-Endangered");
                vM.put("Not Endangered", "TEST-Not Endangered");
                vM.put("Not currently listed", "TEST-Not currently listed");
                vM.put("May become threatened", "TEST-May become threatened");
                vM.put("Protected", "TEST-Protected");
                return vM;
            }
        }
    }
    Does this give you an idea of what might be happening?
    Perhaps I'm missing some code to trigger the issue in the tetscase. What does control if the valueIcon image is created as CSS background-image or as IMG-tag?

    Best regards
    Blama

    #2
    Hi Isomorphic,

    I got it reproduced using v10.1p_2017-10-05 (happens in my application also in current 6.1p). There is also an additional issue: See the FilterEditor for the 2nd status field - it does have the valueMap, while the 1st one does not. IMHO they should both have it.
    The 1st issue is the broken additional IMG tag you can see below. This does not bother in FF or GC, but in Safari, which will display a broken/missing img-icon.

    Please see this testcase:
    BuiltInDS.java:
    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.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.grid.ListGrid;
    import com.smartgwt.client.widgets.grid.ListGridField;
    import com.smartgwt.client.widgets.layout.VLayout;
    
    public class BuiltInDS extends VLayout implements EntryPoint {
        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();
                }
            });
    
            setWidth100();
            setHeight100();
    
            recreateBtn = new IButton("Recreate");
            recreateBtn.addClickHandler(new ClickHandler() {
                @Override
                public void onClick(ClickEvent event) {
                    new MyWindow().show();
                }
            });
            addMember(recreateBtn);
            new MyWindow().show();
            draw();
        }
    
        private class MyWindow extends Window {
            public MyWindow() {
                setWidth("95%");
                setHeight("95%");
                setMembersMargin(0);
                setModalMaskOpacity(70);
                setTitle(" (" + Version.getVersion() + "/" + Version.getSCVersionNumber() + ")");
                setTitle("ValueIcon problem with two images (img-tag and CSS background-image)" + getTitle());
                setShowMinimizeButton(false);
                setIsModal(true);
                setShowModalMask(true);
                centerInPage();
    
                ListGrid valueIconTest = new ValueIconTest();
                addItem(valueIconTest);
            }
        }
    
        private class ValueIconTest extends ListGrid {
            public ValueIconTest() {
                super(DataSource.get("animals"));
                setWidth(1000);
                setHeight(500);
                setShowFilterEditor(true);
                setAutoFetchData(false);
    
                ListGridField lifeSpanLGF = new ListGridField("lifeSpan");
                ListGridField commonNameLGF = new ListGridField("commonName");
                ListGridField statusLGF = new MyLGF("status");
                ListGridField status2LGF = new MyLGF("status2");
    
                setFields(commonNameLGF, lifeSpanLGF, statusLGF, status2LGF);
                setSortField("commonName");
                fetchData(new AdvancedCriteria(new Criterion("commonName", OperatorId.LESS_OR_EQUAL, "F")));
            }
        }
    }

    MyLGF.java:
    Code:
    package com.smartgwt.sample.client;
    
    import java.util.LinkedHashMap;
    
    import com.smartgwt.client.types.ListGridFieldType;
    import com.smartgwt.client.widgets.grid.HoverCustomizer;
    import com.smartgwt.client.widgets.grid.ListGridField;
    import com.smartgwt.client.widgets.grid.ListGridRecord;
    
    public final class MyLGF extends ListGridField {
        public final static String THREATENED = "Threatened";
        public final static String ENDANGERED = "Endangered";
        public final static String NOTENDANGERED = "Not Endangered";
        public final static String NOTCURRENTLYLISTED = "Not currently listed";
        public final static String MAYBECOMETHREATENED = "May become threatened";
        public final static String PROTECTED = "Protected";
    
        public MyLGF(final String dealregFieldName) {
            super(dealregFieldName);
            setType(ListGridFieldType.IMAGE);
            // setValueMap(getStatusIconValueMap());
            setValueIcons(getStatusIconValueMap());
            setHoverCustomizer(new HoverCustomizer() {
                @Override
                public String hoverHTML(Object value, ListGridRecord record, int rowNum, int colNum) {
                    if (record == null)
                        return null;
                    else
                        switch (record.getAttribute(dealregFieldName)) {
                        case THREATENED:
                            return "Hover.Threatened";
                        case ENDANGERED:
                            return "Hover.Endangered";
                        case NOTENDANGERED:
                            return "Hover.NotEndangered";
                        case NOTCURRENTLYLISTED:
                            return "Hover.NotCurrentlyListed";
                        case MAYBECOMETHREATENED:
                            return "Hover.MayBecomeThreatened";
                        case PROTECTED:
                            return "Hover.Protected";
                        default:
                            return null;
                        }
                }
            });
            setShowHover(true);
            setHoverWidth(100);
    
            setWidth(50);
            setCanDragResize(false);
            setCanFilter(true);
            setFilterEditorProperties(new MySI());
        }
    
        private static LinkedHashMap<String, String> getStatusIconValueMap() {
            LinkedHashMap<String, String> vM = new LinkedHashMap<String, String>();
            vM.put(THREATENED, "[SKINIMG]actions/approve.png");
            vM.put(ENDANGERED, "[SKINIMG]actions/exclamation.png");
            vM.put(NOTENDANGERED, "[SKINIMG]actions/help.png");
            vM.put(NOTCURRENTLYLISTED, "[SKINIMG]actions/add.png");
            vM.put(MAYBECOMETHREATENED, "[SKINIMG]actions/cancel.png");
            vM.put(PROTECTED, "[SKINIMG]actions/first.png");
            return vM;
        }
    
        public static LinkedHashMap<String, String> getStatusDisplayMap() {
            LinkedHashMap<String, String> vm = new LinkedHashMap<String, String>();
            vm.put(THREATENED, "DisplayMap.Threatened");
            vm.put(ENDANGERED, "DisplayMap.Endangered");
            vm.put(NOTENDANGERED, "DisplayMap.NotEndangered");
            vm.put(NOTCURRENTLYLISTED, "DisplayMap.NotCurrentlyListed");
            vm.put(MAYBECOMETHREATENED, "DisplayMap.MayBecomeThreatened");
            vm.put(PROTECTED, "DisplayMap.Protected");
            return vm;
        }
    }
    MySI.java:
    Code:
    package com.smartgwt.sample.client;
    
    import com.smartgwt.client.widgets.form.fields.SelectItem;
    
    public class MySI extends SelectItem {
    
        public MySI(String name) {
            super(name);
            configure();
        }
    
        public MySI() {
            super();
            configure();
        }
    
        private void configure() {
            setValueMap(MyLGF.getStatusDisplayMap());
            setAllowEmptyValue(true);
            setMultiple(true);
        }
    }
    Screenshots:
    Click image for larger version

Name:	IMG-Markup.png
Views:	134
Size:	44.7 KB
ID:	249521

    Best regards
    Blama

    Comment


      #3
      We are not yet seeing the bad image issue. Note that the second status field is not part of the default animals DS so there is no value/icon showing in our tests. If you have further details that may help, including a further simplified test case that would be very helpful.

      As for the filter editor, the filterEditorProperties.valueMap has lower priority than the DSField.valueMap so that is what you see in the first case. To override the DSField.valueMap use ListGridField.setFilterEditorValueMap() instead.

      Comment


        #4
        Hi Isomorphic,

        sorry, I forgot the .ds.xml change:
        Code:
                <field name="status2"         title="Endangered Status2" length="30" type="text" sortByField="lifeSpan" canSave="false" hidden="true" customSelectExpression="status" />
        Best regards
        Blama

        Comment


          #5
          Hi Isomorphic,

          Originally posted by Isomorphic View Post
          As for the filter editor, the filterEditorProperties.valueMap has lower priority than the DSField.valueMap so that is what you see in the first case. To override the DSField.valueMap use ListGridField.setFilterEditorValueMap() instead.
          as both, statusLGF and status2LGF both use the same ListGridField-subclass and are unmodified after the new call, I'd expect them to look the same - I don't know which display is the correct one, but they should look the same.

          Best regards
          Blama
          Last edited by Blama; 9 Oct 2017, 06:48. Reason: typos

          Comment


            #6
            The "status" DataSource field still has a ValueMap and "status2" does not. Therefore, using the code you provided, the result will be different. If you switch the LGF subclass to us setFilterEditorValueMap instead of the fileEditorProperties they should both look the same. Alternatively, don't provide a ValueMap for the DSField at all.

            Comment


              #7
              Hi Isomorphic,

              thanks for the answer. I did not see that you wrote DSField.valueMap. Of course the 1st field has the implicit valueMap from the .ds.xml.
              This way I can solve the filterEditor-issue with the following code, but the 2 img-issue stays:

              BuiltInDS.java:
              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.AutoFitWidthApproach;
              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.grid.ListGrid;
              import com.smartgwt.client.widgets.grid.ListGridField;
              import com.smartgwt.client.widgets.layout.VLayout;
              
              public class BuiltInDS extends VLayout implements EntryPoint {
                  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();
                          }
                      });
              
                      setWidth100();
                      setHeight100();
              
                      recreateBtn = new IButton("Recreate");
                      recreateBtn.addClickHandler(new ClickHandler() {
                          @Override
                          public void onClick(ClickEvent event) {
                              new MyWindow().show();
                          }
                      });
                      addMember(recreateBtn);
                      new MyWindow().show();
                      draw();
                  }
              
                  private class MyWindow extends Window {
                      public MyWindow() {
                          setWidth("95%");
                          setHeight("95%");
                          setMembersMargin(0);
                          setModalMaskOpacity(70);
                          setTitle(" (" + Version.getVersion() + "/" + Version.getSCVersionNumber() + ")");
                          setTitle("ValueIcon problem with two images (img-tag and CSS background-image)" + getTitle());
                          setShowMinimizeButton(false);
                          setIsModal(true);
                          setShowModalMask(true);
                          centerInPage();
              
                          ListGrid valueIconTest = new ValueIconTest();
                          addItem(valueIconTest);
                      }
                  }
              
                  private class ValueIconTest extends ListGrid {
                      public ValueIconTest() {
                          super(DataSource.get("animals"));
                          setWidth(1000);
                          setHeight(500);
                          setShowFilterEditor(true);
                          setAutoFetchData(false);
                          setCanAutoFitFields(true);
                          setAutoFitExpandField("commonName");
                          setAutoFitFieldsFillViewport(true);
                          setAutoFitWidthApproach(AutoFitWidthApproach.BOTH);
              
                          ListGridField lifeSpanLGF = new ListGridField("lifeSpan");
                          ListGridField commonNameLGF = new ListGridField("commonName");
                          ListGridField statusLGF = new MyLGF("status");
                          ListGridField status2LGF = new MyLGF("status2");
              
                          setFields(commonNameLGF, lifeSpanLGF, statusLGF, status2LGF);
                          setSortField("commonName");
                          fetchData(new AdvancedCriteria(new Criterion("commonName", OperatorId.LESS_OR_EQUAL, "F")));
                      }
                  }
              }
              MyLGF.java:
              Code:
              package com.smartgwt.sample.client;
              
              import java.util.LinkedHashMap;
              
              import com.smartgwt.client.types.ListGridFieldType;
              import com.smartgwt.client.widgets.form.fields.SelectItem;
              import com.smartgwt.client.widgets.grid.HoverCustomizer;
              import com.smartgwt.client.widgets.grid.ListGridField;
              import com.smartgwt.client.widgets.grid.ListGridRecord;
              
              public final class MyLGF extends ListGridField {
                  public final static String THREATENED = "Threatened";
                  public final static String ENDANGERED = "Endangered";
                  public final static String NOTENDANGERED = "Not Endangered";
                  public final static String NOTCURRENTLYLISTED = "Not currently listed";
                  public final static String MAYBECOMETHREATENED = "May become threatened";
                  public final static String PROTECTED = "Protected";
              
                  public MyLGF(final String dealregFieldName) {
                      super(dealregFieldName);
                      setType(ListGridFieldType.IMAGE);
                      // setValueMap(getStatusIconValueMap());
                      setValueIcons(getStatusIconValueMap());
                      setHoverCustomizer(new HoverCustomizer() {
                          @Override
                          public String hoverHTML(Object value, ListGridRecord record, int rowNum, int colNum) {
                              if (record == null)
                                  return null;
                              else
                                  switch (record.getAttribute(dealregFieldName)) {
                                  case THREATENED:
                                      return "Hover.Threatened";
                                  case ENDANGERED:
                                      return "Hover.Endangered";
                                  case NOTENDANGERED:
                                      return "Hover.NotEndangered";
                                  case NOTCURRENTLYLISTED:
                                      return "Hover.NotCurrentlyListed";
                                  case MAYBECOMETHREATENED:
                                      return "Hover.MayBecomeThreatened";
                                  case PROTECTED:
                                      return "Hover.Protected";
                                  default:
                                      return null;
                                  }
                          }
                      });
                      setShowHover(true);
                      setHoverWidth(100);
              
                      setWidth(50);
                      setCanFilter(true);
                      setFilterEditorValueMap(getStatusDisplayMap());
              
                      SelectItem si = new SelectItem();
                      si.setMultiple(true);
              
                      setFilterEditorProperties(si);
                  }
              
                  private static LinkedHashMap<String, String> getStatusIconValueMap() {
                      LinkedHashMap<String, String> vM = new LinkedHashMap<String, String>();
                      vM.put(THREATENED, "[SKINIMG]actions/approve.png");
                      vM.put(ENDANGERED, "[SKINIMG]actions/exclamation.png");
                      vM.put(NOTENDANGERED, "[SKINIMG]actions/help.png");
                      vM.put(NOTCURRENTLYLISTED, "[SKINIMG]actions/add.png");
                      vM.put(MAYBECOMETHREATENED, "[SKINIMG]actions/cancel.png");
                      vM.put(PROTECTED, "[SKINIMG]actions/first.png");
                      return vM;
                  }
              
                  public static LinkedHashMap<String, String> getStatusDisplayMap() {
                      LinkedHashMap<String, String> vm = new LinkedHashMap<String, String>();
                      vm.put(THREATENED, "DisplayMap.Threatened");
                      vm.put(ENDANGERED, "DisplayMap.Endangered");
                      vm.put(NOTENDANGERED, "DisplayMap.NotEndangered");
                      vm.put(NOTCURRENTLYLISTED, "DisplayMap.NotCurrentlyListed");
                      vm.put(MAYBECOMETHREATENED, "DisplayMap.MayBecomeThreatened");
                      vm.put(PROTECTED, "DisplayMap.Protected");
                      return vm;
                  }
              }
              animals.ds.xml (as before):
              Code:
              <field name="status2"         title="Endangered Status2" length="30" type="text" sortByField="lifeSpan" canSave="false" hidden="true" customSelectExpression="status" />
              Display after header "Autofit all columns" for the sample code from this post:
              Click image for larger version

Name:	ValueIcon-2-images.png
Views:	162
Size:	11.7 KB
ID:	249589

              Please see that the 1st column is centered, while the 2nd is not. Also, the 2nd still has 2 images, see #2 for the markup screenshot. In Safari, a broken image is displayed with a missing image icon, while Chrome and Firefox just ignore the broken image and don't display anything.

              Best regards
              Blama

              Comment


                #8
                With the DataSource change we can now see the same results. This is expected behavior. By defining the field type as "image" you are telling the ListGrid that the field contents specifies an image to render. Additionally you are explicitly providing a ValueIcon. So why is the first field not trying to render two images? Because we assume that a ValueIcon on a field with a ValueMap replaces the value and suppress any attempt to render the image for the value separately. This is easily fixed by calling showValueIconOnly(true) in MyLGF.

                Comment


                  #9
                  Hi Isomorphic,

                  that did the trick in the testcase. I'm pretty sure it will solve the problem in my application as well.

                  Thanks a lot,
                  Blama

                  Comment

                  Working...
                  X