1. #191
    Ext JS Premium Member
    Join Date
    Mar 2007
    Posts
    32
    Vote Rating
    0
    chiphi13 is on a distinguished road

      0  

    Default this.el has no properties

    this.el has no properties


    Saki,

    I am trying to configure your wonderful grid extension to be able to display the grid in one panel and the form in another panel instead of popping up in a window. I have tried to add the formCt property with a valid panel
    PHP Code:
    this.recordForm = new Ext.ux.grid.RecordForm({
                 
    title:'Ext.ux.grid.RowRecord Example'
                
    ,iconCls:'icon-edit-record'
                
    ,columnCount:2
                
    ,ignoreFields:{compID:true}
                ,
    formCt:'mn-test-panel'
                
    ,readonlyFields:{action1:true}
                ,
    disabledFields:{qtip1:true}
                ,
    autoShow:true 
    The have the following in the ext.onReady


    PHP Code:
    var p= new Ext.Panel({
            
    renderTo:'test-grid'//This is a div on the page
             
    id:'rfwin'
            
    ,title:'test'
                    
    ,iconCls:'icon-grid'
            
    ,width:700
            
    ,height:400
            
    ,plain:true
            
    ,layout:'fit'
            
    ,closable:false
            
    ,border:false
            
    ,items:{xtype:'examplegrid1'id:'examplegrid1'}
            ,
    plugins:[new Ext.ux.IconMenu()]
        }); 
    It appears that if the renderTo for the above panel is Ext.getBody() then it works, but if I try to render it to another panel I get the following error:

    this.el has no properties

    Is this possible with your plugin to accomplish this? Any suggestions of what I may be doing wrong?

  2. #192
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,521
    Vote Rating
    377
    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 guess you were digging into the code deeply and that you discovered some unfinished fragments, right? I was also thinking along the same line of having a panel as the form container, I've made some tests but there was a couple of problems that I haven't resolved yet. Try to uncomment win2 part in the example to see how far I have got.
    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


  3. #193
    Ext JS Premium Member
    Join Date
    Mar 2007
    Posts
    32
    Vote Rating
    0
    chiphi13 is on a distinguished road

      0  

    Default Still receivng his.el has no properties

    Still receivng his.el has no properties


    It appears that the win2 example appears to be working except for the location of the window popping up, but when I try the following....I get the same error when it is trying to create the fields on the form
    PHP Code:
    var rf = new Ext.ux.grid.RecordForm({
             
    formCt:'east-form'
            
    ,autoShow:true
            
    ,autoHide:false
    //        ,showButtons:false
            
    ,ignoreFields:{compID:true}
            ,
    formConfig:{autoHeight:false,border:trueframe:falsemargins:'10 10 10 10'}
        });
        var 
    win2 = new Ext.Panel({
             
    id:'rfwinbl',
             
    renderTo:'test-grid'
            
    ,title:'test'
            
    ,layout:'border'
            
    ,width:800
            
    ,height:600
            
    ,border:false
            
    ,stateful:false
            
    ,plugins:[new Ext.ux.IconMenu({iconCls:'icon-grid'})]
            ,
    items:[{
                 
    region:'center'
                
    ,id:'center-grid'
                
    ,title:'Grid'
                
    ,stateful:false
                
    ,xtype:'examplegrid'
                
    ,autoScroll:true
                
    ,plugins:[rf]
            },{
                 
    region:'north'
                
    ,id:'east-form'
                
    ,title:'Form'
                
    ,stateful:false
                
    ,height:300
                
    //,split:false
                
    ,border:true
                
    ,frame:true
                
    ,collapsible:false
                
    ,layout:'fit'
            
    }]
        }); 
    Any suggestions what could be causing the problem? It appears that it is bombing when trying to do the layout.

  4. #194
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,521
    Vote Rating
    377
    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


    Best suggestion would be: Wait until I finish it. I'll take a look at it this weekend so it's possible that I'll finish it, however, I do not promise anything.
    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. #195
    Sencha User
    Join Date
    Jan 2008
    Posts
    9
    Vote Rating
    0
    trak is on a distinguished road

      0  

    Lightbulb Form msgTarget Bug

    Form msgTarget Bug


    Hi Saki,

    First let me congratulate you for this great plugin! It's really awesome.

    I had a little problem with the error messages when the msgTarget was 'under'. The width of the div would get miscalculated. Looking around i found that on the show method if you load the form before showing the window this issue gets resolved. I just wanted to tell you and to ask you if there's another way to fix this issue.

  6. #196
    Ext JS Premium Member
    Join Date
    Mar 2007
    Posts
    32
    Vote Rating
    0
    chiphi13 is on a distinguished road

      0  

    Default Problem with rendering into panels

    Problem with rendering into panels


    Saki,

    I know that you are extremely busy, but did you get a chance to look at the problem with the grid and window opening up in separate panels?

  7. #197
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,521
    Vote Rating
    377
    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


    Quote Originally Posted by trak View Post
    Hi Saki,

    First let me congratulate you for this great plugin! It's really awesome.

    I had a little problem with the error messages when the msgTarget was 'under'. The width of the div would get miscalculated. Looking around i found that on the show method if you load the form before showing the window this issue gets resolved. I just wanted to tell you and to ask you if there's another way to fix this issue.
    Do you have a patch and/or screenshot? Looks it could be a minor fix easily done...
    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


  8. #198
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,521
    Vote Rating
    377
    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


    Quote Originally Posted by chiphi13 View Post
    Saki,

    I know that you are extremely busy, but did you get a chance to look at the problem with the grid and window opening up in separate panels?
    Sorry, not yet, had another unexpected things to do. Will go into it soon...
    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. #199
    Sencha User
    Join Date
    Dec 2007
    Location
    Aubagne, France
    Posts
    347
    Vote Rating
    1
    mask_hot is on a distinguished road

      0  

    Default Remote ComBo, FK and recordform

    Remote ComBo, FK and recordform


    Hi all,

    I use the recordform plugin and I had a problem using Remote Combobox and sending back data to save them.

    First, I had the "Combo ValueField displayed instead DisplayField" issue.
    For this, I used NeenHouse technic.

    My next problem was the commiting of the changed or newed values.

    I was using the saki example :
    PHP Code:
    // handler to Save Button
    ,commitChanges:function() {
            var 
    records this.store.getModifiedRecords();
            if(!
    records.length) {
                return;
            }
            var 
    data = [];
            
    Ext.each(records, function(ri) {
                var 
    r.getChanges();
                if(
    r.data.newRecord) {
                    
    o.newRecord true;
                }
                
    o[this.idName] = r.get(this.idName);
                
    data.push(o);
            }, 
    this);
            
            var 
    = {
                 
    url:this.url
                
    ,method:'post'
                
    ,callback:this.requestCallback
                
    ,scope:this
                
    ,params:{
                     
    cmd:'saveData'
                    
    ,objName:this.objName
                    
    ,data:Ext.encode(data)
                }
            };
            
    Ext.Ajax.request(o);
        } 
    // eo function commitChanges 
    The issue is calling the r.getChanges function. As my combo is for displaying labels of FK, I do not want to save them but only the Ids.

    So here is my code (using hiddeName for the Editor, and I modified the process-request.php for the saveData function)

    the combo renderer
    PHP Code:
    Ext.ns("Ext.ux.renderer");

    Ext.ux.renderer.ComboRenderer = function(options) {
        var 
    value options.value;
        var 
    combo options.combo;

        var 
    returnValue value;
        var 
    valueField combo.valueField;

        var 
    idx combo.store.findBy(function(record) {
            if(
    record.get(valueField) == value) {
                
    returnValue record.get(combo.displayField);
                return 
    true;
            }
        });

        
    // This is our application specific and might need to be removed for your apps
        
    if(idx && value == 0) {
            
    returnValue '';
        }

        return 
    returnValue;
    };

    Ext.ux.renderer.Combo = function(combo){
        return function(
    valuemetarecord){
            return 
    Ext.ux.renderer.ComboRenderer({
                
    valuevalue,
                
    metameta,
                
    recordrecord,
                
    combocombo
            
    });
        };

    in the column model the combo editor
    PHP Code:
                                       {
                            
    header'ID Pattern'
                            
    ,dataIndex'id_pattern' 
                            
    ,width30
                            
    ,hiddentrue
                            
                         
    },{
                            
    header'Pattern'
                            
    ,dataIndex'pattern_name'
                            
    ,sortabletrue 
                            
    ,width100
                            
    ,renderer:Ext.ux.renderer.Combo(this.patternCombo)
                            ,
    editor:this.patternCombo
                          

    the combo
    PHP Code:
    this.patternCombo this.genPatternCombo();

    ,
    genPatternCombo:function (){
            return new 
    Ext.form.ComboBox({
                                    
    store: new Ext.data.JsonStore({
                                        
    id:'cbo_pattern'
                                         
    ,root:'rows'
                                         
    ,totalProperty:'total'
                                         
    ,url:this.url
                                        
    ,baseParams:{cmd'getData'objName:'dfs_pattern'}
                                         ,
    fields:[
                                             {
    name'id_pattern'type'int'}
                                            ,{
    name'pattern_name'type'string'}
                                            ,{
    name'pattern_description'type'string'}
                                         ]
                                         ,
    sortInfo:{field'pattern_name'direction"ASC"}
                                    })
                                    ,
    hiddenName:'id_pattern'
                                    
    ,valueField'id_pattern',
                                    
    displayField'pattern_name',
                                    
    triggerAction'all',
                                    
    mode'remote',
                                    
    editablefalse,
                                    
    lazyRendertrue,
                                    
    forceSelectiontrue
                                    
                                
    });
                                
        } 
    the afterEdit event
    PHP Code:
    ,onAfterEdit:function(o){
                if(
    o){
                    var 
    grid=o.grid;
                    var 
    record=o.record;
                    var 
    cm=grid.getColumnModel();
                    var 
    editor=cm.getCellEditoro.columno.row);
                    var 
    v=editor.getValue();
                    
                    if(
    editor.field.hiddenField){
                        var 
    v=editor.field.hiddenField.value;
                        
    record.set(editor.field.hiddenNamev);
                    }
                }
        } 
    the commitChanges (called when saving)

    PHP Code:
    ,commitChanges:function() {
            
            var 
    records this.store.getModifiedRecords();
            if(!
    records.length) {
                return;
            }
            var 
    data = [];
            var 
    cm=this.getColumnModel();
            
    Ext.each(records, function(ri) {
                
    //var o = r.getChanges();
                
    var r.modifiedo={};
                for (var 
    n in m) {
                    var 
    column cm.findColumnIndex(n);
                    var 
    editor=cm.getCellEditorcolumn0);
                    
                    if (
    editor) {
                        if (
    editor.field.hiddenField) {
                        
    // muste be the displayField of a combo
                        
    }
                        else {
                            if (
    m.hasOwnProperty(n)) {
                                
    o[n] = r.data[n];
                            }
                        }
                    }
                    else {
                        if (
    m.hasOwnProperty(n)) {
                            
    o[n] = r.data[n];
                        }
                    }
                    
                }
                if(
    r.data.newRecord) {
                    
    o.newRecord true;
                }
                
    o[this.idName] = r.get(this.idName);
                
    data.push(o);
                
            },
    this);
            
            var 
    = {
                 
    url:this.url
                
    ,method:'post'
                
    ,callback:this.requestCallback
                
    ,scope:this
                
    ,params:{
                     
    cmd:'saveData'
                    
    ,objName:this.objName
                    
    ,data:Ext.encode(data)
                }
            };
            
    Ext.Ajax.request(o);
        } 
    // eo function commitChanges
        // }}} 
    ServerSide
    the object defined (with a left join for display)
    PHP Code:
    ,"dfs_patternsystem"=>array(
                 
    "table"=>"dfs_patternsystem left join dfs_pattern on dfs_patternsystem.id_pattern=dfs_pattern.id_pattern "
                         
    ."left join dfs_system on dfs_patternsystem.id_system=dfs_system.id_system"
                
    ,"idName"=>"id_patternsystem"
                
    ,"fields"=>array(
                     
    "id_patternsystem"
                    
    ,"dfs_patternsystem.id_pattern"
                    
    ,"pattern_name"
                    
    ,"dfs_patternsystem.id_system"
                    
    ,"system_name"
                    
    ,"system_col"
                    
    ,"system_specific"
                
    )
            )
    // }}} 

    The saveData
    PHP Code:
    function saveData($osql) {
        
    //logPDI('saveData');
        
    global $objects;
        
    $params $objects[$_REQUEST["objName"]];
        unset(
    $params["fields"]);
            
        
    $params["table"]= $_REQUEST["objName"];

        
    $params["data"] = json_decode(stripslashes($_REQUEST["data"]));
        
    $osql->output($osql->saveData($params));

    // eo function saveData 

  10. #200
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,521
    Vote Rating
    377
    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


    Have you modified also plugin code istself? If so, let me know please.
    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


Thread Participants: 97

  1. franklt69 (1 Post)
  2. Wolfgang (1 Post)
  3. mystix (1 Post)
  4. cobnet (8 Posts)
  5. chiphi13 (4 Posts)
  6. mike1993 (1 Post)
  7. violinista (1 Post)
  8. hui2008 (4 Posts)
  9. AlxH (12 Posts)
  10. oracio (1 Post)
  11. CINUE (2 Posts)
  12. phpcoder (3 Posts)
  13. ostghost (2 Posts)
  14. tdikarim (4 Posts)
  15. lkasdorf (3 Posts)
  16. derf (1 Post)
  17. mjlecomte (11 Posts)
  18. farracha (1 Post)
  19. jcwatson11 (2 Posts)
  20. robin30 (8 Posts)
  21. bluesapphire (1 Post)
  22. wm003 (1 Post)
  23. divxer (1 Post)
  24. escalade (2 Posts)
  25. boonkerz (5 Posts)
  26. JamesC (2 Posts)
  27. neenhouse (5 Posts)
  28. mask_hot (18 Posts)
  29. concep86 (2 Posts)
  30. sinma (2 Posts)
  31. kai5263499 (2 Posts)
  32. jcmartinez (1 Post)
  33. trak (1 Post)
  34. amit.shukld (1 Post)
  35. hsurya (1 Post)
  36. richgoldmd (1 Post)
  37. loic (7 Posts)
  38. jimpa911 (1 Post)
  39. chalu (3 Posts)
  40. damian79 (1 Post)
  41. jimkan (6 Posts)
  42. jahong (7 Posts)
  43. winnel (1 Post)
  44. joku (1 Post)
  45. josephf (2 Posts)
  46. indrajit_bin_rahwana (4 Posts)
  47. nojutsu (2 Posts)
  48. pokerking400 (15 Posts)
  49. georgiosleon (2 Posts)
  50. snilson (2 Posts)
  51. nightowl (1 Post)
  52. gthe (1 Post)
  53. descheret (1 Post)
  54. nebbian (2 Posts)
  55. se7en.hu (1 Post)
  56. towanime (2 Posts)
  57. pravidya (4 Posts)
  58. cnagel (2 Posts)
  59. extnam01 (2 Posts)
  60. Rothariger (6 Posts)
  61. dsmaevich (1 Post)
  62. uidtest (2 Posts)
  63. savant (4 Posts)
  64. aserron (1 Post)
  65. skaue (1 Post)
  66. ielektronick (1 Post)
  67. kalpan (4 Posts)
  68. jasonb885 (2 Posts)
  69. wemerson.januario (1 Post)
  70. extjs_new (23 Posts)
  71. Dumas (24 Posts)
  72. m.natarajan (1 Post)
  73. MrEnirO (4 Posts)
  74. jove76 (2 Posts)
  75. CircleCode (3 Posts)
  76. mdimino (7 Posts)
  77. flinz (2 Posts)
  78. vince (2 Posts)
  79. jmaldini (5 Posts)
  80. mixer80 (1 Post)
  81. prox00 (1 Post)
  82. macdoug1 (14 Posts)
  83. return1.at (8 Posts)
  84. islabucasgrande (1 Post)
  85. big (1 Post)
  86. NicP (9 Posts)
  87. taron133 (1 Post)
  88. araiczyk (1 Post)
  89. adhoul (1 Post)
  90. mayurid (9 Posts)
  91. Kalpit (10 Posts)
  92. bizcatalyst (1 Post)
  93. Manuelbond007 (2 Posts)
  94. nasargus (1 Post)
  95. shahab_et (1 Post)
  96. stevwinata (5 Posts)
  97. tomdchi (2 Posts)