I'm attempting to specify a datasourcefield in a way that will allow you to click edit a corresponding listgrid cell, with the resulting select item editor showing icons, not values. The effect I'm looking for is how the kludged <ValueMap> example is specified below but I want to do it in a more smartgwt native and theme independent way. Is there a better way to do this with in the <valueMap> attribute or by adding an attribute like the attempted <valueIconMap> one (which would be nice if it worked <hint, hint>) . How should I accomplish this?
Code:
Kludged valueMap example: <valueMap> <value ID="left"><img src="barr/sc/skins/Brcm/images/RichTextEditor/text_align_left.png" alt="Left"></value> <value ID="right"><img src="barr/sc/skins/Brcm/images/RichTextEditor/text_align_right.png" alt="Right"></value> <value ID="center"><img src="barr/sc/skins/Brcm/images/RichTextEditor/text_align_center.png" alt="Center"></value> </valueMap>
Code:
What I wish could be done: <field name="cellAlign" title="Align" type="enum" detail="true" autoFitWidth="true" autoFitWidthApproach="title" cellAlign="center" prompt="Alignment of the column" canEdit="true" allowEmptyValue="true" > <valueMap> <value>left</value> <value>right</value> <value>center</value> </valueMap> <valueIconMap> <value ID="left">[SKIN]/RichTextEditor/text_align_left.png</value> <value ID="right">[SKIN]/RichTextEditor/text_align_right.png</value> <value ID="center">[SKIN]/RichTextEditor/text_align_center.png</value> </valueIconMap> </field>
Comment