1. #1
    Ext User
    Join Date
    Aug 2009
    Posts
    15
    Vote Rating
    0
    irinarosu is on a distinguished road

      0  

    Default NumberField in EditorGridPanel maxValue validation

    NumberField in EditorGridPanel maxValue validation


    Hello,
    I have a problem when working with NumberField in EditorGridPanel. I have a NumberField like this one:

    editor: new fm.NumberField({
    allowNegative: false,
    allowDecimals:true,
    maxValue:9999999.99,
    selectOnFocus:true,
    allowBlank: true
    })
    When I type a really big number, a number bigger then the maxValue, example: 25 times 9, I receive the validation error message, but when the focus is lost, in the cell table I get a strange value, 125. The value in NumberField is "1e+25".
    Thank you!

  2. #2
    Ext User
    Join Date
    Nov 2008
    Posts
    19
    Vote Rating
    0
    beng_06 is on a distinguished road

      0  

    Default


    does anyone knows the solution to this problem? i am encountering this also.

  3. #3
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    86
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    It's a bug in NumberField. It can't handle exponential notation (xe+y), which limits the input to max. 16 digits.

  4. #4
    Ext User
    Join Date
    Nov 2008
    Posts
    19
    Vote Rating
    0
    beng_06 is on a distinguished road

      0  

    Default


    thanks for your quick response.

  5. #5
    Ext User
    Join Date
    Aug 2009
    Posts
    15
    Vote Rating
    0
    irinarosu is on a distinguished road

      0  

    Default Possible solutin

    Possible solutin


    Hello, I found a solution. If I use
    autoCreate: {tag: 'input', type: 'text', size: '20', autocomplete: 'off', maxlength: '10'} it works.

  6. #6
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    86
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Correct. And, as I mentioned earlier, you could use up to maxlength: '16' before NumberField breaks.

  7. #7
    Ext User
    Join Date
    Nov 2008
    Posts
    19
    Vote Rating
    0
    beng_06 is on a distinguished road

      0  

    Default


    hi,

    can i know what autoCreate does?

    "autoCreate: {tag: 'input', type: 'text', size: '20', autocomplete: 'off', maxlength: '10'} "


    i've tried putting it in my config but nothing happens, the input value gets truncated or converted to a exponential decimal value.

  8. #8
    Ext User
    Join Date
    Aug 2009
    Posts
    15
    Vote Rating
    0
    irinarosu is on a distinguished road

      0  

    Default


    Hello!
    This is my header
    {
    header: '<bean:message bundle="nomtarifpilotaj" key="nom_tarif_pilotaj.prompt.tb_max"/>',
    dataIndex:'tb_max',
    width:110,
    editor: new fm.NumberField({
    allowNegative: false,
    allowDecimals:true,
    maxValue:9999999.99,
    maxLength: 10, // for validation
    selectOnFocus:true,
    minText:'Valoarea minima este 0',
    maxText:'Valoarea maxima este 9999999.99',
    allowBlank: true,
    autoCreate: {tag: 'input', type: 'text', size: '20', autocomplete: 'off', maxlength: '10'}
    })
    }

  9. #9
    Ext User
    Join Date
    Nov 2008
    Posts
    19
    Vote Rating
    0
    beng_06 is on a distinguished road

      0  

    Default


    thanks, ill try that.

  10. #10
    Ext User
    Join Date
    Aug 2009
    Posts
    15
    Vote Rating
    0
    irinarosu is on a distinguished road

      0  

    Default



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