resources/Editors/Editor.Roo.LayoutDialog.bjs
[app.Builder.js] / resources / Editors / Editor.Roo.LayoutDialog.js
index 8cd342e..8c4ea69 100644 (file)
@@ -379,27 +379,22 @@ Editor.Roo.LayoutDialog = new Roo.XComponent({
          store : {
           '|xns' : 'Roo.data',
           data : [ 
-              [ 'ComboBox', "ComboBox"],
-              [ 'Text' , "TextField"],
-              [ 'Number', "NumberField"],
-              [ 'TextArea', "TextArea"],
-              [ 'Html', "HtmlEntry"]
-              
+              ['id']
           ],
-          fields : [  'ftype', 'fname'],
+          fields : [  'dfield'],
           xns : Roo.data,
           xtype : 'SimpleStore'
          },
          '|xns' : 'Roo.form',
          allowBlank : false,
-         displayField : 'fname',
+         displayField : 'dfield',
          editable : false,
          hiddenName : 'status',
          listWidth : 200,
          mode : 'local',
          name : 'display_field',
          triggerAction : 'all',
-         valueField : 'ftype',
+         valueField : 'dfield',
          width : 150,
          xns : Roo.form,
          xtype : 'ComboBox',
@@ -458,6 +453,17 @@ Editor.Roo.LayoutDialog = new Roo.XComponent({
       }
     ],
     listeners : {
+     beforeedit : function (e)
+      {
+          Roo.log('before edit!!!');
+          Roo.log(e);
+          
+          if(e.field != 'display_field'){
+              return;
+          }
+          
+          _this.grid.colModel.getCellEditor(e.column, e.row).field.store.loadData(e.record.data.relates_to_schema);
+      },
      cellclick : function (_self, rowIndex, columnIndex, e)
       {
       
@@ -528,7 +534,7 @@ Editor.Roo.LayoutDialog = new Roo.XComponent({
                title : r.Field,
                width : 100,
                ftype : 'TextField',
-               display_field : r.Field + '_display_name',
+               display_field : r.Field,
                relates_to_table : rt,
                relates_to_col : rc,
                relates_to_schema : rs