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());
Était-ce utile?

La 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());
  }

}
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top