Source Code Cross Referenced for TextAreaTag.java in  » Portal » gridsphere » org » gridsphere » provider » portletui » 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 » Portal » gridsphere » org.gridsphere.provider.portletui.tags 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * @author <a href="mailto:novotny@gridsphere.org">Jason Novotny</a>
003:         * @version $Id: TextAreaTag.java 6401 2007-12-06 14:49:03Z wehrens $
004:         */package org.gridsphere.provider.portletui.tags;
005:
006:        import org.gridsphere.provider.portletui.beans.TextAreaBean;
007:
008:        import javax.servlet.jsp.JspException;
009:        import javax.servlet.jsp.JspWriter;
010:
011:        /**
012:         * A <code>TextAreaTag</code> represents a text area element
013:         */
014:        public class TextAreaTag extends InputTag {
015:
016:            protected TextAreaBean textAreaBean = null;
017:            protected int cols = 0;
018:            protected int rows = 0;
019:            protected String onFocus = null;
020:
021:            /**
022:             * Returns the number of columns of the text area
023:             *
024:             * @return number of columns
025:             */
026:            public int getCols() {
027:                return cols;
028:            }
029:
030:            /**
031:             * Sets the number of columns of the text area
032:             *
033:             * @param cols number of cols
034:             */
035:            public void setCols(int cols) {
036:                this .cols = cols;
037:            }
038:
039:            /**
040:             * Return the number of rows of the text area
041:             *
042:             * @return number of rows
043:             */
044:            public int getRows() {
045:                return rows;
046:            }
047:
048:            /**
049:             * Sets the number of rows of the text area
050:             *
051:             * @param rows number of rows
052:             */
053:            public void setRows(int rows) {
054:                this .rows = rows;
055:            }
056:
057:            public void setOnfocus(String onFocus) {
058:                this .onFocus = onFocus;
059:            }
060:
061:            public String getOnfocus() {
062:                return onFocus;
063:            }
064:
065:            public int doStartTag() throws JspException {
066:                if (!beanId.equals("")) {
067:                    textAreaBean = (TextAreaBean) getTagBean();
068:                    if (textAreaBean == null) {
069:                        textAreaBean = new TextAreaBean();
070:                        textAreaBean.setRows(rows);
071:                        textAreaBean.setCols(cols);
072:                        this .setBaseComponentBean(textAreaBean);
073:                    } else {
074:                        if ((textAreaBean.getCols() == 0) && (cols != 0)) {
075:                            textAreaBean.setCols(cols);
076:                        }
077:                        if ((textAreaBean.getRows() == 0) && (rows != 0)) {
078:                            textAreaBean.setRows(rows);
079:                        }
080:                        this .updateBaseComponentBean(textAreaBean);
081:                    }
082:                } else {
083:                    textAreaBean = new TextAreaBean();
084:                    textAreaBean.setRows(rows);
085:                    textAreaBean.setCols(cols);
086:                    this .setBaseComponentBean(textAreaBean);
087:                }
088:
089:                if (onFocus != null)
090:                    textAreaBean.setOnFocus(onFocus);
091:                if (onClick != null)
092:                    textAreaBean.setOnClick(onClick);
093:                if (onChange != null)
094:                    textAreaBean.setOnChange(onChange);
095:                if (onBlur != null)
096:                    textAreaBean.setOnBlur(onBlur);
097:                if (onSelect != null)
098:                    textAreaBean.setOnSelect(onBlur);
099:                if (cssClass != null)
100:                    textAreaBean.setCssClass(cssClass);
101:                if (cssStyle != null)
102:                    textAreaBean.setCssStyle(cssStyle);
103:                //debug();
104:
105:                try {
106:                    JspWriter out = pageContext.getOut();
107:                    out.print(textAreaBean.toStartString());
108:                } catch (Exception e) {
109:                    throw new JspException(e.getMessage());
110:                }
111:
112:                return EVAL_BODY_INCLUDE;
113:            }
114:
115:            public int doEndTag() throws JspException {
116:
117:                if ((bodyContent != null) && (value == null)) {
118:                    textAreaBean.setValue(bodyContent.getString());
119:                }
120:
121:                try {
122:                    JspWriter out = pageContext.getOut();
123:                    out.print(textAreaBean.toEndString());
124:                } catch (Exception e) {
125:                    throw new JspException(e.getMessage());
126:                }
127:
128:                super.release();
129:                return EVAL_PAGE;
130:            }
131:
132:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.