1. #1
    Ext JS Premium Member
    Join Date
    Feb 2010
    Posts
    14
    Vote Rating
    1
    mhaddy is on a distinguished road

      0  

    Default Hidden form field

    Hidden form field


    If a form field is hidden

    Code:
    {
      xtype:'hidden',
       name:'UserID'
    }
    
    an exception is thrown:
    maxLength is not defined

    at
    Code:
    function f1(out,values,parent,xindex,xcount) {
    
     try { with(values) {
    
      return(maxLength !== undefined)
    
     }} catch(e) {}
    
    }

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,754
    Vote Rating
    827
    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


    When do you get the error? Just displaying is fine for me:

    Code:
    Ext.create('Ext.form.Panel', {
        renderTo : Ext.getBody(),
        width    : 400,
        height   : 400,
        title    : 'Test',
        items    : [
            {
                xtype : 'hidden',  //should use the more standard hiddenfield
                name  : 'text'
            }
        ]
    });
    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
    Ext JS Premium Member
    Join Date
    Feb 2010
    Posts
    14
    Vote Rating
    1
    mhaddy is on a distinguished road

      0  

    Default hiddend form field

    hiddend form field


    Interesting. Your panel worked for me also. It seems to fail when wrapped in a window:

    Code:
    
    var dlPassChangeWin = Ext.create('Ext.window.Window', {
    
        width: 400,
    
        height: 400,
    
        title: 'Test',
    
        items: [
    
            {
                xtype: 'hidden',  //should use the more standard hiddenfield
                 name: 'text'
    
            }
    
        ]
    
    });
    
    dlPassChangeWin.show();
    
    

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,754
    Vote Rating
    827
    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


    And you are using 4.1 beta 1? I'm not getting any error using that code.
    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
    Ext JS Premium Member
    Join Date
    Feb 2010
    Posts
    14
    Vote Rating
    1
    mhaddy is on a distinguished road

      0  

    Default


    Uhhg. I am. Unfortunately, all my forms are contained in windows and all that have hidden fields are throwing this error. I will try to isolate this outside my application.

  6. #6
    Ext JS Premium Member
    Join Date
    Feb 2010
    Posts
    14
    Vote Rating
    1
    mhaddy is on a distinguished road

      0  

    Default


    I have no problem getting this exception outside my application using the code above.

    Let me ask you this...
    The error is wrapped in a try/catch block. The settings I am using is to break on all exceptions (caught or not).

    Are you breaking only on uncaught exceptions or are you just not getting it at all?

  7. #7
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,498
    Vote Rating
    46
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    It's a caught exception when testing the definedness of an optional value. Not a bug.

  8. #8
    Ext JS Premium Member
    Join Date
    Feb 2010
    Posts
    14
    Vote Rating
    1
    mhaddy is on a distinguished road

      0  

    Default


    Throwing an exception to test the definedness of an optional value sounds crazy to me - but I guess that is a topic better discussed elseware.

    Thanks for the info.

Thread Participants: 2

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..."