1. #121
    Ext User jezmck's Avatar
    Join Date
    Jan 2008
    Location
    UK
    Posts
    128
    Vote Rating
    0
    jezmck is an unknown quantity at this point

      0  

    Default


    when you use () you are calling the function.
    when you set the handler you are referencing the function, so you just provide its name.

    you can also create functions which return functions if you need to be able to pass parameters.

  2. #122
    Ext User zmijanow's Avatar
    Join Date
    Mar 2008
    Location
    Berlin
    Posts
    6
    Vote Rating
    0
    zmijanow is on a distinguished road

      0  

    Default RowActions and RowExpander together produce error

    RowActions and RowExpander together produce error


    Hello,

    Started with Ext 2.0 a month ago, it's great lib. Many thanks to all for great forum and Saki for his great extensions. Now for the first time I've got a (hopefully small) problem for which I don't have any clue

    [see code example in the folowing post]

    Thank you for your help,
    simon
    Last edited by zmijanow; 22 Apr 2008 at 12:15 PM. Reason: fix code tags

  3. #123
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996
    Vote Rating
    5
    mjlecomte will become famous soon enough mjlecomte will become famous soon enough

      0  

    Default


    Simon,

    That code is pretty hard to read. Rather than copy/paste from firebug console, suggest you post code directly from your IDE. I see you have 'code' tags, but they didn't get applied for some reason.

    The other thing you can do to help is show the stack trace as seen from firebug on that error.

  4. #124
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,509
    Vote Rating
    374
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    I have added row expander to demo page at http://rowactions.extjs.eu I was not able to reproduce any error - worked for the first time.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  5. #125
    Ext User zmijanow's Avatar
    Join Date
    Mar 2008
    Location
    Berlin
    Posts
    6
    Vote Rating
    0
    zmijanow is on a distinguished road

      0  

    Default Problem with RowActions and RowExpander

    Problem with RowActions and RowExpander


    Hmm, this with your working demo is confusing. The only difference I see is that you use window and demo grid class.

    Whatsoever, I wrote now very simple example script (see attachment) which should reproduce the error. The testcases can be easyly commented in and out.

    For quickview here is the code:


    Code:
     Ext.onReady(function(){
    
        Ext.QuickTips.init();
    
        var xg = Ext.grid;
        
        var dummyData = [
            ['3m Co', 'Manufacturing', 'Lorem ipsum blah'],
            ['Alcoa Inc', 'Manufacturing', 'Lorem ipsum blah'],
            ['Altria Group Inc', 'Manufacturing', 'Lorem ipsum blah'],
            ['American Express Company', 'Finance', 'Lorem ipsum blah'],
            ['American International Group, Inc.', 'Services', 'Lorem ipsum blah']
        ];
    
        // shared reader
        var reader = new Ext.data.ArrayReader({}, [
           {name: 'company'},
           {name: 'industry'},
           {name: 'desc'}
        ]);
    
        // row expander
        var expander = new xg.RowExpander({
            tpl : new Ext.Template(
                  '<br>',
                '<p><b>Company:</b> {company}</p><br>',
                '<p><b>Summary:</b> {desc}</p>',
                  '<br>'
            )
        });
    
        var actions = new Ext.ux.grid.RowActions({
             header: 'Actions',
            autoWidth: false,
            actions:[{
                iconCls:'icon-add',
                tooltip:'ADD SOMETHING'
            },{
                 iconCls:'icon-del',
                tooltip:'DELETE SOMETHING'
            }]
        });
    
        actions.on({
            action: function(grid, record, action, row, col) {
                Ext.MessageBox.alert('Action', 'To do: '+action+' on row '+row);
            }
        });
    
        // EXPANDER ONLY ColumnModel
        var colmod_1 = new xg.ColumnModel([
                 expander
                ,{id:'company', header: "Company", width: 80, sortable: true, dataIndex: 'company', editor: new Ext.form.TextField({ allowBlank: false }) }
                ,{id:'industry', header: "Industry", width: 80, sortable: true, dataIndex: 'industry'}
        ]);
    
        // ACTIONS ONLY ColumnModel
        var colmod_2 = new xg.ColumnModel([
                 {id:'company', header: "Company", width: 80, sortable: true, dataIndex: 'company', editor: new Ext.form.TextField({ allowBlank: false }) }
                ,{id:'industry', header: "Industry", width: 80, sortable: true, dataIndex: 'industry'}
                ,actions
        ]);
    
        // EXPANDER + ACTIONS ColumnModel
        var colmod_3 = new xg.ColumnModel([
                 expander
                ,{id:'company', header: "Company", width: 80, sortable: true, dataIndex: 'company', editor: new Ext.form.TextField({ allowBlank: false }) }
                ,{id:'industry', header: "Industry", width: 80, sortable: true, dataIndex: 'industry'}
                ,actions
        ]);
    
        // GRID
        var grid_expand = new xg.EditorGridPanel({
             store: new Ext.data.Store({
                reader: reader,
                data: dummyData
            })
    
    // ------ TESTCASES CHANGE HERE -------------------
    
    // --- EXPANDER ONLY ------------------------------
    //        ,cm: colmod_1
    /*
            ,columns: [
                 expander
                ,{id:'company', header: "Company", width: 80, sortable: true, dataIndex: 'company', editor: new Ext.form.TextField({ allowBlank: false }) }
                ,{id:'industry', header: "Industry", width: 80, sortable: true, dataIndex: 'industry'}
            ]
            ,plugins: expander
    */
    
    
    // --- ACTIONS ONLY -------------------------------
    //        ,cm: colmod_2
    /*
            ,columns: [
                 {id:'company', header: "Company", width: 80, sortable: true, dataIndex: 'company', editor: new Ext.form.TextField({ allowBlank: false }) }
                ,{id:'industry', header: "Industry", width: 80, sortable: true, dataIndex: 'industry'}
                ,actions
            ]
            ,plugins: actions
    */
    
    
    // --- EXPANDER + ACTIONS -------------------------
    //        ,cm: colmod_3
            ,columns: [
                 expander
                ,{id:'company', header: "Company", width: 80, sortable: true, dataIndex: 'company', editor: new Ext.form.TextField({ allowBlank: false }) }
                ,{id:'industry', header: "Industry", width: 80, sortable: true, dataIndex: 'industry'}
                ,actions
            ]
            ,plugins: [ actions, expander ]
    
    
    // ------------------------------------------------
    
            ,viewConfig: {
                forceFit: true
            }
    
            ,width: 600
            ,height: 300
            ,collapsible: true
            ,animCollapse: false
            ,title: 'Grid RowExpander and Grid RowActions'
            ,renderTo: 'grid-example'
        });
    }); // END OF onReady
    And here the stacktrace:


    Code:
     this.ds.fields.get(i) has no properties
    ext-all-debug.js (Line 30510)
    
    getColumnData()
    renderRows(undefined, undefined)
    renderUI()
    render()
    onRender(Object dom=div#grid-example id=grid-example, null)
    render("grid-example", undefined)
    render()
    Component(Object store=Object columns=[4] plugins=[2])
    aply()
    aply()
    aply()
    aply()
    aply()
    (no name)()
    fire()
    fireDocReady()
    
    name : (typeof name == 'undefined' ? this.ds.fields.get(i).name ...
    thanks,
    simon
    Attached Files
    Last edited by zmijanow; 22 Apr 2008 at 12:01 PM. Reason: try to fix code tags

  6. #126
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,509
    Vote Rating
    374
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Well, honestly, as soon as I've proven that there is no bug in RowActions in combination with RowExpander, the rest is up to you. That "grid class", as you call it, can be the difference.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  7. #127
    Ext User zmijanow's Avatar
    Join Date
    Mar 2008
    Location
    Berlin
    Posts
    6
    Vote Rating
    0
    zmijanow is on a distinguished road

      0  

    Default solved RA+RE

    solved RA+RE


    Hello Saki,

    I've used 1.0 version of RA, and now updated to development version - it renders now! I diffed a bit the code, you added there dataIndex thing which makes sense with the error I produced with 1.0 version.

    cheers,
    simon

  8. #128
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,509
    Vote Rating
    374
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Yes, it's written in change log...
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  9. #129
    Ext User
    Join Date
    Dec 2007
    Location
    Ukraine
    Posts
    70
    Vote Rating
    0
    yaroslav is on a distinguished road

      0  

    Default


    Thanks a lot!!!!
    Sorry for terrible english. My native language is PHP
    my sites:
    http://restime.net/

  10. #130
    Ext User
    Join Date
    Nov 2007
    Posts
    110
    Vote Rating
    0
    ray007 is on a distinguished road

      0  

    Cool


    First: great work!

    ... but I have a little problem: when inserting an empty row into the grid the template execution fails :-(

    Exception as follows:
    PHP Code:
    [ERROR] [ComClientcallHandler: [object Object]: (ReferenceErrorundefinedanonymous([object Object],
    [
    object Object],1,1)@http://localhost:8080/client/js/ext/source/util/XTemplate.js:186
    call([object Object],[object Object],[object Object],1,1)@:(0,[object Object],[object Object],1,1)@http://localhost:8080/client/js/ext/source/util/XTemplate.js:227
    ([object Object],[object Object],1,1)@http://localhost:8080/client/js/ext/source/util/XTemplate.js:296
    call([object Object],[object Object],[object Object],1,1)@:([object Object])@http://localhost:8080/client/js/ext/source/util/XTemplate.js:306
    (undefined,[object Object],[object Object],0,4,[object Object])@http://localhost:8080/client/js/addons/ext.ux/rowActions.js:263
    apply([object Object],[object Object])@:(undefined,[object Object],[object Object],0,4,[object Object])@http://localhost:8080/client/js/ext/adapter/ext/ext-base.js:346
    ([object Array],[object Array],[object Object],0,25,false)@http://localhost:8080/client/js/ext/source/widgets/grid/GridView.js:508
    (0,0)@http://localhost:8080/client/js/ext/source/widgets/grid/GridView.js:1017
    ([object Object],0,0)@http://localhost:8080/client/js/ext/source/widgets/grid/GridView.js:851
    ([object Object],[object Array],0)@http://localhost:8080/client/js/ext/source/widgets/grid/GridView.js:1212 
    apply([object Object],[object Object])@:([object Object],[object Array],0)@http://localhost:8080/client/js/ext/source/util/Observable.js:457
    apply([object Object],[object Array])@:("add",[object Object],[object Array],0)@http://localhost:8080/client/js/ext/source/util/Observable.js:39
    ... 
    Any ideas what's going wrong?

    regards,
    Ray

Thread Participants: 226

  1. franklt69 (10 Posts)
  2. Condor (3 Posts)
  3. Enrico (1 Post)
  4. Dumbledore (2 Posts)
  5. mystix (1 Post)
  6. riets003 (2 Posts)
  7. KRavEN (3 Posts)
  8. sfwalter (1 Post)
  9. Taurus (3 Posts)
  10. fshort (5 Posts)
  11. tchitani (2 Posts)
  12. temporary (1 Post)
  13. pantarhei (2 Posts)
  14. Specks (5 Posts)
  15. spotk (1 Post)
  16. cmendez21 (2 Posts)
  17. anjelika (3 Posts)
  18. askar (3 Posts)
  19. 6epcepk (1 Post)
  20. lkasdorf (1 Post)
  21. Gunmen (1 Post)
  22. mjlecomte (7 Posts)
  23. Nam (2 Posts)
  24. rekam (4 Posts)
  25. ZooKeeper (3 Posts)
  26. cking (1 Post)
  27. JEBriggs (1 Post)
  28. Yossi (9 Posts)
  29. border9 (2 Posts)
  30. justinfalk (1 Post)
  31. Spirit (6 Posts)
  32. gounis (1 Post)
  33. .andy (1 Post)
  34. robin30 (2 Posts)
  35. knt (2 Posts)
  36. Shmoo (2 Posts)
  37. Strati (1 Post)
  38. jerrybrown5 (12 Posts)
  39. KevinChristensen (1 Post)
  40. jon (2 Posts)
  41. BigTitus (2 Posts)
  42. elDub (4 Posts)
  43. fgerneth (2 Posts)
  44. elnove (2 Posts)
  45. vendiddy (1 Post)
  46. ray007 (6 Posts)
  47. dizelland (1 Post)
  48. donssmith (1 Post)
  49. horrikhalid (5 Posts)
  50. wasp (1 Post)
  51. cblin (1 Post)
  52. ncx5 (3 Posts)
  53. mask_hot (1 Post)
  54. teddyjas (2 Posts)
  55. Zolcsi (1 Post)
  56. PTG (5 Posts)
  57. yaroslav (2 Posts)
  58. Yoris (3 Posts)
  59. DhakouaniM (1 Post)
  60. lobo-tuerto (12 Posts)
  61. angelflaree (3 Posts)
  62. skhan (3 Posts)
  63. ibaniski (3 Posts)
  64. achebe (1 Post)
  65. svdb (1 Post)
  66. emily (6 Posts)
  67. jezmck (3 Posts)
  68. SAnDAnGE (1 Post)
  69. eliezerreis (4 Posts)
  70. nutflakes (2 Posts)
  71. RoDush (1 Post)
  72. tonig84 (2 Posts)
  73. kpmonroe (1 Post)
  74. KJedi (1 Post)
  75. javaeedeveloper (2 Posts)
  76. razvanioan (3 Posts)
  77. jla (2 Posts)
  78. max52 (1 Post)
  79. seppy (5 Posts)
  80. adz08 (1 Post)
  81. chalu (10 Posts)
  82. sekaijin (2 Posts)
  83. jimkan (1 Post)
  84. joao_candido (3 Posts)
  85. fanta2k (1 Post)
  86. nctag (3 Posts)
  87. yhwh (2 Posts)
  88. zmijanow (3 Posts)
  89. brizardh (3 Posts)
  90. zxyth (6 Posts)
  91. johnstontrav (2 Posts)
  92. dalad (2 Posts)
  93. niaz (4 Posts)
  94. armandoxxx (8 Posts)
  95. nojutsu (3 Posts)
  96. lfelican (2 Posts)
  97. DamienValentine (2 Posts)
  98. NoahK17 (10 Posts)
  99. shay2501 (2 Posts)
  100. sdileep (1 Post)
  101. pokerking400 (19 Posts)
  102. lacco (2 Posts)
  103. medley (8 Posts)
  104. archmisha (3 Posts)
  105. rizjoj (2 Posts)
  106. thephatp (2 Posts)
  107. descheret (1 Post)
  108. macedge (6 Posts)
  109. ttbgwt (2 Posts)
  110. allistar (3 Posts)
  111. emredagli (1 Post)
  112. Nadril (2 Posts)
  113. mbajema (1 Post)
  114. wwwtd (1 Post)
  115. Besessener (6 Posts)
  116. Chrissu (3 Posts)
  117. pavanextjs (6 Posts)
  118. javauser (2 Posts)
  119. AmitOlsys (7 Posts)
  120. afei (1 Post)
  121. kurtis (6 Posts)
  122. DamianHartin (2 Posts)
  123. kimmking (1 Post)
  124. jollyca (2 Posts)
  125. Rothariger (10 Posts)
  126. ThunderZtorm (3 Posts)
  127. Stephan Schrade (1 Post)
  128. groyk (2 Posts)
  129. bwhitehall (2 Posts)
  130. neteor (2 Posts)
  131. saipkjai (1 Post)
  132. randomuser01 (1 Post)
  133. kisjonnk (1 Post)
  134. divad (2 Posts)
  135. fxmisticat (2 Posts)
  136. dasnk (1 Post)
  137. klascano (1 Post)
  138. sarav (1 Post)
  139. ringfas (1 Post)
  140. iBeb (1 Post)
  141. kjleng (1 Post)
  142. resonante (4 Posts)
  143. wki01 (1 Post)
  144. quen567 (2 Posts)
  145. nightwatch (2 Posts)
  146. SunWuKung (2 Posts)
  147. nar (1 Post)
  148. mnc (1 Post)
  149. wgpubs (3 Posts)
  150. Stju (1 Post)
  151. d4rk knight (2 Posts)
  152. igor_vlad (1 Post)
  153. lassaad (1 Post)
  154. Dumas (5 Posts)
  155. s.m.srinivas (2 Posts)
  156. whodat (7 Posts)
  157. Kudzu (1 Post)
  158. nathanblogs (1 Post)
  159. leonardodaza (2 Posts)
  160. The Edge (1 Post)
  161. tahseen.ur.rehman (1 Post)
  162. Andrelmp (2 Posts)
  163. dfa (1 Post)
  164. cybersys (5 Posts)
  165. flylaputa (3 Posts)
  166. Tawez (2 Posts)
  167. Fred Seyffert (2 Posts)
  168. Jangla (7 Posts)
  169. agent29 (1 Post)
  170. vinaykurudi (1 Post)
  171. Jim.Barrows (2 Posts)
  172. PV-Patrick (1 Post)
  173. jakeext (2 Posts)
  174. quicksilver_in (12 Posts)
  175. dewoob (2 Posts)
  176. gelgoogho (1 Post)
  177. andyatmiami (1 Post)
  178. rat (1 Post)
  179. Margusja (6 Posts)
  180. charcalcado (1 Post)
  181. realjax (2 Posts)
  182. kartikayg (4 Posts)
  183. sanantone (1 Post)
  184. iryndin (2 Posts)
  185. Joel (2 Posts)
  186. jsemmanuel (2 Posts)
  187. jeffcirceo (1 Post)
  188. boldt (1 Post)
  189. schoonmoeder (2 Posts)
  190. kr1pton (2 Posts)
  191. 29er (1 Post)
  192. return1.at (1 Post)
  193. extjsnewb (1 Post)
  194. frrogoy (1 Post)
  195. hotdesc (2 Posts)
  196. a.bongardt (1 Post)
  197. King_Aero (1 Post)
  198. daiei27 (3 Posts)
  199. jasmina (3 Posts)
  200. winsent (1 Post)
  201. hsomesun (2 Posts)
  202. max.bertolini (1 Post)
  203. Dmoney (1 Post)
  204. maxazan (1 Post)
  205. cyChop (2 Posts)
  206. pipiet06 (2 Posts)
  207. asafm (2 Posts)
  208. adetogni (4 Posts)
  209. rebeccapeltz (10 Posts)
  210. enoal (3 Posts)
  211. rrpero (3 Posts)
  212. test45 (1 Post)
  213. kevDawg (3 Posts)
  214. anacab (1 Post)
  215. travin (1 Post)
  216. bidibule (1 Post)
  217. JimR (5 Posts)
  218. apurva_mistry (1 Post)
  219. pramodkhare (3 Posts)
  220. dm7777 (1 Post)
  221. extjs-dev (2 Posts)
  222. aveltens (1 Post)
  223. carlosgoias (1 Post)
  224. oeginc (2 Posts)
  225. schusco (3 Posts)
  226. katxeus (1 Post)