2011-11-09 7 views
0

ExtJs 3.4のDirectStoreでbaseParamsを使用しているときに奇妙な問題が発生しました:baseParamsが設定されていても(extdirectを使用して)API呼び出しが行われたとき、ストアオブジェクトに格納されます。私は "beforeLoad"中にコンソールに完全なストアオブジェクトを書き込むことでこれをチェックしました。私の店は次のようになります:ExtJSのDirectStoreとbaseParamsの問題3.4

this.store= new Ext.data.DirectStore({ 
     storeId: 'HereComesTheId', 
     api: { 
      read: Abc.pluginName.listSomeStuff 
     }, 
     listeners: { 
      'load': function (store, records, options) { 
       Ext.each(records, function (record, index, all) { 
        if (record.data.selected === true) { 
         store.fireEvent('someThingsHappened', record, index); 
         return false; 
        } 
       }, this); 
      } 
     }, 
     reader: new Ext.data.JsonReader(), 
     remoteSort: false, 
     autoLoad: true, 
     baseParams:{ 
     'param1': Ext.getCmp('Blub').param1, 
     'param2': '123' 
     }, 
    }); 

私はsetBaseParams()も使用しようとしましたが、動作しません。 私は数回前に店舗を使いましたが、このような問題は一度もありませんでした。何か案は?

答えて

0

私自身が答えを見つけました。Extdirect APIの設定が間違っていたので、私は呼び出していました。 action.class.phpでのパブリック関数は、関数は、1つまたは複数のリクエストパラメータを想定している場合、あなたは

@extdirect-len 1 

を設定する必要があり、あなたが再生成extdirectに持っているよりも

@extdirect-len 0 

としましたAPI。それです。