Source Code Cross Referenced for RawTag.java in  » J2EE » Sofia » com » salmonllc » jsp » tags » 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 » Sofia » com.salmonllc.jsp.tags 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        //** Copyright Statement ***************************************************
002:        //The Salmon Open Framework for Internet Applications (SOFIA)
003:        // Copyright (C) 1999 - 2002, Salmon LLC
004:        //
005:        // This program is free software; you can redistribute it and/or
006:        // modify it under the terms of the GNU General Public License version 2
007:        // as published by the Free Software Foundation;
008:        //
009:        // This program is distributed in the hope that it will be useful,
010:        // but WITHOUT ANY WARRANTY; without even the implied warranty of
011:        // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
012:        // GNU General Public License for more details.
013:        //
014:        // You should have received a copy of the GNU General Public License
015:        // along with this program; if not, write to the Free Software
016:        // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
017:        //
018:        // For more information please visit http://www.salmonllc.com
019:        //** End Copyright Statement ***************************************************
020:        package com.salmonllc.jsp.tags;
021:
022:        /////////////////////////
023:        //$Archive: /SOFIA/SourceCode/com/salmonllc/jsp/tags/RawTag.java $
024:        //$Author: Dan $
025:        //$Revision: 23 $
026:        //$Modtime: 7/16/03 8:07p $
027:        /////////////////////////
028:
029:        import com.salmonllc.html.*;
030:        import com.salmonllc.jsp.*;
031:
032:        import javax.servlet.jsp.JspWriter;
033:        import java.io.IOException;
034:        import java.io.PrintWriter;
035:
036:        /**
037:         * This tag is used to place a piece of Html in a page that can be manipluated by the controller
038:         */
039:
040:        public class RawTag extends ContainerTag {
041:
042:            private String _fileName;
043:            /**
044:             * srufle 04-09-2002
045:             * not being used:
046:             * private String _box;
047:             */
048:            private String _dataSource;
049:
050:            public HtmlComponent createComponent() {
051:                JspRaw raw = new JspRaw(getName(), null, getHelper()
052:                        .getController());
053:                if (getVisible() != null)
054:                    raw.setVisible(new Boolean(getVisible()).booleanValue());
055:                if (_fileName != null)
056:                    raw.setFileName(_fileName);
057:                if (_dataSource != null)
058:                    raw.setDataSource(_dataSource);
059:
060:                return raw;
061:            }
062:
063:            /**
064:             * This method generates the html used by the tag.
065:             */
066:
067:            public void generateComponentHTML(JspWriter p) throws IOException {
068:                JspRaw raw = (JspRaw) getHelper().getController().getComponent(
069:                        getName());
070:                if (raw == null)
071:                    return;
072:
073:                HtmlComponent comp = getHelper().getComponent();
074:                int startRow = -1;
075:
076:                DataTableTag dt = getHelper().getDataTableTag();
077:                if (dt != null) {
078:                    startRow = dt.getStartRow();
079:                } else {
080:                    ListTag l = getHelper().getListTag();
081:                    if (l != null) {
082:                        startRow = l.getRow();
083:                    }
084:                }
085:                if (comp != null) {
086:                    raw.generateHTML(new PrintWriter(p), startRow);
087:                }
088:
089:            }
090:
091:            /**
092:             * Get the Data Source the component should be bound to
093:             */
094:            public String getDatasource() {
095:                return _dataSource;
096:            }
097:
098:            /**
099:             * Returns the file name used attribute
100:             */
101:            public String getFilename() {
102:                return _fileName;
103:            }
104:
105:            /**
106:             * Returns the type of DreamWeaver conversion that this tag uses.
107:             */
108:            public int getTagConvertType() {
109:                return CONV_INVISIBLE;
110:            }
111:
112:            public boolean incrementMode() {
113:                clearBodyContent();
114:                return false;
115:
116:            }
117:
118:            /**
119:             * For tags requiring more than one pass to complete, this method should be implemented. It should initialize the mode to whatever is the starting mode for the component and perform any other initializetion tasks.
120:             */
121:            public void initMode() {
122:                //commented this out because it was causing a problem with tag pooling in Tomcat 4.1
123:                // clearBodyContent();
124:            }
125:
126:            public void release() {
127:                super .release();
128:
129:            }
130:
131:            /**
132:             * Set the Data Source the component should be bound to
133:             */
134:
135:            public void setDatasource(String val) {
136:                _dataSource = val;
137:            }
138:
139:            /**
140:             * Sets the file name attribute
141:             */
142:
143:            public void setFilename(String val) {
144:                _fileName = val;
145:            }
146:
147:            /**
148:             * This method can be used by components that need to change a component after all the sub tags have been initialized.
149:             */
150:            public void afterInit(HtmlComponent comp) {
151:                super .afterInit(comp);
152:                String html = getBodyContentData(true);
153:                ((JspRaw) comp).setHtml(html);
154:            }
155:
156:            /**
157:             *  @return true so the body content always gets written
158:             */
159:            public boolean alwaysWriteContent() {
160:                return true;
161:            }
162:
163:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.