media-folder-popup were not displayed, fixxed but under use of makeSimpleHash()....
authoridfx <idfx>
Mon, 25 Mar 2002 13:49:55 +0000 (13:49 +0000)
committeridfx <idfx>
Mon, 25 Mar 2002 13:49:55 +0000 (13:49 +0000)
source/mircoders/servlet/ServletModuleImages.java

index eb8c38c..4c34b03 100755 (executable)
@@ -212,8 +212,7 @@ public class ServletModuleImages extends mir.servlet.ServletModule
   }
 
   public void list(HttpServletRequest req, HttpServletResponse res)
-    throws ServletModuleException
-  {
+  throws ServletModuleException {
       // Parameter auswerten
       SimpleHash mergeData = new SimpleHash();
       String query_text = req.getParameter("query_text");
@@ -286,26 +285,36 @@ public class ServletModuleImages extends mir.servlet.ServletModule
     try {
       SimpleHash mergeData = new SimpleHash();
       mergeData.put("new", "1");
+                       mergeData.put("mediafolderPopupData",
+                                                                               DatabaseMediafolder.getInstance().getPopupData());
       deliver(req, res, mergeData, templateObjektString);
     }
     catch (Exception e) { throw new ServletModuleException(e.toString());}
   }
 
-  public void edit(HttpServletRequest req, HttpServletResponse res) throws ServletModuleException
-  {
-    String        idParam = req.getParameter("id");
+  public void edit(HttpServletRequest req, HttpServletResponse res)
+       throws ServletModuleException {
+    String idParam = req.getParameter("id");
     _edit(idParam, req, res);
   }
 
-  private void _edit(String idParam, HttpServletRequest req, HttpServletResponse res) throws ServletModuleException {
+  private void _edit(String idParam, HttpServletRequest req, HttpServletResponse res)
+       throws ServletModuleException {
     if (idParam!=null && !idParam.equals("")) {
       try {
-        //mergeData.put("rightsHashdata", dbRights.getHashData());
-        deliver(req, res, mainModule.getById(idParam), templateObjektString);
-      }
-      catch (ModuleException e) { throw new ServletModuleException(e.toString());}
-    }
-    else throw new ServletModuleException("ServletmoduleImage :: _edit without id");
+                               EntityImages entity = (EntityImages)mainModule.getById(idParam);
+                               SimpleHash mergeData = HTMLTemplateProcessor.makeSimpleHash(entity);
+                               mergeData.put("mediafolderPopupData",
+                                                                                       DatabaseMediafolder.getInstance().getPopupData());
+        deliver(req, res, mergeData, templateObjektString);
+      } catch (ModuleException e) {
+                               throw new ServletModuleException(e.toString());
+                       } catch (StorageObjectException e) {
+                               throw new ServletModuleException(e.toString());
+                       }
+    } else {
+                       throw new ServletModuleException("ServletmoduleImage :: _edit without id");
+               }
   }
 
 
@@ -346,3 +355,4 @@ public class ServletModuleImages extends mir.servlet.ServletModule
 
 
 }
+