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());
</tr>
</table>
<P>
+<if prev>
+ <a href="${actionRoot}?module=LinksImcs&do=list&where=${where}&prevoffset=${prev}&prev=zurück">zurueck</a>
+</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>