java/code/src/com/redhat/rhn/frontend/action/schedule/PackageListSetupAction.java | 33 ++++++---- java/code/webapp/WEB-INF/pages/schedule/packagelist.jsp | 33 +++++++--- 2 files changed, 46 insertions(+), 20 deletions(-)
New commits: commit 82e474c1c60eb318ccd786b7d8c04c342745beed Author: Justin Sherrill jsherril@redhat.com Date: Thu Sep 17 13:57:01 2009 -0400
523926 - fixing issue with schedule event package list not paginating properly
diff --git a/java/code/src/com/redhat/rhn/frontend/action/schedule/PackageListSetupAction.java b/java/code/src/com/redhat/rhn/frontend/action/schedule/PackageListSetupAction.java index 5338e7f..8f8011e 100644 --- a/java/code/src/com/redhat/rhn/frontend/action/schedule/PackageListSetupAction.java +++ b/java/code/src/com/redhat/rhn/frontend/action/schedule/PackageListSetupAction.java @@ -14,21 +14,23 @@ */ package com.redhat.rhn.frontend.action.schedule;
-import com.redhat.rhn.common.db.datasource.DataResult; import com.redhat.rhn.domain.action.Action; import com.redhat.rhn.domain.action.ActionFactory; import com.redhat.rhn.domain.action.ActionFormatter; import com.redhat.rhn.domain.action.ActionType; import com.redhat.rhn.domain.user.User; -import com.redhat.rhn.frontend.listview.PageControl; import com.redhat.rhn.frontend.struts.RequestContext; -import com.redhat.rhn.frontend.struts.RhnListAction; +import com.redhat.rhn.frontend.struts.RhnAction; +import com.redhat.rhn.frontend.taglibs.list.helper.ListHelper; +import com.redhat.rhn.frontend.taglibs.list.helper.Listable; import com.redhat.rhn.manager.action.ActionManager;
import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping;
+import java.util.List; + import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
@@ -36,7 +38,7 @@ import javax.servlet.http.HttpServletResponse; * PackageListSetupAction * @version $Rev$ */ -public class PackageListSetupAction extends RhnListAction { +public class PackageListSetupAction extends RhnAction implements Listable {
/** {@inheritDoc} */ public ActionForward execute(ActionMapping mapping, @@ -45,17 +47,10 @@ public class PackageListSetupAction extends RhnListAction { HttpServletResponse response) {
RequestContext requestContext = new RequestContext(request); - Long actionId = requestContext.getRequiredParam("aid"); - User user = requestContext.getLoggedInUser(); - PageControl pc = new PageControl(); - - clampListBounds(pc, request, user); - Action action = ActionManager.lookupAction(user, actionId);
- DataResult dr = ActionManager.getPackageList(actionId, pc);
ActionType type = action.getActionType(); if (type.equals(ActionFactory.TYPE_PACKAGES_UPDATE) || @@ -73,11 +68,25 @@ public class PackageListSetupAction extends RhnListAction { request.setAttribute("type", "patchsets"); }
+ + ListHelper helper = new ListHelper(this, request); + helper.execute(); + + ActionFormatter af = action.getFormatter(); request.setAttribute("actionname", af.getName()); - request.setAttribute("pageList", dr); request.setAttribute("user", user); + request.setAttribute("aid", actionId);
return mapping.findForward("default"); } + + /** + * + * {@inheritDoc} + */ + public List getResult(RequestContext context) { + Long actionId = context.getParamAsLong("aid"); + return ActionManager.getPackageList(actionId, null); + } } diff --git a/java/code/webapp/WEB-INF/pages/schedule/packagelist.jsp b/java/code/webapp/WEB-INF/pages/schedule/packagelist.jsp index 29164ca..397f3d8 100644 --- a/java/code/webapp/WEB-INF/pages/schedule/packagelist.jsp +++ b/java/code/webapp/WEB-INF/pages/schedule/packagelist.jsp @@ -2,6 +2,8 @@ <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://rhn.redhat.com/rhn" prefix="rhn" %> <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %> +<%@ taglib uri="http://rhn.redhat.com/tags/list" prefix="rl" %> +
html:xhtml/ <html> @@ -18,14 +20,29 @@ </div>
- <rhn:list pageList="${requestScope.pageList}" - noDataText="packagelist.jsp.nopackages"> - rhn:listdisplay - <rhn:column header="packagelist.jsp.name.${type}"> - ${current.nvre} - </rhn:column> - </rhn:listdisplay> - </rhn:list> + +<rl:listset name="packset"> + +<rl:list emptykey="packagelist.jsp.nopackages"> + + <rl:decorator name="ElaborationDecorator"/> + + + <rl:column sortable="true" + bound="false" + styleclass="first-column last-column" + headerkey="packagelist.jsp.name.${type}" + sortattr="nvre" + defaultsort="asc" > + ${current.nvre} + </rl:column> + +</rl:list> + +<input type="hidden" name="aid" value="${aid}"> + +</rl:listset> + </body> </html>
spacewalk-commits@lists.fedorahosted.org