Hi,
I've noticed a render error when I used a valueMap for boolean. See screenshots attached.
My goal is to store and load boolean but present it to the user as option either Active or Inactive in a SelectItem.
When there is an empty form the the selectItem renders correctly. But when I load a record into it the it renders 3 values: Active, Active and Inctive.
The documentation mentions at a page 22:
Field attribute -> Form control
valueMap provided -> SelectItem (dropdown)
type boolean -> CheckboxItem (checkbox)
if I leave out the type definition the it behaves slightly better. The error from second screenshot dosappears but the first on is still present.
I use smartGWT 2011-07-21.
best regards,
Zdary
I've noticed a render error when I used a valueMap for boolean. See screenshots attached.
My goal is to store and load boolean but present it to the user as option either Active or Inactive in a SelectItem.
Code:
<field name="active" type="boolean" > <valueMap> <value ID="true">Active</value> <value ID="false">Inactive</value> </valueMap> </field>
Code:
statusItem = new SelectItem("active", "Status");
The documentation mentions at a page 22:
Field attribute -> Form control
valueMap provided -> SelectItem (dropdown)
type boolean -> CheckboxItem (checkbox)
if I leave out the type definition the it behaves slightly better. The error from second screenshot dosappears but the first on is still present.
Code:
<field name="active"> <valueMap> <value ID="true">Active</value> <value ID="false">Inactive</value> </valueMap> </field>
best regards,
Zdary
Comment