private ServletModuleBreaking() {
- theLog = Logfile.getInstance(this.getClass().getName());
+ theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("ServletModule.Breaking.Logfile"));
templateListString = MirConfig.getProp("ServletModule.Breaking.ListTemplate");
templateObjektString = MirConfig.getProp("ServletModule.Breaking.ObjektTemplate");
templateConfirmString = MirConfig.getProp("ServletModule.Breaking.ConfirmTemplate");
if (offset==null || offset.equals("")) offset="0";
mergeData.put("offset",offset);
EntityList theList = mainModule.getByWhereClause(null, "webdb_create desc", (new Integer(offset)).intValue());
- mergeData.put("contentlist",HTMLTemplateProcessor.makeSimpleList(theList));
+ mergeData.put("contentlist",theList);
if(theList.getOrder()!=null) {
mergeData.put("order", theList.getOrder());
mergeData.put("order_encoded", URLEncoder.encode(theList.getOrder()));
mergeData.put("prev", (new Integer(theList.getPrevBatch())).toString());
// raus damit
- HTMLTemplateProcessor.process(res,getLanguage(req)+"/"+templateListString, mergeData, res.getWriter());
+ HTMLTemplateProcessor.process(res, templateListString, mergeData, res.getWriter(), getLocale(req));
}
catch (ModuleException e) {throw new ServletModuleException(e.toString());}
catch (IOException e) {throw new ServletModuleException(e.toString());}
catch (Exception e) {throw new ServletModuleException(e.toString());}
}
-
-
-
- // test: deriving entity from freemarker.template.TemplateHashModel
- //////////////////////////////////////////////////////////////////////////////
-
- public void edit(HttpServletRequest req, HttpServletResponse res)
- throws ServletModuleException {
- try {
- theLog.printDebugInfo("getting a breaking news");
- String idParam = req.getParameter("id");
- deliver(req, res, (TemplateModelRoot)mainModule.getById(idParam), templateObjektString);
- } catch(ModuleException e) {
- throw new ServletModuleException(e.toString());
- }
- }
}