Update of
/var/cvs/contributions/CMSContainer/cmsc/contentrepository/src/java/com/finalist/cmsc/repository/forms
In directory
james.mmbase.org:/tmp/cvs-serv4814/java/com/finalist/cmsc/repository/forms
Modified Files:
ContentAction.java
Log Message:
CMSC-280,Contentchannel screen does not give as much sort options as in
searching in the library
See also:
http://cvs.mmbase.org/viewcvs/contributions/CMSContainer/cmsc/contentrepository/src/java/com/finalist/cmsc/repository/forms
See also: http://www.mmbase.org/jira/browse/CMSC-280
Index: ContentAction.java
===================================================================
RCS file:
/var/cvs/contributions/CMSContainer/cmsc/contentrepository/src/java/com/finalist/cmsc/repository/forms/ContentAction.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- ContentAction.java 4 Jun 2008 05:18:09 -0000 1.9
+++ ContentAction.java 5 Jun 2008 02:32:19 -0000 1.10
@@ -26,7 +26,7 @@
import com.finalist.cmsc.struts.MMBaseAction;
public class ContentAction extends MMBaseAction {
- private static boolean flag;
+
@Override
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response, Cloud cloud) throws Exception {
@@ -51,14 +51,7 @@
orderby = null;
}
if (StringUtils.isEmpty(direction)) {
- if(flag==true){
- direction="down";
- flag=false;
- }else{
- direction="up";
- flag=true;
- }
- //direction = null;
+ direction = null;
}
// Set the offset (used for paging).
@@ -80,7 +73,8 @@
Node channel = cloud.getNode(parentchannel);
NodeList elements = RepositoryUtil.getLinkedElements(channel, null,
orderby, direction, false, offset*maxNumber, maxNumber, -1, -1, -1);
int elementCount = RepositoryUtil.countLinkedContent(channel);
-
+ addToRequest(request, "direction", direction);
+ addToRequest(request, "orderby", orderby);
addToRequest(request, "elements", elements);
addToRequest(request, "elementCount", Integer.toString(elementCount));
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs