diff --git a/src/com/silverwrist/venice/ui/conf/jsp/PostBoxTag.java b/src/com/silverwrist/venice/ui/conf/jsp/PostBoxTag.java index 1fe22ec..23f3b8a 100644 --- a/src/com/silverwrist/venice/ui/conf/jsp/PostBoxTag.java +++ b/src/com/silverwrist/venice/ui/conf/jsp/PostBoxTag.java @@ -9,7 +9,7 @@ * * The Original Code is the Venice Web Communities System. * - * The Initial Developer of the Original Code is Eric J. Bowersox , + * The Initial Developer of the Original Code is Eric J. Bowersox , * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are * Copyright (C) 2001-2004 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. * @@ -32,26 +32,26 @@ public class PostBoxTag extends VeniceConfBodyTagSupport *-------------------------------------------------------------------------------- */ - private static Category logger = Category.getInstance(PostBoxTag.class); + private static Logger logger = Logger.getLogger(PostBoxTag.class); /*-------------------------------------------------------------------------------- * Attributes *-------------------------------------------------------------------------------- */ - private String action = null; - private String type = "servlet"; - private int real_type = -1; - private HashMap params = new HashMap(); - private String newtopic_name = null; - private String newtopic_value = null; - private String pseud_name = null; - private String pseud_value = null; - private String attach_name = null; - private boolean attach_value = false; - private String text_name = null; - private String text_value = null; - private ArrayList buttons = new ArrayList(); + 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(); /*-------------------------------------------------------------------------------- * Overrides from class BodyTagSupport @@ -62,11 +62,11 @@ public class PostBoxTag extends VeniceConfBodyTagSupport { if (logger.isDebugEnabled()) logger.debug("PostBoxTag.doStartTag(): entry"); - if (action==null) + if (m_action==null) throw new JspTagException(" action= attribute not specified!"); HTMLRendering html = (HTMLRendering)(getRequestInput().queryService(HTMLRendering.class)); - real_type = html.convertLinkType(type); - if (real_type<0) + m_real_type = html.convertLinkType(m_type); + if (m_real_type<0) throw new JspTagException(" type= attribute not a valid link type"); return EVAL_BODY_BUFFERED; @@ -84,13 +84,13 @@ public class PostBoxTag extends VeniceConfBodyTagSupport { if (logger.isDebugEnabled()) logger.debug("PostBoxTag.doEndTag(): entry"); - if (pseud_name==null) + if (m_pseud_name==null) throw new JspTagException(" tag has no tag inside it!"); - if (attach_name==null) + if (m_attach_name==null) throw new JspTagException(" tag has no tag inside it!"); - if (text_name==null) + if (m_text_name==null) throw new JspTagException(" tag has no tag inside it!"); - if (buttons.isEmpty()) + if (m_buttons.isEmpty()) throw new JspTagException(" tag has no tags inside it!"); HTMLRendering html = (HTMLRendering)(getRequestOutput().queryService(HTMLRendering.class)); @@ -98,52 +98,52 @@ public class PostBoxTag extends VeniceConfBodyTagSupport try { // write out what we came here to accomplish JspWriter out = pageContext.getOut(); - out.write("
\n"); - Iterator it = params.entrySet().iterator(); + out.write("
\n"); + Iterator it = m_params.entrySet().iterator(); while (it.hasNext()) { // write the hidden parameters Map.Entry ntry = (Map.Entry)(it.next()); - out.write("\n"); + out.write("\n"); } // end while String my_font = html.getFontTag(html.CONTENT_FOREGROUND,"content"); - out.write("\n"); - if (newtopic_name!=null) + out.write("
\n"); + if (m_newtopic_name!=null) { // write the "new topic name" field - out.write("\n"); + out.write("\n"); } // end if - out.write("\n\n\n\n\n" - + "\n\n\n\n\n\n" + + "\n\n
\n" - + my_font + "New topic name:
\n" - + "\n
\n" + + my_font + "New topic name:
\n" + + "\n
\n" - + my_font + "Your name/header:
\n" - + "\n" + my_font + " Attach a file\n
\n" - + my_font + "Message:\n" + my_font - + "\nHTML Guide\n
\n\n
\n"); + out.write("
\n" + + my_font + "Your name/header:
\n" + + "\n" + my_font + " Attach a file\n
\n" + + my_font + "Message:\n" + my_font + + "\nHTML Guide\n
\n\n
\n"); boolean first = true; - it = buttons.iterator(); + it = m_buttons.iterator(); while (it.hasNext()) { // write out all the buttons String id = (String)(it.next()); @@ -155,7 +155,7 @@ public class PostBoxTag extends VeniceConfBodyTagSupport } // end while - out.write("
\n
\n"); + out.write("\n\n
\n"); } // end try catch (IOException e) @@ -165,16 +165,16 @@ public class PostBoxTag extends VeniceConfBodyTagSupport } // end catch // anything set by subtags must be cleared in doEndTag, not release - params.clear(); - newtopic_name = null; - newtopic_value = null; - pseud_name = null; - pseud_value = null; - attach_name = null; - attach_value = false; - text_name = null; - text_value = null; - buttons.clear(); + m_params.clear(); + m_newtopic_name = null; + m_newtopic_value = null; + m_pseud_name = null; + m_pseud_value = null; + m_attach_name = null; + m_attach_value = false; + m_text_name = null; + m_text_value = null; + m_buttons.clear(); return EVAL_PAGE; } // end doEndTag @@ -184,9 +184,9 @@ public class PostBoxTag extends VeniceConfBodyTagSupport if (logger.isDebugEnabled()) logger.debug("PostBoxTag.release(): entry"); super.release(); - action = null; - type = "servlet"; - real_type = -1; + m_action = null; + m_type = "servlet"; + m_real_type = -1; } // end release @@ -197,13 +197,14 @@ public class PostBoxTag extends VeniceConfBodyTagSupport public void setAction(String v) { - action = v; + m_action = v; } // end setAction public void setType(String v) { - type = v; + m_type = v; + m_real_type = -1; } // end setType @@ -216,18 +217,18 @@ public class PostBoxTag extends VeniceConfBodyTagSupport { if (logger.isDebugEnabled()) logger.debug("PostBoxTag.addParam(\"" + name + "\",\"" + value + "\") entry"); - params.put(name,value); + m_params.put(name,value); } // end addParam final void setNewTopic(String param_name, String value) throws JspException { - if (newtopic_name!=null) + if (m_newtopic_name!=null) throw new JspTagException(" may only appear once inside a !"); if (param_name==null) throw new JspTagException(" parameter name not specified!"); - newtopic_name = param_name; - newtopic_value = value; + m_newtopic_name = param_name; + m_newtopic_value = value; } // end setNewTopic @@ -235,23 +236,23 @@ public class PostBoxTag extends VeniceConfBodyTagSupport { if (logger.isDebugEnabled()) logger.debug("PostBoxTag.setPseud(\"" + param_name + "\",\"" + value + "\") entry"); - if (pseud_name!=null) + if (m_pseud_name!=null) throw new JspTagException(" may only appear once inside a !"); if (param_name==null) throw new JspTagException(" parameter name not specified!"); - pseud_name = param_name; - pseud_value = value; + m_pseud_name = param_name; + m_pseud_value = value; } // end setPseud final void setAttach(String param_name, boolean value) throws JspException { - if (attach_name!=null) + if (m_attach_name!=null) throw new JspTagException(" may only appear once inside a !"); if (param_name==null) throw new JspTagException(" parameter name not specified!"); - attach_name = param_name; - attach_value = value; + m_attach_name = param_name; + m_attach_value = value; } // end setAttach @@ -259,18 +260,18 @@ public class PostBoxTag extends VeniceConfBodyTagSupport { if (logger.isDebugEnabled()) logger.debug("PostBoxTag.setText(\"" + param_name + "\",) entry"); - if (text_name!=null) + if (m_text_name!=null) throw new JspTagException(" may only appear once inside a !"); if (param_name==null) throw new JspTagException(" parameter name not specified!"); - text_name = param_name; - text_value = value; + m_text_name = param_name; + m_text_value = value; } // end setText final void addButton(String id) { - buttons.add(id); + m_buttons.add(id); } // end addButton