Question

I'm working with GXT3 and use :

NumberField<Double> code = new NumberField<Double>(new DoublePropertyEditor());

What i can use for "NumberField< Integer >"? there no IntegerPropertyEditor, i can't do simply:

NumberField<Integer> code = new NumberField<Integer>(new IntegerPropertyEditor());

Thanks to Patrice i use as solution:

NumberField<Integer> code = new NumberField<Integer>(new NumberPropertyEditor.IntegerPropertyEditor());
Was it helpful?

Solution

There are a IntegerPropertyEditor in the NumberPropertyEditor class.

You can create a custom IntegerNumberField for simplify this :

import com.sencha.gxt.widget.core.client.form.NumberPropertyEditor;

public class IntegerNumberField extends BaseNumberField<Integer>{

  public IntegerNumberField() {
    super(new NumberPropertyEditor.IntegerPropertyEditor());
  }

}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top