From 95858ebdd669fad16f9ee05b5b0e194a68f1c157 Mon Sep 17 00:00:00 2001 From: fh Date: Sat, 6 Oct 2001 23:17:21 +0000 Subject: [PATCH] no message --- source/mircoders/servlet/ServletModuleLinksImcs.java | 20 +++++++++++++------- templates-dist/de/linksimcs.template | 1 + templates-dist/de/linksimcslist.template | 7 +++++++ 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/source/mircoders/servlet/ServletModuleLinksImcs.java b/source/mircoders/servlet/ServletModuleLinksImcs.java index c32c2753..fedde275 100755 --- a/source/mircoders/servlet/ServletModuleLinksImcs.java +++ b/source/mircoders/servlet/ServletModuleLinksImcs.java @@ -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()); diff --git a/templates-dist/de/linksimcs.template b/templates-dist/de/linksimcs.template index f59fb32e..4869f2c4 100755 --- a/templates-dist/de/linksimcs.template +++ b/templates-dist/de/linksimcs.template @@ -45,6 +45,7 @@