Source Code Cross Referenced for LayoutCellHtmlTag.java in  » Web-Framework » aranea-mvc-1.1.1 » org » araneaframework » jsp » tag » layout » 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 » Web Framework » aranea mvc 1.1.1 » org.araneaframework.jsp.tag.layout 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * Copyright 2006 Webmedia Group Ltd.
003:         *
004:         * Licensed under the Apache License, Version 2.0 (the "License");
005:         * you may not use this file except in compliance with the License.
006:         * You may obtain a copy of the License at
007:         *
008:         *  http://www.apache.org/licenses/LICENSE-2.0
009:         *
010:         * Unless required by applicable law or agreed to in writing, software
011:         * distributed under the License is distributed on an "AS IS" BASIS,
012:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013:         * See the License for the specific language governing permissions and
014:         * limitations under the License.
015:         **/package org.araneaframework.jsp.tag.layout;
016:
017:        import java.io.Writer;
018:        import javax.servlet.jsp.JspException;
019:        import org.araneaframework.jsp.util.JspUtil;
020:
021:        /**
022:         * Aranea's cell tag, represents one cell in a layout row.
023:         * In HTML this tag corresponds to column inside table row -- &lt;td&gt; with <code>class</code>, <code>colspan</code> and <code>rowspan</code> attributes.
024:         * 
025:         * @jsp.tag
026:         *   name = "cell"
027:         *   body-content = "JSP"
028:         *   description = "Represents a cell in layout."
029:         *
030:         * @author Taimo Peelo (taimo@araneaframework.org)
031:         */
032:        public class LayoutCellHtmlTag extends BaseLayoutCellTag {
033:            protected String cellTag = "td";
034:            protected String colspan;
035:            protected String rowspan;
036:            protected String width;
037:            protected String height;
038:
039:            protected int doStartTag(Writer out) throws Exception {
040:                super .doStartTag(out);
041:
042:                JspUtil.writeOpenStartTag(out, cellTag);
043:                writeCellAttributes(out);
044:                JspUtil.writeCloseStartTag(out);
045:
046:                return EVAL_BODY_INCLUDE;
047:            }
048:
049:            /** Overwrite if other attributes besides <code>styleclass</code> are needed for HTML table cell. */
050:            protected void writeCellAttributes(Writer out) throws Exception {
051:                addAttribute("id", id);
052:                addAttribute("class", getStyleClass());
053:                addAttribute("style", getStyle());
054:                addAttribute("colspan", colspan);
055:                addAttribute("rowspan", rowspan);
056:                addAttribute("width", width);
057:                addAttribute("height", height);
058:                JspUtil.writeAttributes(out, attributes);
059:            }
060:
061:            protected int doEndTag(Writer out) throws Exception {
062:                JspUtil.writeEndTag(out, cellTag);
063:                return super .doEndTag(out);
064:            }
065:
066:            /* ***********************************************************************************
067:             * Tag attributes
068:             * ***********************************************************************************/
069:            /**
070:             * @jsp.attribute
071:             *   type = "java.lang.String"
072:             *   required = "false"
073:             *   description = "Colspan for this cell. Same as in HTML."
074:             */
075:            public void setColspan(String colspan) throws JspException {
076:                this .colspan = (String) evaluate("colspan", colspan,
077:                        String.class);
078:            }
079:
080:            /**
081:             * @jsp.attribute
082:             *   type = "java.lang.String"
083:             *   required = "false"
084:             *   description = "Rowspan for this cell. Same as in HTML."
085:             */
086:            public void setRowspan(String rowspan) throws JspException {
087:                this .rowspan = (String) evaluate("rowspan", rowspan,
088:                        String.class);
089:            }
090:
091:            /**
092:             * @jsp.attribute
093:             *   type = "java.lang.String"
094:             *   required = "false"
095:             *   description = "Width for this cell. Same as in HTML, deprecated."
096:             */
097:            public void setWidth(String width) throws JspException {
098:                this .width = (String) evaluate("width", width, String.class);
099:            }
100:
101:            /**
102:             * @jsp.attribute
103:             *   type = "java.lang.String"
104:             *   required = "false"
105:             *   description = "Height for this cell. Same as in HTML, deprecated."
106:             */
107:            public void setHeight(String height) throws JspException {
108:                this .height = (String) evaluate("height", height, String.class);
109:            }
110:
111:            /**
112:             * @jsp.attribute
113:             *   type = "java.lang.String"
114:             *   required = "false"
115:             *   description = "Whether this cell is header cell, defaults to false. In HTML, tag is rendered with &lt;th&gt; or &lt;tr&gt;."
116:             */
117:            public void setHeaderCell(String headerCell) throws JspException {
118:                boolean isHeaderCell = ((Boolean) evaluate("headerCell",
119:                        headerCell, Boolean.class)).booleanValue();
120:                this .cellTag = isHeaderCell ? "th" : "td";
121:            }
122:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.