1. #161
    Ext JS Premium Member
    Join Date
    May 2007
    Posts
    698
    Vote Rating
    3
    danh2000 is on a distinguished road

      0  

    Default


    UPDATE 18/01/2010

    Fixed regression where disabling the component didn't properly disable the items.

    New version attached to the first post here

  2. #162
    Sencha Premium Member Fredric Berling's Avatar
    Join Date
    Sep 2007
    Location
    Sweden
    Posts
    188
    Vote Rating
    15
    Fredric Berling has a spectacular aura about Fredric Berling has a spectacular aura about

      0  

    Default qryvalues missing when using directStore. baseParams should not be handled as params

    qryvalues missing when using directStore. baseParams should not be handled as params


    Code:
    doQuery : function(q, forceAll,valuesQuery, forcedAdd){
            q = Ext.isEmpty(q) ? '' : q;
            var qe = {
                query: q,
                forceAll: forceAll,
                combo: this,
                cancel:false
            };
            if(this.fireEvent('beforequery', qe)===false || qe.cancel){
                return false;
            }
            q = qe.query;
            forceAll = qe.forceAll;
            if(forceAll === true || (q.length >= this.minChars)){
                if(this.lastQuery !== q || forcedAdd){
                    this.lastQuery = q;
                    if(this.mode == 'local'){
                        this.selectedIndex = -1;
                        if(forceAll){
                            this.store.clearFilter();
                        }else{
                            this.store.filter(this.displayField, q);
                        }
                        this.onLoad();
                    }else{
                        
                        this.store.baseParams[this.queryParam] = q;
                        this.store.baseParams[this.queryValuesIndicator] = valuesQuery;
                        
                        if (typeof valuesQuery == 'undefined'){
                            valuesQuery=false
                        }
                        this.store.load({
                            //params: this.getParams(q)
                            params:{
                                query:q,
                                qryvalues:valuesQuery
                            }
                        });
                        if(!forcedAdd){
                            this.expand();
                        }
                    }
                }else{
                    this.selectedIndex = -1;
                    this.onLoad();
                }
            }
        }
    });
    When using this wonderful widget in Ext3.1 and using a DirectStore , the qryvalues parameter gets missing. I had this problem in other cases and its because you no longer can change the baseParameters in a beforeQuery event. BaseParams are ment to be the same all along the lifetime of the store. I made a quick fix for this and that works for me. (in red)

    I was also wondering if there is anyway to limit the choices . In some cases i really just want the user to be able to select ONE value from the dropdown, and this should overwrite the previously selected value , displaying only one box. In other cases it might be useful to limit the values to a number (say 25) , just to stop some users from selecting any option because the are...well...users...

    again.. Lovely implementation ...great work.

  3. #163
    Ext JS Premium Member
    Join Date
    May 2008
    Location
    Austria, Vienna
    Posts
    219
    Vote Rating
    1
    abraxxa is on a distinguished road

      0  

    Default


    Quote Originally Posted by danh2000 View Post
    @abraxxa, then please provide a test case.

    Thanks
    With version UPDATE 18/01/2009 my null value problem seems to be fixed too.
    If it reappears I'll post a full test case.
    Thanks Dan!

  4. #164
    Ext JS Premium Member
    Join Date
    May 2007
    Posts
    698
    Vote Rating
    3
    danh2000 is on a distinguished road

      0  

    Default


    Quote Originally Posted by abraxxa View Post
    With version UPDATE 18/01/2009 my null value problem seems to be fixed too.
    If it reappears I'll post a full test case.
    Thanks Dan!
    I haven't touched that code since in the previous releases - it was fixed on 15/01/2009 http://www.extjs.com/forum/showthrea...545#post427545

  5. #165
    Ext JS Premium Member
    Join Date
    May 2007
    Posts
    698
    Vote Rating
    3
    danh2000 is on a distinguished road

      0  

    Default


    Quote Originally Posted by Fredric Berling View Post

    When using this wonderful widget in Ext3.1 and using a DirectStore , the qryvalues parameter gets missing. I had this problem in other cases and its because you no longer can change the baseParameters in a beforeQuery event. BaseParams are ment to be the same all along the lifetime of the store. I made a quick fix for this and that works for me. (in red)
    Frederic, Thanks for the report - I don't have a testcase for a direct store so this isn't something I've come accross.

    When I have some time, I'll setup a test case and make compatible with Direct.

    Quote Originally Posted by Fredric Berling View Post

    I was also wondering if there is anyway to limit the choices . In some cases i really just want the user to be able to select ONE value from the dropdown, and this should overwrite the previously selected value , displaying only one box. In other cases it might be useful to limit the values to a number (say 25) , just to stop some users from selecting any option because the are...well...users...

    again.. Lovely implementation ...great work.
    This has been requested previously and I'll consider adding it to a future release.

  6. #166
    Ext JS Premium Member
    Join Date
    May 2008
    Location
    Austria, Vienna
    Posts
    219
    Vote Rating
    1
    abraxxa is on a distinguished road

      0  

    Default


    Quote Originally Posted by danh2000 View Post
    I haven't touched that code since in the previous releases - it was fixed on 15/01/2009 http://www.extjs.com/forum/showthrea...545#post427545
    No idea why it didn't work the first time.

    @limit for the number of choices:
    Because I use it as complete replacement for all comboboxes, because I need the valuesQuery ability for edit forms, I'd need a possibility to limit the number to one too.
    If I can help let me know.

    While looking for possible fixes for my problems I've found some code pieces which I'd like to rewrite a bit.
    Should I post diffs or the whole patched file?

  7. #167
    Ext JS Premium Member
    Join Date
    May 2007
    Posts
    698
    Vote Rating
    3
    danh2000 is on a distinguished road

      0  

    Default


    Quote Originally Posted by abraxxa View Post
    While looking for possible fixes for my problems I've found some code pieces which I'd like to rewrite a bit.
    Should I post diffs or the whole patched file?
    Just post test cases and explanations of why you'd like them re-written or why they are causing problems.

  8. #168
    Ext JS Premium Member
    Join Date
    May 2008
    Location
    Austria, Vienna
    Posts
    219
    Vote Rating
    1
    abraxxa is on a distinguished road

      0  

    Default


    No problems, just things like using switch/case instead of repeated if's to make the code nicer.

  9. #169
    Ext JS Premium Member
    Join Date
    May 2008
    Location
    Austria, Vienna
    Posts
    219
    Vote Rating
    1
    abraxxa is on a distinguished road

      0  

    Default


    In fact I stumbled over a glitch I've already discovered some time ago.
    The order of the valuesQuery reply isn't kept, so sorting on the server is useless at the moment.
    It seems the entries are sorted on the client.
    You can test this with a valuesQuery that returns a json of:
    Code:
    [["1", "C"],["2", "B"],["3", "A"]]
    The entries will be A,B,C instead of C,B,A.

  10. #170
    Sencha User
    Join Date
    Oct 2009
    Posts
    18
    Vote Rating
    0
    sudhirhv is on a distinguished road

      0  

    Default Superboxselect submit values

    Superboxselect submit values


    Hi danh2000,

    This is a superb extension! Just replaced a few fields with your extension, and I could successfully integrate it with my backend. I am using this as a remote combo box.

    Heres all that I have done.

    1) Could create remote store fields and load the store
    2) Submit values selected to the server
    3) Load values into the field for a record retrieved from the backend.

    I have one small problem, maybe this is already addressed in the thread, but I could not really find a solution yet... How do I retrieve the value of the posted field values in the backend?? I use a servlet to capture the data, like for a combobox and my field should have also been posted.

    I thought we needed the hiddenName parameter, added it and tried accessing it but found it to be null. then tried the name parameter, but that is also null.

    Finally I had to pass the values as a string array from the front end via querystringparams.

    For this I accessed the field using Ext.getCmp('id').getValue, and I posted the values into the server.. I would like to avoid manually pushing these values like mentioned above, Is this possible?

    I am hesitant using getCmp('id') method, becasue I use a tab panel, where users can open multiple records of the same form type and I will have to do ID management of the fields.

    Can I avoid this? .

    My config is as below.

    Code:
    var recipientsField = new Ext.ux.form.SuperBoxSelect({
                    allowBlank : false,
                    id : 'ID_Recipients', // we have to bring a counter
                    // here..maybe, let me check
                    // xtype : 'superboxselect',
                    fieldLabel : 'Recipients',
                    resizable : true,
                    minChars : 2,
                    name : 'EmailIDTX',
                    anchor : '100%',
                    store : recipientsStore,
                    pageSize : 50,
                    mode : 'remote',
                    displayField : 'fullname',
                    displayFieldTpl : '{fullname} ({id})',
                    valueField : 'id',
                    queryDelay : 0,
                    triggerAction : 'all'
                    //forceFormValue: true
                })
    Once again, thanks for the extension!

    Please advise me a better approach if any.

    - Sudhir

