Announcement

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

    SelectItem- Issue with html char (&)

    I have a problem with SelectItem (com.smartgwt.client.widgets.form.fields.SelectItem). The values after '&' (ampersand) is trimmed.
    For Ex: If I select a values AB&C, the select item it only shows AB. Anything after & will not be visible.
    This is habbening only in IE browser. In Google Crome it is working fine.

    Environment: Win7, IE8 browser. SmartGwt 3.0

    Code:
    SelectItem ownCOE = new SelectItem("ownCOE", "Owning COE");
    ownCOE.setValueMap(toolData.getOwningCOEList_New());
    ownCOE.setDefaultValue(toolData.getOwningCOE());
    ownCOE.setWidth(250);
    Attached Files

    #2
    Display values in a valueMap are treated as HTML. So & needs to be &

    Note it's incorrect for both browsers, Chrome is just being more forgiving.

    Comment


      #3
      Also try...

      ownCOE.setEscapeHTML(true);

      This worked for me, though I'm using a datasource-bound selectItem, which shouldn't matter.

      Comment


        #4
        Don't find setEscapeHTML(boolean) method.

        I don't find setEscapeHTML(boolean) method defined for SelectItem.

        I'm importing below SelectItem.
        import com.smartgwt.client.widgets.form.fields.SelectItem;

        Comment

        Working...
        X