1. #1
    Sencha User
    Join Date
    Oct 2012
    Location
    Toulouse
    Posts
    58
    Answers
    7
    Vote Rating
    0
    novadys-sbu is on a distinguished road

      0  

    Default Unanswered: Odd placeholder behaviour

    Unanswered: Odd placeholder behaviour


    Hey guys,

    I'm trying to dev an sencha app and have come across a problem which I can't seem to get around.

    I have two selectfields (dropdown menus). The second one is dependant on the first. What I want to do is : have a placeholder if there are several items in the store and have no placeholder (or placeholder = null) if the store only contains one item.

    Here is my listener :

    Code:
    listeners:{
                load : function(myStore){
                   var count = myStore.getCount();
                   if(count != 1){
                       Ext.getCmp('strClassReference')._placeHolder = rcChooseDocType;;
                   }else{
                       Ext.getCmp('strClassReference')._placeHolder = null;
                   }
                }
              }
    My problem is that the rendering doesn't seem to function properly. I always have the placeholder of the previous choice even though the value of the placeholder is correct (checked with a console.debug)

    Does anyone have an idea how to refresh the component ? I've tried the show and hide function, but I haven't had any luck

    Thanks guys
    Sarah Burrell
    R & D Developer at Novadys International

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,833
    Answers
    453
    Vote Rating
    609
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    You can't just set the property, you need to use the method: http://docs.sencha.com/touch/2-2/#!/...setPlaceHolder
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Sencha User
    Join Date
    Oct 2012
    Location
    Toulouse
    Posts
    58
    Answers
    7
    Vote Rating
    0
    novadys-sbu is on a distinguished road

      0  

    Default Thanks but...

    Thanks but...


    Thank you for answering but I have also tried with setPlaceHolder() and get the same result.

    It seem that what is rendered is the placeHolder value of the previous choice.
    Any more ideas ?
    Sarah Burrell
    R & D Developer at Novadys International

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