Thread Participants: 94

  1. Animal (3 Posts)
  2. jay@moduscreate.com (1 Post)
  3. Condor (1 Post)
  4. stever (1 Post)
  5. mystix (5 Posts)
  6. MD (1 Post)
  7. JorisA (1 Post)
  8. randomY (1 Post)
  9. DigitalSkyline (1 Post)
  10. sj137 (3 Posts)
  11. boggle (1 Post)
  12. danh2000 (71 Posts)
  13. ostghost (1 Post)
  14. lossendae (1 Post)
  15. ZooKeeper (1 Post)
  16. greco (1 Post)
  17. Fredric Berling (1 Post)
  18. GraemeBryce (2 Posts)
  19. Strati (2 Posts)
  20. syscobra (2 Posts)
  21. boonkerz (4 Posts)
  22. Sesshomurai (3 Posts)
  23. shamansoft (1 Post)
  24. dorgan (2 Posts)
  25. mjhaston (1 Post)
  26. radtad (5 Posts)
  27. Joyfulbob (2 Posts)
  28. crysfel (1 Post)
  29. armandoxxx (2 Posts)
  30. jarlau (1 Post)
  31. lacco (1 Post)
  32. abraxxa (38 Posts)
  33. prometheus (1 Post)
  34. pops (1 Post)
  35. raphac (1 Post)
  36. Scorpie (2 Posts)
  37. supercharge2 (4 Posts)
  38. jmiguel (2 Posts)
  39. ash11tw (2 Posts)
  40. wojan (1 Post)
  41. ryzmen (1 Post)
  42. nmohler (2 Posts)
  43. wki01 (2 Posts)
  44. gacowarlock (1 Post)
  45. kora.kanchan (1 Post)
  46. senacle (3 Posts)
  47. genie_vn (1 Post)
  48. sergey.s (1 Post)
  49. Grolubao (10 Posts)
  50. mathec (1 Post)
  51. jackjia (1 Post)
  52. polydyne (1 Post)
  53. Antjac (1 Post)
  54. Thomas Triplet (1 Post)
  55. Gonfi (1 Post)
  56. kleins (1 Post)
  57. talha06 (1 Post)
  58. scishop (1 Post)
  59. eztam (2 Posts)
  60. frederickd (10 Posts)
  61. dusoo (2 Posts)
  62. iv_ekker (3 Posts)
  63. pym (1 Post)
  64. sudhirhv (3 Posts)
  65. lanhun (14 Posts)
  66. wcasado (1 Post)
  67. ramana_l_v (3 Posts)
  68. cq.yangyu@gmail.com (1 Post)
  69. siberian (1 Post)
  70. Tommi (4 Posts)
  71. rdblyth (2 Posts)
  72. devtig (3 Posts)
  73. markmansour (1 Post)
  74. dhiren.lodhia (1 Post)
  75. slamhan (1 Post)
  76. panter4 (1 Post)
  77. Korbin (2 Posts)
  78. istetska (1 Post)
  79. ian.young (1 Post)
  80. sebterzi (1 Post)
  81. ucoxk (1 Post)
  82. prakashr (1 Post)
  83. danilo.pederiva (1 Post)
  84. --miCZar-- (2 Posts)
  85. zozofoz (1 Post)
  86. spydercavern (1 Post)
  87. tvelykyy (1 Post)
  88. leorossi (3 Posts)
  89. revertTS (1 Post)
  90. joxzaren (1 Post)
  91. leduc (1 Post)
  92. deepthi_r (1 Post)
  93. qiankun (1 Post)
  94. Mr.Solomon (2 Posts)