Source Code Cross Referenced for ItemFinderCriteriaAction.java in  » J2EE » Jaffa » org » jaffa » applications » test » modules » material » components » itemfinder » 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 » J2EE » Jaffa » org.jaffa.applications.test.modules.material.components.itemfinder.ui 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        // .//GEN-BEGIN:_1_be
002:        package org.jaffa.applications.test.modules.material.components.itemfinder.ui;
003:
004:        import java.util.*;
005:        import org.apache.log4j.Logger;
006:        import org.apache.struts.action.ActionErrors;
007:        import org.jaffa.presentation.portlet.ActionBase;
008:        import org.jaffa.presentation.portlet.FormKey;
009:        import org.jaffa.exceptions.FrameworkException;
010:        import org.jaffa.exceptions.ApplicationExceptions;
011:        import org.jaffa.exceptions.ApplicationException;
012:        import org.jaffa.components.finder.*;
013:        import org.jaffa.applications.test.modules.material.components.itemfinder.dto.ItemFinderInDto;
014:
015:        // .//GEN-END:_1_be
016:        // Add additional imports//GEN-FIRST:_imports
017:
018:        // .//GEN-LAST:_imports
019:        // .//GEN-BEGIN:_2_be
020:        /** The Action class for handling events related to the Criteria screen.
021:         */
022:        public class ItemFinderCriteriaAction extends ActionBase {
023:            private static final Logger log = Logger
024:                    .getLogger(ItemFinderCriteriaAction.class);
025:
026:            // .//GEN-END:_2_be
027:            // .//GEN-BEGIN:_do_Search_Clicked_1_be
028:            /** Creates a criteria object and invokes the displayResults() method on the component.
029:             * @return The FormKey for the Results screen.
030:             */
031:            public FormKey do_Search_Clicked() {
032:                FormKey fk = null;
033:                // .//GEN-END:_do_Search_Clicked_1_be
034:                // Add custom code before processing the action //GEN-FIRST:_do_Search_Clicked_1
035:
036:                // .//GEN-LAST:_do_Search_Clicked_1
037:                // .//GEN-BEGIN:_do_Search_Clicked_2_be
038:                ItemFinderCriteriaForm myForm = (ItemFinderCriteriaForm) form;
039:                ItemFinderComponent myComp = (ItemFinderComponent) myForm
040:                        .getComponent();
041:
042:                if (myForm.doValidate(request)) {
043:                    try {
044:                        // .//GEN-END:_do_Search_Clicked_2_be
045:                        // Add custom code before invoking the component //GEN-FIRST:_do_Search_Clicked_2
046:
047:                        // .//GEN-LAST:_do_Search_Clicked_2
048:                        // .//GEN-BEGIN:_do_Search_Clicked_3_be
049:                        fk = myComp.displayResults();
050:                        if (FinderComponent.EXPORT_TYPE_XML.equals(myComp
051:                                .getExportType())) {
052:                            Object dto = myComp.getItemFinderOutDto();
053:                            if (dto == null)
054:                                dto = "";
055:                            else
056:                                dto = dto.toString();
057:                            request.setAttribute(
058:                                    FinderComponent.ATTRIBUTE_EXPORT_TYPE_XML,
059:                                    dto);
060:                        } else
061:                            request
062:                                    .removeAttribute(FinderComponent.ATTRIBUTE_EXPORT_TYPE_XML);
063:                    } catch (ApplicationExceptions e) {
064:                        log.error(null, e);
065:                        myForm
066:                                .raiseError(request, ActionErrors.GLOBAL_ERROR,
067:                                        e);
068:                    } catch (FrameworkException e) {
069:                        log.error(null, e);
070:                        myForm.raiseError(request, ActionErrors.GLOBAL_ERROR,
071:                                "error.framework.general");
072:                    }
073:                }
074:                // .//GEN-END:_do_Search_Clicked_3_be
075:                // Add custom code after returning from the component //GEN-FIRST:_do_Search_Clicked_3
076:
077:                // .//GEN-LAST:_do_Search_Clicked_3
078:                // .//GEN-BEGIN:_do_Search_Clicked_4_be
079:                // Direct User back to current form
080:                if (fk == null)
081:                    fk = new FormKey(myForm.NAME, myComp.getComponentId());
082:                return fk;
083:            }
084:
085:            // .//GEN-END:_do_Search_Clicked_4_be
086:            // .//GEN-BEGIN:_do_Close_Clicked_1_be
087:            /** Quits the component and returns the FormKey for the calling screen.
088:             * @return The FormKey for the caling screen. A null will be returned, if no calling screen was specified.
089:             */
090:            public FormKey do_Close_Clicked() {
091:                // .//GEN-END:_do_Close_Clicked_1_be
092:                // Add custom code before processing the action //GEN-FIRST:_do_Close_Clicked_1
093:
094:                // .//GEN-LAST:_do_Close_Clicked_1
095:                // .//GEN-BEGIN:_do_Close_Clicked_2_be
096:                return ((ItemFinderCriteriaForm) form).getComponent()
097:                        .quitAndReturnToCallingScreen();
098:            }
099:            // .//GEN-END:_do_Close_Clicked_2_be
100:            // All the custom code goes here //GEN-FIRST:_custom
101:
102:            // .//GEN-LAST:_custom
103:        }
w_w_w___._jav_a__2__s__._co__m___ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.