View Full Version : RowEditor erronously marks NumberField setPropertyEditorType(Short.class) as modified

26 Jun 2012, 3:42 PM
When I define a NumberField and call setPropertyEditorType() using java.lang.Short.class the RowEditor ALWAYS marks the field as modified. However (comma) if I set it to Integer.class it works fine. Am I missing something here??

Code that defines the RowEditor:
private static NumberField getSmallintField(String allowNulls) {
NumberField smallintField = new NumberField();
// --- allow/disallow nulls
if (MetadataColumnNullsMapper.SOR_COLUMN_ALLOW_NULLS.equals(allowNulls)) {
} else {
// -- disallow decimals

// --- define editorType (defaults to Double)

// QUESTION: for 'some' reason if I use Short.class here the RowEditor ALWAYS thinks the column has been modified?!?!
// --- range (-32,768 to +32,767)
smallintField.setMinValue(Short.MIN_VALUE); // -2^15
smallintField.setMaxValue(Short.MAX_VALUE); // 2^15 - 1

// TODO: when attempting to enter a SMALLINT larger than +32,767 the RowEditor doesn't display an error, it just disables the 'Save' button; it should also display an error.

return smallintField;