public class DeleteHistoryServiceImpl extends CommanServiceImpl implements
DeleteHistoryService {
private IDeleteHistoryDAO deleteHistoryDAO = DAOFactory.getInstance()
.getDeleteHistoryDAO();
public JSONObject queryAll(Map map) throws SQLException {
JSONObject returnJson = new JSONObject();
returnJson.put("flag", true);
try {
List testlist = deleteHistoryDAO.query(map);
if(testlist==null){
returnJson.put("flag", false);
returnJson.put("errorInfo", "list is null");
}
returnJson.put("testList",testlist);
} catch (SQLException e) {
returnJson.put("flag", false);
returnJson.put("errorInfo", "query fail");
}
return returnJson;
}private function queryAllSuccess(tmp:Object):void{
var tmpArr:Array = tmp.testList as Array;
if(tmpArr != null){
for(var i:int = 0;i<tmpArr.length;i++){
var dh:DeleteHistoryTable = new DeleteHistoryTable();
dh.module = tmpArr[i].module;
dh.name = tmpArr[i].name;
dh.username =tmpArr[i].username;
dh.createDate = tmpArr[i].createDate;
testList.addItem(dh);
}
}
}Flex 不认识list.现在页面什么也不显示。不知道为什么。要怎么做才能显示?
DeleteHistoryService {
private IDeleteHistoryDAO deleteHistoryDAO = DAOFactory.getInstance()
.getDeleteHistoryDAO();
public JSONObject queryAll(Map map) throws SQLException {
JSONObject returnJson = new JSONObject();
returnJson.put("flag", true);
try {
List testlist = deleteHistoryDAO.query(map);
if(testlist==null){
returnJson.put("flag", false);
returnJson.put("errorInfo", "list is null");
}
returnJson.put("testList",testlist);
} catch (SQLException e) {
returnJson.put("flag", false);
returnJson.put("errorInfo", "query fail");
}
return returnJson;
}private function queryAllSuccess(tmp:Object):void{
var tmpArr:Array = tmp.testList as Array;
if(tmpArr != null){
for(var i:int = 0;i<tmpArr.length;i++){
var dh:DeleteHistoryTable = new DeleteHistoryTable();
dh.module = tmpArr[i].module;
dh.name = tmpArr[i].name;
dh.username =tmpArr[i].username;
dh.createDate = tmpArr[i].createDate;
testList.addItem(dh);
}
}
}Flex 不认识list.现在页面什么也不显示。不知道为什么。要怎么做才能显示?
解决方案 »
- springmvc后台跳转不成功,怎么解决,谢谢
- 根据ip获得所在城市
- jsp socket 问题
- 大家帮我看看这个servlet引用对不对
- JSP模态对话框中的Form表单无法提交
- jsp如何调用VB写的dll????????
- 各路高手进来看看::让浏览器在窗口底部提示;
- 请问是否有必要把所有的servlet代码改成javabean来实现???
- 我以前没有学过JSP,请帮忙推荐一本JSP方面的好书。
- 高手求助 Hibernate的查询问题:不知道查询条件的个数(查询的条件根据页面动态获得)如何用QBC查询?
- JSONArray报错。。已经过滤关联的集合属性,还是出现There is a cycle in the hierarchy!
- 散分:关于学习EXTJS经验请教.
private var autoList:ArrayCollection = new ArrayCollection();<mx:DataGrid x="1" y="38" id="auto" columnWidth="60" rowHeight="50" labelField="label" direction="horizontal" height="220" width="239" dataProvider="{autoList}">
<mx:itemRenderer>
<mx:Component>
<mx:Image source="{data.image}" />
</mx:Component>
</mx:itemRenderer>
</mx:DataGrid>
谢谢,这个我已经解决了。我现在做了一个DataGrid,现在有增加,删除,修改的功能。 但是,我只要点删除。成功后弹框。然后随便点什么按钮都会弹一个删除成功的框。
其他两个一样。不知道为什么。在线等......