Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Templates: trouble with type="select"

Hi,

I am trying to use a combobox in a template, by using a property with a type="select". See below for a snippet:

The first problem is that setting the default doesn't work as documented. The docs say you need to set selected="true" in the item definition. However, you actually need to set the 'default' attribute on the containing property.

The second (more serious) problem is that the template uses the items 'label' attribute as the value, rather than the 'name' attribute. Thus, using the example below, I would like 0 or 1 returned, but I'm getting Include or Exclude instead. Am I doing something wrong?

<property id="TaskPriority" label="TaskPriority"
    description="Include TaskPriority" type="select"
    default="Include" mandatory="false" persist="false" >
    <item name="1" label="Include" selected="true" />
    <item name="0" label="Exclude" selected="false" />
</property>

Thanks
--
Subs


Back to the top