Announcement

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

    <valueMap> and displayValue

    First a sorry if I'm asking this in the wrong place, but I've been looking around and can't find this info anywhere...

    I have a question about the <valueMap> in the datasource xml (ds.xml file)
    I would like to create a storedValue:displayValue pair. but it isn't clear to me how to do this.

    I have tried;
    <valueMap>
    <value>0:Male</value>
    <value>1:Female</value>
    </valueMap>

    and
    <valueMap>
    <value>0==Male</value>
    <value>1==Female</value>
    </valueMap>

    and
    <valueMap>
    <value>0=Male</value>
    <value>1=Female</value>
    </valueMap>

    but none of these split the value in a storedValue/displayValue map.

    #2
    Try instead looking at the docs for valueMap.

    Comment


      #3
      Thank you! I think I'll spend a lot of time in that java doc in the future :-) Didn't know it contained help for the xml datasource

      Comment


        #4
        I finally stumbled on this thread. I can never find the documentation for the ds.xml file.

        I always make the mistake of searching for the server-side ds.xml file documention in the server javadoc.

        I still don't understand why it's in the client-side javadoc instead of in the server javadoc.

        Comment


          #5
          Because it affects both client and server-side behavior, so neither place is particularly natural. If you're making this recurring mistake, just bookmark it.

          Comment


            #6
            Is it necessary to provide a value map for a field which is an enum or is the system smart enough to just use the values in the enum?

            such as:
            <field name="source" type="enum" />

            Comment


              #7
              It can, depending on your DataSource type and settings. See DataSource.autoDeriveSchema and DataSourceField.valueMapEnum. The latter exists only in 3.1d and the documentation for the former has also been fleshed out a great deal in 3.1d.

              Comment

              Working...
              X