4 Listbox =
function() {};
25 init:
function(id, name, type, value, display, filter, config, customParams) {
27 this.customParams = customParams;
30 this.ds =
new Ext.data.Store({
31 proxy:
new Ext.data.HttpProxy({
32 url:
'<?php echo $APP_URL; ?>'
35 baseParams:{type:type, controller:
'<?php echo $controller; ?>', context:
'<?php echo $context; ?>', usr_action:
'listbox', response_format:
'JSON', sid:
'<?php echo session_id() ?>', filter:filter},
37 reader:
new Ext.data.JsonReader({
39 totalProperty:
'totalCount',
41 }, [{name:
'key'}, {name:
'val'}]),
49 for (var i in customParams)
50 this.ds.baseParams[i] = customParams[i];
54 var combo =
new Ext.form.ComboBox({
68 beforequery:
function(queryEvent) {
69 self.ds.baseParams.displayFilter =
"^"+queryEvent.query;
73 if (value && display) {
75 RecType = Ext.data.Record.create([{name:
'key'}, {name:
'val'}]);
76 var record =
new RecType({key:value, val:display});
78 combo.setValue(value);