页面刷新
//初始化
$(document).ready(function () {
doTurn(1,1);
});
function doTurn(page,issue_tag) {
var pager = new Pager();
page = (page <= 1 ? 1 : page);
pager.PageSize = 3;
pager.curpage = page;
var param = {
curpage:page,
limit: 3
};
param.issue_tag = issue_tag;
$.post(‘/busi/indexAction.ered?reqCode=query’, param, function(data) {
var result = eval(“(“+data+”)”);
pager.TotalRows = result.TOTALCOUNT;
pager.refresh();
var resultData = result.ROOT, html = [];
for(var i=0; i<resultData.length; i++) {
html.push(‘‘);
html.push(‘‘+(i+1)+’‘);
if(!isEmpty(resultData[i].issue_projectname)){
html.push(‘‘+resultData[i].issue_projectname+’‘);
}else{
html.push(‘‘);
}
if(!isEmpty(resultData[i].issue_issuename)){
html.push(‘‘+resultData[i].issue_issuename+’‘);
}else{
html.push(‘‘);
}
if(!isEmpty(resultData[i].issue_starttime)){
html.push(‘‘+resultData[i].issue_starttime+’‘);
}else{
html.push(‘‘);
}
if(!isEmpty(resultData[i].issue_funding)){
html.push(‘‘+resultData[i].issue_funding+’‘);
}else{
html.push(‘‘);
}
html.push(‘‘);
}
$(“#showList”).html(html.join(“”));
});
}
序号 | 项目 | 课题 | 时间 | 经费/万 |
---|
/**
* 列表
*/
public void query(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
CommonActionForm aForm=(CommonActionForm) form;
Dto dto=aForm.getParamAsDto(request);
Integer totalCount=(Integer)appReader.queryForObject(“Issue.queryIssueCount”,dto);
List list=new ArrayList();
if(totalCount.intValue()>0){
list=appReader.queryForPage(“Issue.queryIssue”, dto);
}
String jsonString= JsonHelper.encodeList2PageJson(list, totalCount, null);
this.write(jsonString, response);
}
转载于//www.cnblogs.com/wei-java/p/4540085.html
还没有评论,来说两句吧...