// If this is range edit item.
if (items[i] instanceof IEditRangeFormItem) {
// Interface type cast.
IEditRangeFormItem item = (IEditRangeFormItem) items[i];
// Getting values for DB type detecting.
IDBValue valueLow = dataRow.getCell(item
.getLowBoundDataColumn());
IDBValue valueHigh = dataRow.getCell(item
.getHighBoundDataColumn());
// If this is date range.
if (valueLow instanceof DBDate && valueHigh instanceof DBDate) {
DateRangeControl ctrl = new DateRangeControl();
ctrl.bind(dataRow, item.getLowBoundDataColumn(), item
.getHighBoundDataColumn());
addedControl = ctrl;
}
// If this is floats range.
else if (valueLow instanceof DBFloat
&& valueHigh instanceof DBFloat) {
FloatRangeControl ctrl = new FloatRangeControl();
ctrl.bind(dataRow, item.getLowBoundDataColumn(), item
.getHighBoundDataColumn());
addedControl = ctrl;
}
// If this is time range.
else if (valueLow instanceof DBStringTime
&& valueHigh instanceof DBStringTime) {
TimeRangeControl ctrl = new TimeRangeControl();
ctrl.bind(dataRow, item.getLowBoundDataColumn(), item
.getHighBoundDataColumn());
addedControl = ctrl;
} else
throw new NotImplementedFeatureException(
"There is no implementation to edit range of types "
+ GWT.getTypeName(valueLow) + " and "
+ GWT.getTypeName(valueHigh) + ".");
} else
// If this is simple editable column.
if (items[i] instanceof IEditColumnFormItem) {
// Interface type cast.
IEditColumnFormItem item = (IEditColumnFormItem) items[i];
// Getting value for DB type detecting.
IDBValue value = dataRow.getCell(item.getDataColumn());
ISingleColumnBind ctrl = null;
// If this is multiline edited item.
if (item instanceof IMultilineEditFormItem