📄 listsysgroupwithpage.java
字号:
package com.chis.model.user;
import com.stframe.dao.DaoUtil;
import com.stframe.dao.PageUtil;
import com.stframe.form.ActionForm;
import com.stframe.servlet.ActionInstance;
/**
* 带分页的群组列表
* @author zxh
*
*/
public class ListSysGroupWithPage extends ActionInstance{
public int execute(ActionForm af) throws Exception {
String shbdwbh = af.getHttpSession().getAttribute("HBDWBH").toString();
int currentpage = 0;
int pagesize = 30;
StringBuffer sbsql = new StringBuffer();
StringBuffer sbpath = new StringBuffer();
//拼凑SQL语句和PATH路径
sbsql.append("SELECT * FROM SYS_GROUP WHERE 1=1 where HBDWBH='"+shbdwbh+"'");
sbpath.append(af.getHttpRequest().getContextPath()+"/Selevet.do?action=BASE_SYSGROUP_LIST");
try {
currentpage = Integer.parseInt(af.getHttpRequest().getParameter("currentpage"));
} catch (Exception e) {
currentpage = 1;
}
PageUtil pageUtil = (PageUtil)DaoUtil.selectPage(af.getConnection(),sbsql.toString(),currentpage, pagesize);
pageUtil.setPath(sbpath.toString());
af.getHttpRequest().setAttribute("grouplist", pageUtil.getContext());
af.getHttpRequest().setAttribute("pagebar", pageUtil.pageBar());
return 1;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -