webwork/src/main/webwork/view/taglib/ui TabbedPaneTag.java,1.3,1.4

[email protected] Sun, 09 Nov 2003 14:39:53 -0800
Newsgroups gmane.comp.java.open-symphony.cvs
Message-ID <[email protected]>
Update of /cvsroot/opensymphony/webwork/src/main/webwork/view/taglib/ui
In directory sc8-pr-cvs1:/tmp/cvs-serv12800/src/main/webwork/view/taglib/ui

Modified Files:
	TabbedPaneTag.java 
Log Message:
Fix for WW-283

Index: TabbedPaneTag.java
===================================================================
RCS file: /cvsroot/opensymphony/webwork/src/main/webwork/view/taglib/ui/TabbedPaneTag.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- TabbedPaneTag.java	30 Jun 2002 01:30:58 -0000	1.3
+++ TabbedPaneTag.java	9 Nov 2003 22:39:51 -0000	1.4
@@ -12,6 +12,7 @@
 
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.JspTagException;
+import javax.servlet.jsp.PageContext;
 import java.util.Map;
 import java.util.Vector;
 
@@ -24,8 +25,8 @@
 public class TabbedPaneTag extends ComponentTag
 {
    // Protected --------------------------------------------------------
-   protected TabbedPane tabPane = new TabbedPane(0);
-   protected String contentName = null;
+   protected TabbedPane tabPane;
+   protected String contentName;
 
    protected String strVal(String objName)
    {
@@ -41,11 +42,6 @@
    public TabbedPaneTag()
    {
       super.setTemplate("tabbedpane.jsp");
-
-      this.setSelectedIndex(0);
-
-      if (this.getTabAlign() == null)
-         this.setTabAlign("'CENTER'");
    }
 
    public String getSelectedUrl()
@@ -108,6 +104,16 @@
    {
       tabPane.setTabAlign(strVal(tabAlign));
    }
+
+    // BodyTagSupport overrides --------------------------------------
+    public void setPageContext(PageContext aPageContext)
+    {
+        tabPane = new TabbedPane(0);
+        contentName = null;
+        setSelectedIndex(0);
+        setTabAlign("'CENTER'");
+        super.setPageContext(aPageContext);
+    }
 
    // BodyTag implementation ----------------------------------------
    public int doStartTag() throws JspException




-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/