Announcement

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

    PickList with dataSource valueMap AND static valueMap

    Hi,

    I read this in your docs for the PickList:

    Note that if a normal, static valueMap is also specified for the field (either directly in the form item or as part of the field definition in the dataSource), it will be preferred to the data derived from the optionDataSource for whatever mappings are present.
    What would be a good approach to display both?

    For example, I'd want to show an "All" or "None" or blank option in the list, but none of those options would be in my database.

    I could do a UNION in the select statement, but then I would not want that data appearing in other places.

    Thanks,
    Mike

    SmartClient Version: SC_SNAPSHOT-2011-01-05/LGPL Deployment (built 2011-01-05)

    #2
    Have you seen emptyDisplayValue? That's usually used for this.

    Comment


      #3
      OK...that's good...it handles the case of a blank or null or otherwise undefined value.

      But what about an "All" option?

      Or if I had an arbitrary number of "hard-coded" options I needed to add?

      I suppose I could create a new datasource just for this control, and then add the additional options in the response transform?

      Thanks,
      Mike

      Comment


        #4
        Typically (if we're talking about a search form) blank means ALL.

        But yes if you had arbitrary additional options, you could add them via transformResponse().

        Comment

        Working...
        X