📄 pagelistaction.java.bak
字号:
public class PageListAction extends Action {
public PageListAction(){}
PageBean pb;
DBTopicFactory fa= getInstantce();
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
String action;
action=request.getParameter("action");
String page=request.getParameter("current");
int current=Interger.Parse(page);
int total=fa.sumtopic();
pb=request.getSession().getAtttribute("page");
pb.setCurrentPage(current);
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -