Looks like we cannot reproduce this. Please provide another test case to reproduce this issue.
  1. #1
    Sencha User
    Join Date
    Apr 2011
    Posts
    134
    Vote Rating
    1
    stefankendall is an unknown quantity at this point

      0  

    Default [PR3] IDs not being set on numberfield fields?

    [PR3] IDs not being set on numberfield fields?


    It looks like IDs aren't being set on form elements that specify an ID.

    This:

    Code:
    {
                        xtype:'fieldset',
                        defaults:{
                            labelWidth:'35%',
                            listeners:{
                                change:myChangeEvent
                            }
                        },
                        items:[
                            {
                                id:'myId',
                                xtype:'numberfield',
                                name:'myMax',
                                label:'MyLabel',
    //                            disabled:true,
                                disabledCls:'disabledVisible'
                            }
                        ]
                    }
    }
    produces this in the DOM:

    Code:
    <input class="x-input-el x-form-field x-input-number" type="number" id="ext-element-290" name="myMax">
    Ext.getCmp('myId') seems to return an element, but Ext.getCmp('myId').getValue() only returns the initial value of the numberfield.

    Somehow the DOM and the ext element are de-synced.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,756
    Vote Rating
    828
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    1. id should only be used for debugging purposes. It isn't worth writing a system to have unique ids. Code for reusability
    2. Using the following code, Ext.getCmp('myId') got the correct field. Ext.getCmp('myId').getValue() returned 0. I then typed 3 into the field and did the getValue() again and it returned 3 as expected. I cannot reproduce this error in PR3.

    Code:
    Ext.create('Ext.form.Panel', {
        fullscreen : true,
        items      : [
            {
                xtype:'fieldset',
                items:[
                    {
                        id:'myId',
                        xtype:'numberfield',
                        name:'myMax',
                        label:'MyLabel',
                        disabledCls:'disabledVisible'
                    }
                ]
            }
        ]
    });
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Apr 2011
    Posts
    134
    Vote Rating
    1
    stefankendall is an unknown quantity at this point

      0  

    Default


    I'm using the IDs to drive automated testing. In 1.1.0 and 1.1.1, IDs were being assigned to elements on the DOM.

    getValue and setValue also aren't working for me, so I'll try and create a full example on jsfiddle. I still think not creating actual IDs is an issue.

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,756
    Vote Rating
    828
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Quote Originally Posted by stefankendall View Post
    I'm using the IDs to drive automated testing. In 1.1.0 and 1.1.1, IDs were being assigned to elements on the DOM.

    getValue and setValue also aren't working for me, so I'll try and create a full example on jsfiddle. I still think not creating actual IDs is an issue.
    An id is automatically created for components and are then used for their top level DOM element.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Sencha User
    Join Date
    Oct 2011
    Posts
    127
    Vote Rating
    0
    robl is on a distinguished road

      0  

    Default


    So if Sencha Touch is automatically assigning IDs, then how do you suggest he do automated testing via say Selenium if the ids change each time the app is run?

  6. #6
    Sencha - Sencha Touch Dev Team Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    20
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    Indeed if the id isn't being respected, this is a bug and needs to be handled properly. Assigning ids is a necessary feature.

    Sencha Inc

    Jamie Avins

    @jamieavins

  7. #7
    Sencha User
    Join Date
    Apr 2011
    Posts
    134
    Vote Rating
    1
    stefankendall is an unknown quantity at this point

      0  

    Default


    I didn't have the root cause here of another issue. I'm going to close this and re-post; the IDs are being set properly.

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