1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    10
    Vote Rating
    0
    rherwig is on a distinguished road

      0  

    Default RowEditor erronously marks NumberField setPropertyEditorType(Short.class) as modified

    RowEditor erronously marks NumberField setPropertyEditorType(Short.class) as modified


    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)) {
    smallintField.setAllowBlank(true);
    } else {
    smallintField.setAllowBlank(false);
    }
    // -- disallow decimals
    smallintField.setAllowDecimals(false);

    // --- define editorType (defaults to Double)
    smallintField.setPropertyEditorType(Integer.class);

    // QUESTION: for 'some' reason if I use Short.class here the RowEditor ALWAYS thinks the column has been modified?!?!
    //smallintField.setPropertyEditorType(Short.class);
    // --- 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;
    }
    Attached Files

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar