no message
authorfh <fh>
Wed, 5 Sep 2001 09:09:59 +0000 (09:09 +0000)
committerfh <fh>
Wed, 5 Sep 2001 09:09:59 +0000 (09:09 +0000)
source/mircoders/module/ModuleLinksImcs.java
source/mircoders/servlet/ServletModuleLinksImcs.java

index 4f293ab..9fbbdf5 100755 (executable)
@@ -35,8 +35,8 @@ public class ModuleLinksImcs extends AbstractModule
              theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("Module.LinksImcs.Logfile"));
     }
 
-    public SimpleList getLinksImcsAsSimpleList() {
-           return ((DatabaseLinksImcs)theStorage).getPopupData();
+    public SimpleHash getLinksImcsAsSimpleHash() {
+           return ((DatabaseLinksImcs)theStorage).getHashData();
     }
 
 }
index 7e9efae..1d4720c 100755 (executable)
@@ -33,6 +33,7 @@ public class ServletModuleLinksImcs extends ServletModule
   private static ServletModuleLinksImcs instance = new ServletModuleLinksImcs();
   public static ServletModule getInstance() { return instance; }
 
+
   private ServletModuleLinksImcs() {
     theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("ServletModule.LinksImcs.Logfile"));
     templateListString = Configuration.getProperty("ServletModule.LinksImcs.ListTemplate");
@@ -49,15 +50,23 @@ public class ServletModuleLinksImcs extends ServletModule
   public void add(HttpServletRequest req, HttpServletResponse res)
     throws ServletModuleException {
     try {
+      SimpleHash mergeData = new SimpleHash();
       EntityList   theList;
+      mergeData.put("new", "1");
+
       PrintWriter out = res.getWriter();
       int offset = 0;
 
-      theList = mainModule.getByWhereClause(null, offset);
+      theList = mainModule.getByWhereClause("to_parent_id=0", offset);
+      mergeData.put("contentlist",((ModuleLinksImcs)mainModule).getLinksImcsAsSimpleHash());
+
       if (theList == null || theList.getCount() == 0 || theList.getCount()>1){
-        HTMLTemplateProcessor.process(getLanguage(req)+"/"+templateObjektString, theList, out);
+        //HTMLTemplateProcessor.process(getLanguage(req)+"/"+templateObjektString, theList, out);
+        HTMLTemplateProcessor.process(getLanguage(req)+"/"+templateObjektString, mergeData, out);
+
       } else {
-        deliver(req, res, theList.elementAt(0), templateObjektString);
+        //deliver(req, res, theList.elementAt(0), templateObjektString);
+        deliver(req, res, mergeData, templateObjektString);
       }
 
     } catch(ModuleException e) {