Source Code Cross Referenced for TreeHtmlAttribute.java in  » Library » Apache-beehive-1.0.2-src » org » apache » beehive » netui » tags » tree » 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 » Library » Apache beehive 1.0.2 src » org.apache.beehive.netui.tags.tree 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         * contributor license agreements.  See the NOTICE file distributed with
004:         * this work for additional information regarding copyright ownership.
005:         * The ASF licenses this file to You under the Apache License, Version 2.0
006:         * (the "License"); you may not use this file except in compliance with
007:         * the License.  You may obtain a copy of the License at
008:         *
009:         *     http://www.apache.org/licenses/LICENSE-2.0
010:         *
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         *
017:         * $Header:$
018:         */
019:        package org.apache.beehive.netui.tags.tree;
020:
021:        import org.apache.beehive.netui.tags.AbstractSimpleTag;
022:        import org.apache.beehive.netui.util.logging.Logger;
023:
024:        import javax.servlet.jsp.JspException;
025:
026:        /**
027:         * @jsptagref.tagdescription Set an attribute on the tree.
028:         * @example The following example shows a <netui:tree> tag with both a
029:         * child <netui:treeLabel> and <netui:treeHtmlAttribute> tag that form the
030:         * label for the root folder of the tree. The <netui:treeHtmlAttribute> 
031:         * outputs the attribute <code>name="A1"</code> on the anchor element used for
032:         * the selection link of the tree item.
033:         *
034:         * <pre>    &lt;netui:tree dataSource="pageFlow.myTree" selectionAction="postback" tagId="myTree">
035:         *        &lt;netui:treeItem expanded="true" >
036:         *            &lt;netui:treeLabel>Root Folder&lt;/netui:treeLabel>
037:         &lt;netui:treeHtmlAttribute attribute="name" value="A1" onSelectionLink="true"/>
038:         *        &lt;/netui:treeItem>
039:         *    &lt;/netui:tree></pre>
040:         * @netui:tag name="treeHtmlAttribute" body-content="empty" description="Set an attribute on the tree."
041:         * @see org.apache.beehive.netui.tags.tree.Tree
042:         * @see org.apache.beehive.netui.tags.tree.TreeElement
043:         */
044:        public class TreeHtmlAttribute extends AbstractSimpleTag {
045:            private static final Logger logger = Logger
046:                    .getInstance(TreeHtmlAttribute.class);
047:
048:            TreeHtmlAttributeInfo _info = new TreeHtmlAttributeInfo();
049:
050:            /**
051:             * Return the name of the Tag.
052:             */
053:            public String getTagName() {
054:                return "TreeHtmlAttribute";
055:            }
056:
057:            /**
058:             * Sets the name of the attribute.  This must be in the proper HTML Attribute form.  For example,
059:             * "onmouseclick" or "href".
060:             * @param attr the name of the HTML attribute.
061:             * @jsptagref.attributedescription Sets the name of the attribute.  This must be in the proper HTML Attribute form.  For example,
062:             * "onmouseclick" or "href".
063:             * @jsptagref.databindable false
064:             * @jsptagref.attributesyntaxvalue <i>string</i>
065:             * @netui:attribute required="true"
066:             * description="Sets the name of the attribute."
067:             */
068:            public void setAttribute(String attr) {
069:                _info.setAttribute(attr);
070:            }
071:
072:            /**
073:             * Sets HTML attribute value.
074:             * @param value The value of the HTML Attribute.
075:             * @jsptagref.attributedescription Sets the HTML attribute value.
076:             * @jsptagref.databindable true
077:             * @jsptagref.attributesyntaxvalue <i>string_or_expression</i>
078:             * @netui:attribute required="true"
079:             * description="Sets HTML attribute value."
080:             */
081:            public void setValue(String value) {
082:                _info.setValue(value);
083:            }
084:
085:            /**
086:             * @param onIcon
087:             * @jsptagref.attributedescription Set the attribute value on the icon
088:             * @jsptagref.databindable true
089:             * @jsptagref.attributesyntaxvalue <i>string_or_expression</i>
090:             * @netui:attribute required="false"
091:             * description="Set the attribute value on the icon."
092:             */
093:            public void setOnIcon(boolean onIcon) {
094:                _info.setOnIcon(onIcon);
095:            }
096:
097:            /**
098:             * @param onSelectionLink
099:             * @jsptagref.attributedescription Set the attribute value on the link around the icon.
100:             * @jsptagref.databindable true
101:             * @jsptagref.attributesyntaxvalue <i>string_or_expression</i>
102:             * @netui:attribute required="false"
103:             * description="Set the attribute value on the link around the icon."
104:             */
105:            public void setOnSelectionLink(boolean onSelectionLink) {
106:                _info.setOnSelectionLink(onSelectionLink);
107:            }
108:
109:            /**
110:             * @param onDiv
111:             * @jsptagref.attributedescription Set the attribute value on the item &lt;div>.
112:             * @jsptagref.databindable true
113:             * @jsptagref.attributesyntaxvalue <i>string_or_expression</i>
114:             * @netui:attribute required="false"
115:             * description="Set the attribute value on the item div."
116:             */
117:            public void setOnDiv(boolean onDiv) {
118:                _info.setOnDiv(onDiv);
119:            }
120:
121:            /**
122:             * @param applyToDescendents
123:             * @jsptagref.attributedescription Apply the attribute to descendents of this node.
124:             * @jsptagref.databindable true
125:             * @jsptagref.attributesyntaxvalue <i>boolean</i>
126:             * @netui:attribute required="false"
127:             * description="Apply the attribute value to descendents of this node."
128:             */
129:            public void setApplyToDescendents(boolean applyToDescendents) {
130:                _info.setApplyToDescendents(applyToDescendents);
131:            }
132:
133:            public void doTag() throws JspException {
134:                Object o = getParent();
135:                assert (o != null);
136:
137:                if (o instanceof  TreeItem) {
138:                    TreeItem ti = (TreeItem) o;
139:                    ti.setItemAttribute(_info);
140:                } else {
141:                    logger.error("Found an unexpected parent object'"
142:                            + o.getClass().getName() + "' expected a TreeItem");
143:                }
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.