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

DataSourceField.getCanFilter()

$
0
0
In the case where the "canFilter" attribute is not set in the ds.xml for a particular datasource field, we were expecting the DataSourceField.getCanFilter() to return NULL. However, "DataSourceField.getCanFilter()" returns "getAttributeAsBoolean("canFilter")", which is converting the NULL to Boolean.FALSE, and incorrectly reporting that the field cannot be filtered.

Of course, we can deal with this by using the following code, however, we think there is a problem here.

Code:

            Object canFilterObj = field.getAttributeAsObject("canFilter");
            Boolean canFilter = (canFilterObj == null) || ((canFilterObj instanceof Boolean) && ((Boolean) canFilterObj).booleanValue());

SmartClient Version: v9.1p_2014-07-06/Pro Deployment (built 2014-07-06)
FF 24.7.0 ESR

Regards

Viewing all articles
Browse latest Browse all 4756

Trending Articles