Hello Isomorphic team,
there is a similar question with regards to SmartClient GWT,
(http://forums.smartclient.com/showthread.php?t=32163)
this one is for plain JavaScript.
Requirement is to implement a boolean field as RadioGroupItem with two RadioItems, one with title "Yes" => true and one with title "No" => false.
Example:
<DataSource ...>
<field name="doLikeIceCream" type="boolean" />
</DataSource>
<RadioGroupItem name="doLikeIceCream" type="boolean" vertical="false" title="Do you like ice cream">
<defaultValue xsi:type="xsd:boolean">false</defaultValue>
<valueMap><JS>{true:"Yes", false:"No"}</JS></valueMap>
<change><JS>
function (form, item, value, oldValue) {
// break point to check value and oldValue
}
</JS></change>
</RadioGroupItem>
Form:
Do you like ice cream: O Yes O No
When observing the change() method, value is returned as string "true", not as boolean.
Not sure it is a bug, or I did some mistake.
Please advice.
Thank you,
Daniel
Version: v10.0p_2015-07-02/PowerEdition Deployment (built 2015-07-02)
there is a similar question with regards to SmartClient GWT,
(http://forums.smartclient.com/showthread.php?t=32163)
this one is for plain JavaScript.
Requirement is to implement a boolean field as RadioGroupItem with two RadioItems, one with title "Yes" => true and one with title "No" => false.
Example:
<DataSource ...>
<field name="doLikeIceCream" type="boolean" />
</DataSource>
<RadioGroupItem name="doLikeIceCream" type="boolean" vertical="false" title="Do you like ice cream">
<defaultValue xsi:type="xsd:boolean">false</defaultValue>
<valueMap><JS>{true:"Yes", false:"No"}</JS></valueMap>
<change><JS>
function (form, item, value, oldValue) {
// break point to check value and oldValue
}
</JS></change>
</RadioGroupItem>
Form:
Do you like ice cream: O Yes O No
When observing the change() method, value is returned as string "true", not as boolean.
Not sure it is a bug, or I did some mistake.
Please advice.
Thank you,
Daniel
Version: v10.0p_2015-07-02/PowerEdition Deployment (built 2015-07-02)