diff --git a/src/com/silverwrist/venice/ui/conf/jsp/PostBoxTag.java b/src/com/silverwrist/venice/ui/conf/jsp/PostBoxTag.java
index 23f3b8a..e339072 100644
--- a/src/com/silverwrist/venice/ui/conf/jsp/PostBoxTag.java
+++ b/src/com/silverwrist/venice/ui/conf/jsp/PostBoxTag.java
@@ -19,11 +19,13 @@ package com.silverwrist.venice.ui.conf.jsp;
import java.io.IOException;
import java.util.*;
+import javax.servlet.ServletException;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
import org.apache.log4j.*;
import com.silverwrist.venice.ui.*;
import com.silverwrist.venice.ui.helpers.HTMLRendering;
+import com.silverwrist.venice.ui.velocity.*;
public class PostBoxTag extends VeniceConfBodyTagSupport
{
@@ -41,17 +43,9 @@ public class PostBoxTag extends VeniceConfBodyTagSupport
private String m_action = null;
private String m_type = "servlet";
- private int m_real_type = -1;
- private HashMap m_params = new HashMap();
- private String m_newtopic_name = null;
- private String m_newtopic_value = null;
- private String m_pseud_name = null;
- private String m_pseud_value = null;
- private String m_attach_name = null;
- private boolean m_attach_value = false;
- private String m_text_name = null;
- private String m_text_value = null;
- private ArrayList m_buttons = new ArrayList();
+ private HashMap m_params = null;
+ private ArrayList m_buttons = null;
+ private HashMap m_render_data = null;
/*--------------------------------------------------------------------------------
* Overrides from class BodyTagSupport
@@ -65,9 +59,15 @@ public class PostBoxTag extends VeniceConfBodyTagSupport
if (m_action==null)
throw new JspTagException("
null
if the parameter was not set.
+ */
+ public Object getParameter(String key)
+ {
+ return m_map.get(key);
+
+ } // end getParameter
+
+ /**
+ * Returns a java.util.Collection
of all parameter names currently defined on this object.
+ *
+ * @return A collection of all parameter names currently defined.
+ */
+ public Collection getParameterNames()
+ {
+ return m_map.keySet();
+
+ } // end getParameterNames
+
+} // end class ParamMapWrapper
diff --git a/src/com/silverwrist/venice/ui/velocity/StdObject.java b/src/com/silverwrist/venice/ui/velocity/StdObject.java
index 3ef72f8..2d122ce 100644
--- a/src/com/silverwrist/venice/ui/velocity/StdObject.java
+++ b/src/com/silverwrist/venice/ui/velocity/StdObject.java
@@ -54,4 +54,46 @@ public class StdObject
} // end formatURL
+ public String fontTag(String color, String size)
+ {
+ if (m_html==null)
+ m_html = (HTMLRendering)(m_rout.queryService(HTMLRendering.class));
+ return m_html.getFontTag(color.trim(),size.trim());
+
+ } // end fontTag
+
+ public String externalStatic(String path)
+ {
+ if (m_html==null)
+ m_html = (HTMLRendering)(m_rout.queryService(HTMLRendering.class));
+ return m_html.getExternalStaticPath(path);
+
+ } // end externalStatic
+
+ public String button(String id, String type)
+ {
+ if (m_html==null)
+ m_html = (HTMLRendering)(m_rout.queryService(HTMLRendering.class));
+ id = id.trim().toLowerCase();
+ type = type.trim().toLowerCase();
+ if (type.equals("visual"))
+ return m_html.getButtonVisual(id);
+ else if (type.equals("input"))
+ return m_html.getButtonInput(id);
+ else
+ return "";
+
+ } // end button
+
+ public String comment(String data)
+ {
+ if (m_html==null)
+ m_html = (HTMLRendering)(m_rout.queryService(HTMLRendering.class));
+ if (m_html.useHTMLComments())
+ return "";
+ else
+ return "";
+
+ } // end comment
+
} // end class StdObject
diff --git a/templates/VM_global_library.vm b/templates/VM_global_library.vm
index e0db93b..9bcfaf0 100644
--- a/templates/VM_global_library.vm
+++ b/templates/VM_global_library.vm
@@ -18,3 +18,11 @@
## Define macros around the "std" object.
#macro( formatURL $type $url )$std.formatURL($type,$url)#end
+
+#macro( font $color $size )$std.fontTag($color,$size)#end
+
+#macro( externalStatic $p )$std.externalStatic($p)#end
+
+#macro( button $id $typ )$std.button($id,$typ)#end
+
+#macro( comment $d )$std.comment($d)#end
diff --git a/templates/conf/post_box.vm b/templates/conf/post_box.vm
new file mode 100644
index 0000000..27862ff
--- /dev/null
+++ b/templates/conf/post_box.vm
@@ -0,0 +1,65 @@
+#*
+ The contents of this file are subject to the Mozilla Public License Version 1.1
+ (the "License"); you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at