}
public void list(HttpServletRequest req, HttpServletResponse res)
- throws ServletModuleException
- {
+ throws ServletModuleException {
// Parameter auswerten
SimpleHash mergeData = new SimpleHash();
String query_text = req.getParameter("query_text");
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");
+ }
}
}
+