1. #1
    Ext User nassaja-rus's Avatar
    Join Date
    Mar 2007
    Location
    Russia
    Posts
    314
    Vote Rating
    1
    nassaja-rus is on a distinguished road

      0  

    Default [1.1] form.getValues() && emptyText

    [1.1] form.getValues() && emptyText


    In addition to http://extjs.com/forum/showthread.ph...es()+emptyText

    When I do form.getValues() that I receive all emptyText values. I think, that it is not correct. It is a bug? If it is a feature, it any wrong!
    -= miu-miu =-

    Linux, Perl, GNU, Open Source, Ajax, Ubuntu 9.04

  2. #2
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    17
    jack.slocum will become famous soon enough jack.slocum will become famous soon enough

      0  

    Default


    getValues() returns the values as they would be submitted to the server. Since emptyText goes to the server, this is the correct behavior.
    Jack Slocum
    Ext JS Founder
    Original author of Ext JS 1, 2 & 3.
    Twitter: @jackslocum
    jack@extjs.com

  3. #3
    Ext User
    Join Date
    Mar 2007
    Location
    Boston
    Posts
    349
    Vote Rating
    0
    sjivan is on a distinguished road

      0  

    Default


    I too feel that emptyText should not be submitted to the server. Take the custom Google Ext search page : http://google.com/coop/cse?cx=011693...%3Az7of1ufqccu

    The "emptyText" value of the search field indicates the intent of the field but when you click the Search button without entering anything, the query parameter is empty and not "Custom Search".

    Sanjiv

  4. #4
    Ext User nassaja-rus's Avatar
    Join Date
    Mar 2007
    Location
    Russia
    Posts
    314
    Vote Rating
    1
    nassaja-rus is on a distinguished road

      0  

    Default


    And in what sense of such behaviour? Jack, you really use emptyText for sending it on a server? In any case there is a config parameter "value" if I wish to use value which will be transferred to a server by default.

    It is one of those small but awfully annoying things.
    -= miu-miu =-

    Linux, Perl, GNU, Open Source, Ajax, Ubuntu 9.04

  5. #5
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    17
    jack.slocum will become famous soon enough jack.slocum will become famous soon enough

      0  

    Default


    No, I personally don't but the behavior has been there since the beginning and so it shouldn't be removed. The fact is, it could be used by some people as a default value.

    On a side note, your server implementation should be built to ignore the emptyText anyway as there can never be any guarantee that it won't be submitted.

    As for the Google search page, it is done with a css background image, not with text.
    Jack Slocum
    Ext JS Founder
    Original author of Ext JS 1, 2 & 3.
    Twitter: @jackslocum
    jack@extjs.com

  6. #6
    Ext User nassaja-rus's Avatar
    Join Date
    Mar 2007
    Location
    Russia
    Posts
    314
    Vote Rating
    1
    nassaja-rus is on a distinguished road

      0  

    Default


    Jack, is not present desire to do superfluous checks on a server. There already it is a lot of them. Also what to do if a site works with five languages? It is possible to sink in checks and translations.

    This behaviour can be corrected in 2.0?
    -= miu-miu =-

    Linux, Perl, GNU, Open Source, Ajax, Ubuntu 9.04

  7. #7
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    17
    jack.slocum will become famous soon enough jack.slocum will become famous soon enough

      0  

    Default


    As stated above, it has valid use cases and the functionality shouldn't be removed. It's not wrong behavior to be "corrected". If you specify you want some default text in the field when it is empty, that text is going to be there when it is empty. If you are using that feature only for informational purposes, then your system should either be set up to ignore it or you will need to clear it before sending to the server. There was a thread posted a while back where someone already wrote a simple solution to do that.
    Jack Slocum
    Ext JS Founder
    Original author of Ext JS 1, 2 & 3.
    Twitter: @jackslocum
    jack@extjs.com

  8. #8
    Ext User nassaja-rus's Avatar
    Join Date
    Mar 2007
    Location
    Russia
    Posts
    314
    Vote Rating
    1
    nassaja-rus is on a distinguished road

      0  

    Default


    Jack, this all is clear. That it has once been realized what to change it it would not be desirable, to that it already uses someone. Though it is not logical (IMHO) - to have two ways to set the default text for a field. And one of ways deletes this text at a choice of a field.

    I simply ask to think above addition of an option which will disable similar behaviour.

    For an example I have four greater forms of search, with a lot of fields. For economy of a place I use emptyText instead of label. And it conveniently and evidently. And in this case I would like to enable one option in the form of, instead of rewriting Ext.Form code Or creations additional code. I'm lazy, I do not like to write a superfluous code. Insert checks on a server because of problems with js a cursor - there is no desire.

    I think this is really bothering piece which is not pleasant to many developers at this forum.
    -= miu-miu =-

    Linux, Perl, GNU, Open Source, Ajax, Ubuntu 9.04

  9. #9
    Ext User nassaja-rus's Avatar
    Join Date
    Mar 2007
    Location
    Russia
    Posts
    314
    Vote Rating
    1
    nassaja-rus is on a distinguished road

      0  

    Default


    hm, in simple I can create ext.ux extension for this and redefine some functions from ext.form. %)
    -= miu-miu =-

    Linux, Perl, GNU, Open Source, Ajax, Ubuntu 9.04

  10. #10
    Ext User dantheman's Avatar
    Join Date
    Mar 2007
    Posts
    259
    Vote Rating
    1
    dantheman is on a distinguished road

      0  

    Default filter either on server or in client . . .

    filter either on server or in client . . .


    I don't object to a null string for an empty field,
    but when I've used emptyText for 'instructional' purposes
    (due to lack of fine-tuned positioning options), I needed to
    filter the resulting default values (which were semantically "empty" )

    If you don't want to do the filter/checks on the server,
    do so on submit from the client... I've done both.

    --dan

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