Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

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

      0  

    Default Restriction Non allowing zero and empty values in NumberField

    Restriction Non allowing zero and empty values in NumberField


    Hi Guys,

    I have a requirement in NumberField. my NumberField should not allow Zero or empty value.and it should populate the Minimum Value which i set. how it can be done .... any ideas?

    Thanks and your ideas are welcome

    MJP

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Nov 2010
    Posts
    209
    Vote Rating
    -2
    Ersmarker has a little shameless behaviour in the past

      0  

    Default


    Code:
            int minValue = 3;
            NumberField nf = new NumberField();
            nf.setAllowBlank(false);
            nf.setMinValue(minValue);
            nf.setValue(minValue);

  3. #3
    Sencha User
    Join Date
    Nov 2011
    Posts
    21
    Vote Rating
    0
    praveenmj is on a distinguished road

      0  

    Default


    Hi Ersmarker ,

    Thanks for the reply , i used the above code ,but in the UI it allows zero and just shows the error tooltip. In My case i have to stop the user from entering zero or empty value ... for example by keeping http://www.selikoff.net/2011/04/26/g...tfield-in-gxt/ it as reference i have created but not working could yo please help me on this Thanks....

    public class BoundedNumberField extends NumberField {

    @Override
    public void setMinValue(Number minValue) {
    // TODO Auto-generated method stub
    super.setMinValue(minValue);
    if(rendered){

    getInputEl().setValue(String.valueOf(minValue.intValue()));
    }

    //setElementAttribute("minValue", minValue.intValue());

    }
    @Override
    protected void onRender(Element target, int index) {
    super.onRender(target, index);
    getInputEl().setElementAttribute("minValue", getMinValue().intValue());

    }

    }

Thread Participants: 1