if (withValues.get("creator").toString().equals(""))
withValues.put("creator","Anonym");
String id = mainModule.add(withValues);
- DatabaseContentToTopics.getInstance().setTopics(id,req.getParameter("to_topic"));
+ DatabaseContentToTopics.getInstance().setTopics(id,req.getParameterValues("to_topic"));
//theLog.printDebugInfo(":: content :: inserted");
_showObject(id, req, res);
}
if (idParam == null) throw new ServletModuleException("Falscher Aufruf: (id) nicht angegeben");
HashMap withValues = getIntersectingValues(req, DatabaseContent.getInstance());
- String topic_id = req.getParameter("to_topic");
+ //String topic_id = req.getParameter("to_topic");
+ String[] topic_id = req.getParameterValues("to_topic");
String content_id = req.getParameter("id");
// withValues.put("publish_path", StringUtil.webdbDate2path((String)withValues.get("date")));
if(user != null) withValues.put("user_id", user.getId());
withValues.put("creator","Anonym");
//theLog.printDebugInfo("updating. ");
String id = mainModule.set(withValues);
- DatabaseContentToTopics.getInstance().setTopics(req.getParameter("id"),req.getParameter("to_topic"));
+ DatabaseContentToTopics.getInstance().setTopics(req.getParameter("id"),topic_id);
//theLog.printDebugInfo("update done. ");
String whereParam = req.getParameter("where");
String orderParam = req.getParameter("order");
SimpleHash mergeData = HTMLTemplateProcessor.makeSimpleHash(entContent);
EntityList topicToContent = DatabaseContentToTopics.getInstance().getTopics(entContent);
if (topicToContent!=null && topicToContent.size()>0){
- Entity topics = (EntityTopics)topicToContent.elementAt(0);
- mergeData.put("to_topic",topics.getId());
+ theLog.printDebugInfo("topicanzahl: "+topicToContent.size());
+ Entity topics = null;
+ SimpleList topicList = new SimpleList();
+ for(int i=0;i<topicToContent.size();i++){
+ topics = (EntityTopics)topicToContent.elementAt(i);
+ topicList.add(topics.getId());
+ }
+ mergeData.put("to_topic",topicList);
}
//obsolete, because of psqgl 7.1.x
//mergeData.put("content_data", entContent.getContentData());