+
+ public void add(HttpServletRequest req, HttpServletResponse res)
+ throws ServletModuleException {
+ try {
+ SimpleHash modelRoot = new SimpleHash();
+ EntityList theList;
+ int offset = 0;
+
+ theList = mainModule.getByWhereClause("to_parent_id=0", offset);
+ modelRoot.put("new", "1");
+ modelRoot.put("contentlist",HTMLTemplateProcessor.makeSimpleList(theList));
+ PrintWriter out = res.getWriter();
+
+ if (theList == null || theList.getCount() == 0 || theList.getCount()>1){
+ //HTMLTemplateProcessor.process(getLanguage(req)+"/"+templateObjektString, theList, out);
+ HTMLTemplateProcessor.process(getLanguage(req)+"/"+templateObjektString, modelRoot, out);
+
+ } else {
+ //deliver(req, res, theList.elementAt(0), templateObjektString);
+ deliver(req, res, modelRoot, templateObjektString);
+ }
+
+ } catch(ModuleException e) {
+ throw new ServletModuleException(e.toString());
+ } catch (HTMLParseException e) {
+ throw new ServletModuleException(e.toString());
+ } catch (IOException e) {
+ throw new ServletModuleException(e.toString());
+ } catch(StorageObjectException e) {
+ throw new ServletModuleException(e.toString());
+ }
+
+
+ }