Announcement

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

    When defining enum in ds.xml, can i somehow define valueicons?

    In my DS enums, i have 'valueMap' that always gets picked up as i would like. For example:
    Code:
    <valueMap>
                    <value id="0">-</value>
                    <value id="1">Green</value>
                    <value id="2">Yellow</value>
                    <value id="3">Red</value>
                </valueMap>
    However, i would like to have icons also, in addition to or instead of the text as values. Can this be done?

    I tried defining a
    Code:
                <valueIcons>
                    <value id="0"></value>
                    <value id="1">images/trafficlights/green.png</value>
                    <value id="2">images/trafficlights/yellow.png</value>
                    <value id="3">images/trafficlights/red.png</value>
                </valueIcons>
    But that didn't work. If i could define it next to the values in the map somehow would be great!

    #2
    Configuring valueIcons at the DataSourceField level is not currently supported; they need to be placed on component definitions instead.

    Comment


      #3
      Hey, thanks for getting back.

      What do you mean with "component definitions"? You mean when i create the actual Java object, i.e. do it manually?

      Comment


        #4
        Yeah, valueIcons must be specified as part of the actual component definitions - that's where the APIs actually exist in docs.

        valueIcons have different meanings for different components, so a central definition does not necessarily make sense - most likely you would still need component-specific settings to control exactly how valueIcons appear and are displayed for each component type.

        Comment


          #5
          OK. Kind of unfortunate though, i have all my enum-values for all my components enum fields defined in XML, but now, for icons, i have to hard-code it.

          Here's to hoping you'll support it in XML eventually.

          Thanks for the quick response.

          Comment

          Working...
          X