Source Code Cross Referenced for UIIssueSystemDropDown.java in  » ERP-CRM-Financial » SourceTap-CRM » com » sourcetap » sfa » ui » 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 » ERP CRM Financial » SourceTap CRM » com.sourcetap.sfa.ui 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * 
003:         * Copyright (c) 2004 SourceTap - www.sourcetap.com
004:         *
005:         *  The contents of this file are subject to the SourceTap Public License 
006:         * ("License"); You may not use this file except in compliance with the 
007:         * License. You may obtain a copy of the License at http://www.sourcetap.com/license.htm
008:         * Software distributed under the License is distributed on an  "AS IS"  basis,
009:         * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
010:         * the specific language governing rights and limitations under the License.
011:         *
012:         * The above copyright notice and this permission notice shall be included
013:         * in all copies or substantial portions of the Software.
014:         *
015:         */
016:
017:        package com.sourcetap.sfa.ui;
018:
019:        import java.util.ArrayList;
020:        import java.util.HashMap;
021:        import java.util.LinkedList;
022:        import java.util.List;
023:        import java.util.Map;
024:        import java.util.Vector;
025:
026:        import org.ofbiz.base.util.Debug;
027:        import org.ofbiz.base.util.UtilMisc;
028:        import org.ofbiz.entity.GenericDelegator;
029:        import org.ofbiz.entity.GenericEntityException;
030:
031:        import com.sourcetap.sfa.util.UserInfo;
032:
033:        /**
034:         * DOCUMENT ME!
035:         *
036:         */
037:        public class UIIssueSystemDropDown extends UIDropDown {
038:            public static final String module = UIIssueSystemDropDown.class
039:                    .getName();
040:
041:            public UIIssueSystemDropDown() {
042:            }
043:
044:            /**
045:             * Return a list of values for a drop down using a UI Display Object defined in the data base.
046:             * This method overrides the parent class.  Note: This
047:             * method is only used when the screen is first drawn.  If the drop down list is updated dynamically, the
048:             * getDropDownValuesDynamic method is used.
049:             *
050:             * @see #getDropDownValuesDynamic(GenericDelegator, Map, UserInfo)
051:             *
052:             * @author John Nutting
053:             *
054:             * @param delegator Reference to the OFBIZ delegator being used to connect to the data base
055:             * @param uiDisplayObject Reference to a display object defined in the data base and attached to the field to be displayed by the UI builder
056:             * @param orderDef List of fields defining the sort order of the drop down values
057:             * @param entityDetailsVector Vector of generic values containing the values to be displayed on the screen for all fields
058:             * @param fieldInfo Reference to field info object containing attributes of the current field
059:             * @param userInfo Reference to user info object containing information about the currently logged-in user
060:             *
061:             * @return List of generic values to be displayed in the drop down.  This will be null if an error occurs.
062:             */
063:            public List getDropDownValues(GenericDelegator delegator,
064:                    UIDisplayObject uiDisplayObject, ArrayList orderDef,
065:                    Vector entityDetailsVector, UIFieldInfo fieldInfo,
066:                    UserInfo userInfo) {
067:
068:                String projectId = UIUtility.getAttributeValue(
069:                        entityDetailsVector, "Code", "codeId");
070:
071:                HashMap map = new HashMap();
072:                map.put("projectId", projectId);
073:
074:                return getDropDownValuesDynamic(delegator, map, userInfo);
075:            }
076:
077:            /**
078:             * Return a list of values based on filter criteria.  This is used by the dynamic filtered drop downs
079:             * which are modified via DHTML.  This method overrides the standard method.<BR><BR>Note: This method
080:             * is only used when the drop down is updated dynamically.
081:             * When the screen is first displayed, the getDropDownValues method is used.
082:             *
083:             * @see #getDropDownValues(GenericDelegator, UIDisplayObject, ArrayList, Vector, UIFieldInfo, UserInfo)
084:             *
085:             * @author John Nutting
086:             *
087:             * @param delegator Reference to the OFBIZ delegator being used to connect to the data base
088:             * @param filterValues Map containing field/value pairs to be used for filtering the drop down list
089:             * @param userInfo Reference to user info object containing information about the currently logged-in user
090:             *
091:             * @return List of generic values to be displayed in the drop down.  This will be null if an error occurs.
092:             */
093:            public List getDropDownValuesDynamic(GenericDelegator delegator,
094:                    Map filterValues, UserInfo userInfo) {
095:
096:                ArrayList orderBy = new ArrayList();
097:                orderBy.add("codeValue");
098:
099:                Map criteria = null;
100:
101:                String projectId = (String) filterValues.get("projectId");
102:
103:                if ((projectId != null)) {
104:                    criteria = UtilMisc.toMap("parentCodeId", projectId,
105:                            "codeTypeId", "SYSTEM", "parentCodeTypeId",
106:                            "PROJECT");
107:                } else {
108:                    criteria = UtilMisc.toMap("codeId", "");
109:                }
110:
111:                try {
112:                    return delegator.findByAnd("Code", criteria, orderBy);
113:                } catch (GenericEntityException e) {
114:                    Debug
115:                            .logError(
116:                                    "[UIIssueSystemDropDown.getDropDownValues] Error retrieving the dropdown values: ",
117:                                    module);
118:                    Debug.logError(e.getLocalizedMessage(), module);
119:
120:                    return new LinkedList();
121:                }
122:            }
123:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.