import mir.misc.*;
import mir.storage.*;
-public class EntityBreaking extends AbstractEntity implements Entity, TemplateHashModel
+public class EntityBreaking extends AbstractEntity implements Entity, TemplateHashModel, TemplateModelRoot
{
private static int instances;
public TemplateModel get(java.lang.String key) throws TemplateModelException
{
- return new SimpleScalar(getValue("key"));
+ theLog.printDebugInfo("trying to get: " + key);
+ return new SimpleScalar(getValue(key));
+ }
+
+ public void put(java.lang.String key, TemplateModel model)
+ {
+ // empty for testing
+ }
+
+ public void remove(java.lang.String key)
+ {
+ // empty for testing
}
public void edit(HttpServletRequest req, HttpServletResponse res)
throws ServletModuleException {
try {
+ theLog.printDebugInfo("getting a breaking news");
String idParam = req.getParameter("id");
deliver(req, res, (TemplateModelRoot)mainModule.getById(idParam), templateObjektString);
} catch(ModuleException e) {
<body bgcolor="#FFFFFF">
<include "head.template">
<form action="${actionRoot}" method="post">
- <input type="hidden" name="module" value="Language">
+ <input type="hidden" name="module" value="Breaking">
<input type="hidden" name="id" value="${id}">
<if new><input type="hidden" name="do" value="insert">
<else><input type="hidden" name="do" value="update"></if>
<tr>
<td align="right" bgcolor="#006600"><font color="#ffffff" face="Verdana, Arial, Helvetica, sans-serif" size="-1">
- <B>Sprache:</B></font></td>
+ <B>Text der Breaking News:</B></font></td>
<td>
- <input type="test" name="name" size="30">${text}</textarea>
+ <textarea cols="40" rows="2" name="text">${text}</textarea>
</td>
</tr>