1. #1
    Touch Premium Member
    Join Date
    Jun 2010
    Posts
    324
    Vote Rating
    2
    profunctional is on a distinguished road

      0  

    Default Why does setting the Select field show the Value sometimes then show the Text sometim

    Why does setting the Select field show the Value sometimes then show the Text sometim


    I have a select field of states. The values are State Abbreviations like DC and the text is Washington DC.

    However, on the first postback I see that the Value is displayed on the select field. Then revisiting the panel shows Washington DC. What would cause this?

  2. #2
    Sencha User
    Join Date
    Apr 2012
    Posts
    15
    Vote Rating
    0
    Eraesr is on a distinguished road

      0  

    Default


    I actually have a similar problem.
    My select allows users to select "10 items" (value 10), "20 items" (value 20) and "30 items" (value 30).
    When I first display the select it displays the default "10 items". I then change that to 20 items, leave the view that displays the select, and go back to the view again and in some cases it will show "20" instead of "20 items". It doesn't always happen and I haven't found any patterns for it happening or not yet.

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    15
    Vote Rating
    0
    Eraesr is on a distinguished road

      0  

    Default


    Oh boy, just when I submitted the previous post, something hit me.
    The data I get from my select is stored in localStorage and retrieved from that again.
    I thought that maybe the data type got mangled somewhere, and indeed, playing around with some "typeof" debug statements I figured out that I tried to feed a string value to the "value" config option of the select field. In other words, I passed the string value "20" instead of the numeric value 20. Forcing it to become an int with parseInt solved the problem for me.

    I don't think this will actually solve the problem of the original poster though, unfortunately.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar