0
我使用extdirectspring爲我的Spring MVC應用程序設置了分機直接。我能夠檢索原語和字符串並在ext.js中使用它們。當我嘗試檢索對象列表時,我在javascript端獲得「未定義」。有什麼特別的,我需要做的人類課程,讓它的工作?extdirectspring方法不起作用
我註釋下面的代碼:
@ExtDirectMethod(ExtDirectMethodType.STORE_READ)
@Override
public Collection<Person> getPeople(String groupId) {
Group group = GroupManager.getGroup(groupId);
return group.getPeopleList();
}
這是我使用在客戶端的內容:
directory.getPeople(id, function(result) {
console.log(result);
});
這裏是app.js樣子:
Ext.ns('Ext.app');
Ext.app.REMOTING_API = {
"actions":{
"directory":[{
"name":"getID","len":0
},{
"name":"getPeople","len":1
}
]},
"type":"remoting",
"url":"/test/action/router"
};
我需要看到HTML和JS。你必須在春天做一個鏈接到自動生成的js。 – chrislovecnm
這裏是app.js:'Ext.ns('Ext.app'); Ext.app.REMOTING_API = {「actions」:{「directory」:[{「name」:「getID」,「len」: 0},{「name」:「getPeople」,「len」:1}]},「type」:「remoting」,「url」:「/ test/action/router」};' –
正如我所提到的,我需要看到html和js – chrislovecnm