"style" : "margin: 5px",
"$ xns" : "Roo.form",
"items" : [
+ {
+ "listeners" : {
+ "add" : "function (combo)\n{\n Pman.Dialog.CoreEnum.show({\n etype : 'EuroCham.Industry',\n title : 'Add Industry'\n }, function(res){\n combo.setFromData(res);\n })\n}"
+ },
+ "alwaysQuery" : true,
+ "Number pageSize" : 50,
+ "triggerAction" : "all",
+ "fieldLabel" : "Industry",
+ "forceSelection" : true,
+ "selectOnFocus" : true,
+ "xtype" : "ComboBox",
+ "minChars" : 2,
+ "hiddenName" : "industry_id",
+ "displayField" : "display_name",
+ "valueField" : "id",
+ "editable" : true,
+ "Number listWidth" : 400,
+ "width" : 300,
+ "$ xns" : "Roo.form",
+ "name" : "industry_id_display_name",
+ "queryParam" : "query[search]",
+ "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{display_name}</b> </div>",
+ "items" : [
+ {
+ "listeners" : {
+ "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n \n o.params.active = 1;\n o.params.etype = 'EuroCham.Industry';\n}\n"
+ },
+ "xtype" : "Store",
+ "remoteSort" : true,
+ "$ xns" : "Roo.data",
+ "$ sortInfo" : "{ direction : 'ASC', field: 'id' }",
+ "* prop" : "store",
+ "items" : [
+ {
+ "$ url" : "baseURL + '/Roo/Core_enum.php'",
+ "xtype" : "HttpProxy",
+ "method" : "GET",
+ "$ xns" : "Roo.data",
+ "* prop" : "proxy"
+ },
+ {
+ "id" : "id",
+ "root" : "data",
+ "xtype" : "JsonReader",
+ "$ xns" : "Roo.data",
+ "$ fields" : "[\n {\n \"name\":\"name\",\n \"type\":\"string\"\n },\n {\n \"name\":\"display_name\",\n \"type\":\"string\"\n }\n]",
+ "* prop" : "reader",
+ "totalProperty" : "total"
+ }
+ ]
+ }
+ ]
+ },
{
"xtype" : "Hidden",
"$ xns" : "Roo.form",
}
},
items : [
+ {
+ store : {
+ proxy : {
+ '|xns' : 'Roo.data',
+ method : 'GET',
+ url : baseURL + '/Roo/Core_enum.php',
+ xns : Roo.data,
+ xtype : 'HttpProxy'
+ },
+ reader : {
+ '|xns' : 'Roo.data',
+ fields : [
+ {
+ "name":"name",
+ "type":"string"
+ },
+ {
+ "name":"display_name",
+ "type":"string"
+ }
+ ],
+ id : 'id',
+ root : 'data',
+ totalProperty : 'total',
+ xns : Roo.data,
+ xtype : 'JsonReader'
+ },
+ '|xns' : 'Roo.data',
+ remoteSort : true,
+ sortInfo : { direction : 'ASC', field: 'id' },
+ xns : Roo.data,
+ xtype : 'Store',
+ listeners : {
+ beforeload : function (_self, o){
+ o.params = o.params || {};
+
+ o.params.active = 1;
+ o.params.etype = 'EuroCham.Industry';
+ }
+ },
+ items : [
+
+ ]
+
+ },
+ '|xns' : 'Roo.form',
+ alwaysQuery : true,
+ displayField : 'display_name',
+ editable : true,
+ fieldLabel : 'Industry',
+ forceSelection : true,
+ hiddenName : 'industry_id',
+ listWidth : 400,
+ minChars : 2,
+ name : 'industry_id_display_name',
+ pageSize : 50,
+ queryParam : 'query[search]',
+ selectOnFocus : true,
+ tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{display_name}</b> </div>',
+ triggerAction : 'all',
+ valueField : 'id',
+ width : 300,
+ xns : Roo.form,
+ xtype : 'ComboBox',
+ listeners : {
+ add : function (combo)
+ {
+ Pman.Dialog.CoreEnum.show({
+ etype : 'EuroCham.Industry',
+ title : 'Add Industry'
+ }, function(res){
+ combo.setFromData(res);
+ })
+ }
+ },
+ items : [
+
+ ]
+
+ },
{
'|xns' : 'Roo.form',
name : 'id',