Announcement

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

    displayValue from valueMap within DMI

    Hi, for a field of a SQLDataSource that has a <valueMap> in its definition, is there a supported way to retrieve the "displayValue" server-side (i.e., in a DMI)?

    #2
    Hi claudiobosticco

    Perhaps https://smartclient.com/smartgwt-13....a.lang.String-

    Best regards
    Blama

    Comment


      #3
      Hi Blama, thanks, field.getMapProperty("valueMap") works to retrieve the valueMap.
      Then it seems that I'm able to get the key of the <fmt:message> tag using a LocaleMessage class which isn't documented.
      is it safe to do this, Isomorphic ?
      Code:
      Object localeMessage = valueMap.get(key.toString());
       String displayValue = localeMessage instanceof String ? (String) localeMessage : ((LocaleMessage) localeMessage).getKey();

      Comment


        #4
        This is a reasonable approach, and in the latest builds (15.0) we've added docs to make this clear. Can you check those out and be sure we've covered your usage? Because this is something we want to support long term for you.

        Comment

        Working...
        X