some new files / some changes here and there for localized producers
[mir.git] / source / mircoders / servlet / ServletModuleBreaking.java
index 3ddb284..155aeb0 100755 (executable)
@@ -30,7 +30,7 @@ public class ServletModuleBreaking extends ServletModule
 
        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");
@@ -54,7 +54,7 @@ public class ServletModuleBreaking extends ServletModule
                        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()));
@@ -68,26 +68,10 @@ public class ServletModuleBreaking extends ServletModule
                                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());
-    }
-  }
 }