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

      Working...
      X