no message
authorfh <fh>
Sat, 6 Oct 2001 23:17:21 +0000 (23:17 +0000)
committerfh <fh>
Sat, 6 Oct 2001 23:17:21 +0000 (23:17 +0000)
source/mircoders/servlet/ServletModuleLinksImcs.java
templates-dist/de/linksimcs.template
templates-dist/de/linksimcslist.template

index c32c275..fedde27 100755 (executable)
@@ -84,30 +84,36 @@ public class ServletModuleLinksImcs extends ServletModule
       EntityList   theImcsList;
       String       offsetParam = req.getParameter("offset");
       String       where = "";
-      int          offset=0;
+      String       offset = "";
       PrintWriter  out = res.getWriter();
 
       // hier offsetcode bearbeiten
       if (offsetParam != null && !offsetParam.equals("")){
-        offset = Integer.parseInt(offsetParam);
+        offset = offsetParam;
       }
       if (req.getParameter("next") != null){
-          offset=Integer.parseInt(req.getParameter("nextoffset"));
+          offset= req.getParameter("nextoffset");
       } else {
           if (req.getParameter("prev") != null){
-            offset = Integer.parseInt(req.getParameter("prevoffset"));
+            offset = req.getParameter("prevoffset");
           }
       }
 
-      theParentList = mainModule.getByWhereClause("to_parent_id=NULL", offset);
-      theImcsList = mainModule.getByWhereClause(null, "title", offset);
+                       if (offset==null || offset.equals("")) offset="0";
+                       modelRoot.put("offset",(new Integer(offset)).toString());
+
+      theParentList = mainModule.getByWhereClause("to_parent_id=NULL", 0);
+      theImcsList = mainModule.getByWhereClause(null, "title", (new Integer(offset)).intValue());
 
       modelRoot.put("parentlist",HTMLTemplateProcessor.makeSimpleList(theParentList));
       modelRoot.put("imcslist",HTMLTemplateProcessor.makeSimpleList(theImcsList));
       modelRoot.put("count", (new Integer(theImcsList.getCount())).toString());
                        modelRoot.put("from", (new Integer(theImcsList.getFrom())).toString());
                        modelRoot.put("to", (new Integer(theImcsList.getTo())).toString());
-      theLog.printDebugInfo("########### - "+ new Integer(theImcsList.getTo()).toString());
+      if (theImcsList.hasNextBatch())
+                               modelRoot.put("next", (new Integer(theImcsList.getNextBatch())).toString());
+                       if (theImcsList.hasPrevBatch())
+                               modelRoot.put("prev", (new Integer(theImcsList.getPrevBatch())).toString());
 
       HTMLTemplateProcessor.process(res,getLanguage(req)+"/"+templateListString, modelRoot, res.getWriter());
 
index f59fb32..4869f2c 100755 (executable)
@@ -45,6 +45,7 @@
                <option value="1"<if entity.sortpriority == 1> selected</if>> 1 
                <option value="2"<if entity.sortpriority == 2> selected</if>> 2 
                <option value="3"<if entity.sortpriority == 3> selected</if>> 3
+               <option value="4"<if entity.sortpriority == 4> selected</if>> 4
                </select>
     </td>
   </tr>
index 711b1dc..4de07a6 100755 (executable)
   </tr>
 </table>
 <P>
+<if prev>
+       <a href="${actionRoot}?module=LinksImcs&do=list&where=${where}&prevoffset=${prev}&prev=zur&uuml;ck">zurueck</a>&nbsp;
+</if>
+<if next>
+<a href="${actionRoot}?module=LinksImcs&do=list&where=${where}&nextoffset=${next}&next=weiter">weiter</a>
+</if>
 <if (prev || next)>
  <form method="post" action="${actionRoot}">
+ <input type="hidden" name="do" value="list">
  <input type="hidden" name="module" value="LinksImcs">
  <input type="hidden" name="where" value="${where}">
 <if prev>