Announcement

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

    invalid field of enum type has no field.valueMap

    Using SmartGWT 2.5p I'm having a problem with enums in a listgrid with a custom datasource.

    When I try to add a new row I get:
    Code:
    === 2012-04-20 17:24:18,590 [3-19] WARN  BasicDataSource - [builtinApplication.filter_add] invalid field of enum type has no field.valueMap at field: source of type: enum
    === 2012-04-20 17:24:18,590 [3-19] WARN  BasicDataSource - [builtinApplication.filter_add] invalid field of enum type has no field.valueMap at field: disposition of type: enum
    Here's my .ds.xml
    Code:
    <DataSource
    	ID="filter"
    	schemaBean="aa.bb.server.filter.AbstractFilter"
    	serverConstructor="aa.bb.server.filter.FilterDataSource"
    	dropExtraFields="true" >
        <fields>
            <field primaryKey="true" name="uid" hidden="false" type="integer" />
            <field name="name" type="text" />
    	    <field name="filter" type="text" />
    	    <field name="algorithmUid" type="integer" />
            <field name="source" type="enum">
     			<values>
     				<value name="ExecutionReport" />
            		<value name="MarketDataRequest" />
            		<value name="Order" />
            		<value name="Quote" />
            		<value name="TradeReport" />
            	</values>
            </field>
            <field name="disposition" type="enum" >
     			<values>
     				<value name="Ignore" />
            		<value name="Execute" />
            	</values>
            </field>
            <field name="enabled" type="boolean" />
        </fields>
    </DataSource>
    I've tried using "valueMap" instead of "values" but then I don't get any entries in the comobox editor.

    I've also tried eliminating the "values" entirely but that doesn't seem to change anything.

    The corresponding ListGridField is of type ListGridFieldType.TEXT

    #2
    For a manually declared valueMap, "<valueMap>" would be correct, "values" is definitely not (see docs for sample declarations).

    We can't tell whether you should expect an automatically generated valueMap from an enum definition in your schemaBean without seeing the schemaBean.

    Comment


      #3
      I changed the <values> to <valueMap> (and changed the format of the <value> tags) and it's much happier now.

      Comment

      Working...
      X