1

ExtDirectSpringを機能させようとしていますが、Direct Router への URL がどうなるかわかりません。

私のコントローラー:

@Controller
@RequestMapping(value = "/sonstiges/extdirect")
@Transactional
public class ExtDirectController {

  @RequestMapping(value = "")
  public String start() throws Exception {
    return "/sonstiges/extdirect";
  }

  @ExtDirectMethod(value = ExtDirectMethodType.STORE_READ)
  public List<String> loadAllMyStuff() {
    return Arrays.asList(new String[] {"one", "two"});
  }
}

私の JSP では、次のようなプロバイダーを追加します。

    Ext.direct.Manager.addProvider({
                                 "type":"remoting",       // create a Ext.direct.RemotingProvider
                                 "url":"/fkr/app/controller/extjs/remoting/router", // url to connect to the Ext.Direct server-side router.    
                                 "actions":{              // each property within the actions object represents a Class
                                   "ExtDirectController":[
                                     // array of methods within each server side Class
                                     {
                                       "name":"loadAllMyStuff", // name of method
                                       "len":0
                                     },
                                     {
                                       "name":"myTestFunction", // name of method
                                       "len":0
                                     }
                                   ]
                                 },
                                 "namespace":"FKR"// namespace to create the Remoting Provider in
                               });

...そして、次のストアを使用してグリッドを設定します。

store: {
        model: 'Company',
        remoteSort: true,
        autoLoad: true,
        sorters: [
        {
            property: 'turnover',
            direction: 'DESC'
        }],
        proxy: {
            type: 'direct',
            directFn: FKR.ExtDirectController.loadAllMyStuff
        }
  }

ページをロードすると、http://localhost:8080/fkr/app/controller/extjs/remoting/routerへのリクエストが送信されますが、私の loadAllMyStuff- 関数には送信されません。私の推測では、ダイレクト ルーターへの URL が間違っています。

ルーターへの正しい URL は?

編集: RouterControllerのメソッドルーターがパラメーターextActionextMethodを期待していることがわかりましたが、指定されたコードではパラメーターアクションメソッドが送信されます。それは奇妙に思えます...

4

0 に答える 0