© 1999-2048 dssz.net 粤ICP备11031372号
*
*/ public boolean isEmpty() { if (pagetype == null || pagetype.equals("")) { return true; } else { return false; } } /** **
* */ public ArrayList getResult() { if (!isEmpty()) { if (pagetype.equals("nextPage")) { result = pagination.getNextPage(); } else if (pagetype.equals("previousPage")) { result = pagination.getPreviouspage(); } else if (pagetype.equals("lastPage")){ result = pagination.getLastPage(); } else if (pagetype.equals("firstPage")){ result = pagination.getFirstPage(); } else{ result=pagination.getJumpPage(pagetype); } } else { result = pagination.getProducts(); } return result; } /** **
* */ //此对象中保存了页面的所有情况,包括多少页等信息 public PaginationBean getPagePagination() { return pagination; } /** **
*/ //实例化PaginationBean的构造函数 public void Init(ArrayList result) { this.result = result; pagination = new PaginationBean(result); } } ------------------------------ import java.util.ArrayList; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import com.list.struts.form.ListForm; import com.list.struts.util.Page; import com.list.struts.util.PageBean; import com.list.struts.util.PaginationBean; import com.list.struts.vo.newgetResouce; public class ListAction extends Action { /* * Generated Methods */ public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { //若提交页面有提交信息,则用listForm获取进行数据库查询 //ListForm listForm = (ListForm) form;// TODO Auto-generated method stub List用户名 | 密 码 | 生 日 | 职 业 | 性 别 |
---|---|---|---|---|
| <%-- |