1. #1
    Sencha User
    Join Date
    Dec 2009
    Posts
    57
    Vote Rating
    0
    andreiastra is on a distinguished road

      0  

    Default How to display Date and Number Fields with NULL values as invalid?

    How to display Date and Number Fields with NULL values as invalid?


    Hi,

    I have TextFields that should not be empty. I use

    field.setAllowBlank(false);

    to achieve that.

    When the fields are initialized they do not have any value assigned to them; their values are Nulls. But, these fields are not displayed as invalid (with the red border).

    Invalid Field.JPG

    I do need to show them as invalid.

    I do not have that problem with TextField<String>, because I can always call

    stringField.setValue("");

    Now, the field is not null but blank and is properly invalidated. Unfortunately, there are no blank Date or Number values.

    Is there any trick/ workaround to display DateField and Number field with Null values as invalid?

    Thank you,

    Andrei
    Last edited by andreiastra; 19 Apr 2010 at 4:15 AM. Reason: inserted image

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Is there any trick/ workaround to display DateField and Number field with Null values as invalid?
    Set allowblank to false. Add a render event listener to the field and call setValue(null);

  3. #3
    Sencha User
    Join Date
    Dec 2009
    Posts
    57
    Vote Rating
    0
    andreiastra is on a distinguished road

      0  

    Default


    Thank you, Sven! It worked.

Thread Participants: 1

Tags for this Thread

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