breaking news switched to TemplateRootModel
authorrk <rk>
Thu, 24 Jan 2002 01:26:40 +0000 (01:26 +0000)
committerrk <rk>
Thu, 24 Jan 2002 01:26:40 +0000 (01:26 +0000)
source/mircoders/entity/EntityBreaking.java
source/mircoders/servlet/ServletModuleBreaking.java
templates-dist/de/breaking.template

index e19ee76..330e7bb 100755 (executable)
@@ -20,7 +20,7 @@ import mir.entity.*;
 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;
 
@@ -55,7 +55,18 @@ public class EntityBreaking extends AbstractEntity implements Entity, TemplateHa
 
   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
   }
 
 
index 35bc5f0..3ddb284 100755 (executable)
@@ -83,6 +83,7 @@ public class ServletModuleBreaking extends ServletModule
   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) {
index 76bdc44..e7c2746 100755 (executable)
@@ -8,7 +8,7 @@ indymedia.de | languages
 <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>
@@ -23,9 +23,9 @@ indymedia.de | languages
 
   <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>