Source Code Cross Referenced for TabbedPanel.java in  » J2EE » webwork-2.2.6 » com » opensymphony » webwork » components » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » webwork 2.2.6 » com.opensymphony.webwork.components 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package com.opensymphony.webwork.components;
002:
003:        import com.opensymphony.xwork.util.OgnlValueStack;
004:
005:        import javax.servlet.http.HttpServletRequest;
006:        import javax.servlet.http.HttpServletResponse;
007:        import java.util.ArrayList;
008:        import java.util.List;
009:
010:        /**
011:         * <!-- START SNIPPET: javadoc -->
012:         * The tabbedpanel widget is primarily an AJAX component, where each tab can either be local content or remote
013:         * content (refreshed each time the user selects that tab).</p>
014:         * <!-- END SNIPPET: javadoc -->
015:         *
016:         * <p/> <b>Examples</b>
017:         * <p/>
018:         * <!-- START SNIPPET: exdesc -->
019:         * The following is an example of a tabbedpanel and panel tag utilizing local and remote content.<p/>
020:         * <!-- END SNIPPET: exdesc -->
021:         * <pre>
022:         * <!-- START SNIPPET: example -->
023:         * &lt;ww:tabbedPanel id="test2" theme="simple" &gt;
024:         *     &lt;ww:panel id="left" tabName="left" theme="ajax"&gt;
025:         *         This is the left pane&lt;br/&gt;
026:         *         &lt;ww:form &gt;
027:         *             &lt;ww:textfield name="tt" label="Test Text" /&gt;  &lt;br/&gt;
028:         *             &lt;ww:textfield name="tt2" label="Test Text2" /&gt;
029:         *         &lt;/ww:form&gt;
030:         *     &lt;/ww:panel&gt;
031:         *     &lt;ww:panel remote="true" href="/AjaxTest.action" id="ryh1" theme="ajax" tabName="remote one" /&gt;
032:         *     &lt;ww:panel id="middle" tabName="middle" theme="ajax"&gt;
033:         *         middle tab&lt;br/&gt;
034:         *         &lt;ww:form &gt;
035:         *             &lt;ww:textfield name="tt" label="Test Text44" /&gt;  &lt;br/&gt;
036:         *             &lt;ww:textfield name="tt2" label="Test Text442" /&gt;
037:         *         &lt;/ww:form&gt;
038:         *     &lt;/ww:panel&gt;
039:         *     &lt;ww:panel remote="true" href="/AjaxTest.action"  id="ryh21" theme="ajax" tabName="remote right" /&gt;
040:         * &lt;/ww:tabbedPanel&gt;
041:         * <!-- END SNIPPET: example -->
042:         * </pre>
043:         *
044:         * <p/> <b>Additional Configuration</b>
045:         *
046:         * <!-- START SNIPPET: exdesc2 -->
047:         * If you are looking for the "nifty" rounded corner look, there is additional configuration. This assumes
048:         * that the background color of the tabs is white. If you are using a different color, please modify the
049:         * parameter in the Rounded() method.<p/>
050:         * <!-- END SNIPPET: exdesc2 -->
051:         *
052:         * <pre>
053:         * <!-- START SNIPPET: example2 -->
054:         * &lt;link rel="stylesheet" type="text/css" href="&lt;ww:url value="/webwork/tabs.css"/&gt;"&gt;
055:         * &lt;link rel="stylesheet" type="text/css" href="&lt;ww:url value="/webwork/niftycorners/niftyCorners.css"/&gt;"&gt;
056:         * &lt;link rel="stylesheet" type="text/css" href="&lt;ww:url value="/webwork/niftycorners/niftyPrint.css"/&gt;" media="print"&gt;
057:         * &lt;script type="text/javascript" src="&lt;ww:url value="/webwork/niftycorners/nifty.js"/&gt;"&gt;&lt;/script&gt;
058:         * &lt;script type="text/javascript"&gt;
059:         *     dojo.event.connect(window, "onload", function() {
060:         *         if (!NiftyCheck())
061:         *             return;
062:         *         Rounded("li.tab_selected", "top", "white", "transparent", "border #ffffffS");
063:         *         Rounded("li.tab_unselected", "top", "white", "transparent", "border #ffffffS");
064:         *         // "white" needs to be replaced with the background color
065:         *     });
066:         * &lt;/script&gt;
067:         * <!-- END SNIPPET: example2 -->
068:         * </pre>
069:         *
070:         * <b>Important:</b> Be sure to setup the page containing this tag to be Configured for AJAX
071:         *
072:         * @author Ian Roughley
073:         * @author Rene Gielen
074:         * @version $Revision: 2468 $
075:         * @since 2.2
076:         *
077:         * @see Panel
078:         *
079:         * @ww.tag name="tabbedPanel" tld-body-content="JSP" tld-tag-class="com.opensymphony.webwork.views.jsp.ui.TabbedPanelTag"
080:         * description="Render a tabbedPanel widget."
081:         */
082:        public class TabbedPanel extends ClosingUIBean {
083:            public static final String TEMPLATE = "tabbedpanel";
084:            public static final String TEMPLATE_CLOSE = "tabbedpanel-close";
085:            final private static String COMPONENT_NAME = TabbedPanel.class
086:                    .getName();
087:
088:            protected List tabs = new ArrayList();
089:
090:            public TabbedPanel(OgnlValueStack stack,
091:                    HttpServletRequest request, HttpServletResponse response) {
092:                super (stack, request, response);
093:            }
094:
095:            /**
096:             * Add a new panel to be rendered.
097:             *
098:             * @param pane a new panel to be rendered
099:             */
100:            public void addTab(Panel pane) {
101:                tabs.add(pane);
102:            }
103:
104:            /**
105:             * Get the list of panel tabs for this tab panel.
106:             *
107:             * @return the list of panel tabs for this tab panel
108:             */
109:            public List getTabs() {
110:                return tabs;
111:            }
112:
113:            public String getTopicName() {
114:                return "topic_tab_" + id + "_selected";
115:            }
116:
117:            protected void evaluateExtraParams() {
118:                super .evaluateExtraParams();
119:
120:                addParameter("topicName", "topic_tab_" + id + "_selected");
121:                addParameter("tabs", tabs);
122:
123:            }
124:
125:            public String getDefaultOpenTemplate() {
126:                return TEMPLATE;
127:            }
128:
129:            protected String getDefaultTemplate() {
130:                return TEMPLATE_CLOSE;
131:            }
132:
133:            public String getComponentName() {
134:                return COMPONENT_NAME;
135:            }
136:
137:            /**
138:             * The id to assign to the component.
139:             * @ww.tagattribute required="true" type="String"
140:             */
141:            public void setId(String id) {
142:                // This is required to override tld generation attributes to required=true
143:                super.setId(id);
144:            }
145:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.