Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Simple way of using 1 and 0 values in a boolean field

$
0
0
Hi,

I've got an xml DS (client only) that has a tag like this:
Code:

<b>1</b>
containing either 1 or 0.
I'd like to represent this as a DataSourceBooleanField in a ListGrid.
Simply declaring a boolean Field raises this warning:
Code:

[ERROR] [myApp] - 16:38:28.362:TMR6:WARN:DataSource:BoolDS$499:BoolDS$499.x: value: "1" failed on validator: {type: "isBoolean",
typeCastValidator: true,
_generated: true,
defaultErrorMessage: "Must be a true/false value.",
resultingValue: false}

The field is always rendered as a "disabled true" in the ListGrid, i.e. as a gray checked checkbox, regardless whether it is 0 or 1. Using it to filter the records using a criteria query works, however.

This does not occur if true/false is used rather than 1/0.
Is there a simple way to rectify this?

Thanks,
fatzopilot

FF 26.0 (dev mode)
Chrome Version 34.0.1847.116 m
SmartClient Version: SNAPSHOT_v10.0d_2014-04-12/LGPL Development Only (built 2014-04-12)
GWT 2.6.0

Viewing all articles
Browse latest Browse all 4756