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

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi