1. #1
    Sencha User
    Join Date
    Aug 2013
    Posts
    9
    Answers
    2
    Vote Rating
    0
    woolhead is on a distinguished road

      0  

    Default Answered: Display empty strings in list

    Answered: Display empty strings in list


    Hey,
    I have a list, with some items. It is styled like a table via itemTpl.
    In the form, where I can add items, are some mandatory fields and some optional.
    Now the list should always be formatted like the second entry in the example image.
    When I leave the optional field in my form empty, it is saved as "" (also tried just saving spaces so it is saved like this: " "). The list looks now like the first row in my example.
    How can I get the list to "display" empty strings?
    empty_item.jpg

  2. I set the white-space property to pre and the controller removes from the "empty" field the white-space when the form gets loaded. It also adds a white-space if the form is saved while the field is still empty.
    Not really nice, but it works for now.

  3. #2
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    3,927
    Answers
    328
    Vote Rating
    129
    fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all

      0  

    Default


    I'm not sure this is possible but have you tried using the <pre> tag in your itemTpl
    https://developer.mozilla.org/en-US/...ML/Element/pre

  4. #3
    Sencha User
    Join Date
    Aug 2013
    Posts
    9
    Answers
    2
    Vote Rating
    0
    woolhead is on a distinguished road

      0  

    Default


    No I haven't ^^ now it works if there is at least a space while it's still not working if I have an empty string. But this is better than nothing. Thanks!

  5. #4
    Sencha User
    Join Date
    Aug 2013
    Posts
    9
    Answers
    2
    Vote Rating
    0
    woolhead is on a distinguished road

      0  

    Default


    I set the white-space property to pre and the controller removes from the "empty" field the white-space when the form gets loaded. It also adds a white-space if the form is saved while the field is still empty.
    Not really nice, but it works for now.

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