changepageaction.java.bak
来自「bbs struts」· BAK 代码 · 共 41 行
BAK
41 行
public class ChangePageAction extends Action {
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
String action;
action=request.getParameter("action");
DBTopicFactory fa= getInstance();
int total=fa.sumtopic();
PageBean pb=(PageBean )request.getSession().getAtttribute("page");
pb.setTotalRow(total);
if(action.equals("nextPage"))
{
if(pb.isHasNextPage())
{
pb.getNextPage();
pb.setTopics(fa.topicList(pb.getCurrentPage());
}
}
if(action.equals("previousPage"))
{
if(pb.isHasPreviousPage())
{
pb.getNextPage();
pb.setTopics(fa.topicList(pb.getCurrentPage());
}
}
return (mapping.findForward("listAll"));
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?