Source Code Cross Referenced for TKFormTypeSelectorField.java in  » Content-Management-System » webman » com » teamkonzept » webman » field » 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 » Content Management System » webman » com.teamkonzept.webman.field 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package com.teamkonzept.webman.field;
002:
003:        import com.teamkonzept.webman.mainint.*;
004:        import com.teamkonzept.webman.mainint.db.queries.TKDBContentTreeGetType;
005:        import com.teamkonzept.webman.mainint.db.queries.*;
006:        import de.webman.content.eventhandler.CEUtils;
007:
008:        import com.teamkonzept.lib.*;
009:        import com.teamkonzept.publishing.markups.*;
010:        import com.teamkonzept.web.*;
011:        import com.teamkonzept.field.db.*;
012:        import com.teamkonzept.field.db.queries.*;
013:        import com.teamkonzept.db.*;
014:        import com.teamkonzept.field.*;
015:        import com.teamkonzept.international.LanguageManager;
016:        import de.webman.generator.*;
017:        import java.sql.*;
018:        import java.util.*;
019:        import org.apache.log4j.Category;
020:
021:        /**
022:         * The form type selector field control.
023:         *
024:         * @author $Author: uli $
025:         * @version $Revision: 1.11 $
026:         */
027:        public class TKFormTypeSelectorField extends TKSelectField {
028:            /**
029:             * The class identifier.
030:             */
031:            public static final String CLASS_ID = "FORMLIST";
032:
033:            /**
034:             * The logging category.
035:             */
036:            private static Category cat = Category
037:                    .getInstance(TKFormTypeSelectorField.class);
038:
039:            /**
040:             * The <CODE>structure</CODE> form type constant.
041:             */
042:            public static final Integer STRUCTURE_FORM_TYPE = new Integer(1);
043:
044:            /**
045:             * The <CODE>fragment</CODE> form type constant.
046:             */
047:            public static final Integer FRAGMENT_FORM_TYPE = new Integer(2);
048:
049:            /**
050:             * The <CODE>content</CODE> form type constant.
051:             */
052:            public static final Integer CONTENT_FORM_TYPE = new Integer(3);
053:
054:            /**
055:             * The selected form type.
056:             */
057:            protected Integer formType = null;
058:
059:            /**
060:             * Creates an empty form type selector field control.
061:             */
062:            public TKFormTypeSelectorField() {
063:                super ();
064:            }
065:
066:            public TKFormTypeSelectorField(String name, String showName,
067:                    Integer fType) {
068:                initSelectorField(CLASS_ID, name, showName, fType);
069:            }
070:
071:            public void initSelectorField(String type, String name,
072:                    String showName, Integer fType) {
073:                initSelectField(type, name, showName, new TKVector(), 1, false);
074:                formType = fType;
075:            }
076:
077:            public void fillIntoTemplate(TKHTMLTemplate t, Object value,
078:                    String prefix) {
079:                TKVector tmpOptionList = optionList;
080:                try {
081:                    // Achtung hier noch den Formtype !!!!
082:                    TKQuery q = TKDBManager.newQuery(TKDBFormGetAll69.class);
083:                    // q.setQueryParams( "FORM_TYPE", fNodeType );
084:                    q.execute();
085:                    ResultSet res = q.fetchResultSet();
086:                    TKVector newOptionList = new TKVector();
087:                    newOptionList.addElement(new TKOptionFieldEntry(
088:                            LanguageManager.getText("form",
089:                                    "OPTIONLIST_POSSIBILITIES"), "0"));
090:                    while (res.next()) {
091:                        String name = res.getString("FORM_NAME");
092:                        newOptionList.addElement(new TKOptionFieldEntry(name,
093:                                String.valueOf(res.getInt("FORM_ID"))));
094:                    }
095:                    res.close();
096:                    optionList = newOptionList;
097:                } catch (SQLException e) {
098:                    cat.error("fillIntoTemplate", e);
099:                    return;
100:                }
101:                super .fillIntoTemplate(t, value, prefix);
102:                optionList = tmpOptionList;
103:            }
104:
105:            /**
106:             * Checks wether this object and the specified object
107:             * may be treated as equal.
108:             *
109:             * @param object the object to checked for equality.
110:             * @return <CODE>true</CODE> if this object and the
111:             * specified object may be treated as equal, otherwise
112:             * <CODE>false</CODE>.
113:             */
114:            public boolean equals(Object object) {
115:                if (!super .equals(object)) {
116:                    return false;
117:                }
118:
119:                TKFormTypeSelectorField field = (TKFormTypeSelectorField) object;
120:
121:                return (this .formType == null ? field.formType == null
122:                        : this .formType.equals(field.formType));
123:            }
124:
125:            /**
126:             * Returns the hash code for this object.
127:             *
128:             * @return the hash code for this object.
129:             */
130:            public int hashCode() {
131:                // Implementation for JTest only ;-(
132:                return super.hashCode();
133:            }
134:
135:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.