Source Code Cross Referenced for PreviousPageInfo.java in  » Library » Apache-beehive-1.0.2-src » org » apache » beehive » netui » pageflow » 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.pageflow 
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.pageflow;
020:
021:        import org.apache.struts.action.ActionMapping;
022:        import org.apache.struts.action.ActionForm;
023:        import org.apache.struts.action.ActionForward;
024:        import org.apache.struts.config.ModuleConfig;
025:
026:        import java.io.Serializable;
027:
028:        /**
029:         * Stores information about a previously-displayed page, as well as its initialization data.
030:         * Used with
031:         * <code>navigateTo={@link org.apache.beehive.netui.pageflow.annotations.Jpf.NavigateTo#currentPage Jpf.NavigateTo.currentPage}</code>
032:         * or <code>navigateTo={@link org.apache.beehive.netui.pageflow.annotations.Jpf.NavigateTo#previousPage Jpf.NavigateTo.previousPage}</code>
033:         * on {@link org.apache.beehive.netui.pageflow.annotations.Jpf.Forward Jpf.Forward},
034:         * {@link org.apache.beehive.netui.pageflow.annotations.Jpf.SimpleAction Jpf.SimpleAction}, or
035:         * {@link org.apache.beehive.netui.pageflow.annotations.Jpf.ConditionalForward Jpf.ConditionalForward}.
036:         */
037:        public class PreviousPageInfo extends PreviousInfo implements 
038:                Serializable {
039:            private ActionForward _forward;
040:            private String _mappingPath;
041:            private transient ActionMapping _mapping;
042:            private Object _clientState;
043:
044:            /**
045:             * Constructor which accepts the ActionForward used to display the page, the ActionForm
046:             * used to initialize the page, and the associated ActionMapping, which represents the
047:             * action that forwarded to the page.
048:             * 
049:             * @param forward the ActionForward that contains the path to the page.
050:             * @param form the form that was present for the page when it was rendered initially.
051:             * @param mapping the ActionMapping associated with the action that forwarded to the page, or <code>null</code>
052:             *            if the page was requested directly.
053:             * @param queryString the query string from the request URI.
054:             */
055:            public PreviousPageInfo(ActionForward forward, ActionForm form,
056:                    ActionMapping mapping, String queryString) {
057:                super (form, queryString);
058:                _mapping = mapping;
059:                _mappingPath = mapping != null ? mapping.getPath() : null;
060:                _forward = forward;
061:            }
062:
063:            /**
064:             * Get information about the action that forwarded to the page.
065:             * <br>
066:             * <br>
067:             * Note that this information is transient.  If you place this object in the session, and then retrieve it after
068:             * a session failover has occurred (i.e., after this object has been serialized and deserialized), then this method
069:             * will return <code>null</code> unless you first call {@link #reinitialize}.
070:             *
071:             * @return an ActionMapping that contains information about the action that forwarded to this page, or
072:             *             <code>null</code> if the page was requested directly.
073:             */
074:            public ActionMapping getMapping() {
075:                return _mapping;
076:            }
077:
078:            /**
079:             * Set information about the action that forwarded to the page.
080:             *
081:             * @param mapping an ActionMapping that contains information about the action that forwarded to this page.
082:             */
083:            public void setMapping(ActionMapping mapping) {
084:                _mapping = mapping;
085:            }
086:
087:            /**
088:             * Reinitialize the stored ActionMapping and PageFlowController objects.  These are transient, and will be lost if
089:             * you place this object in the session, and then retrieve it after a session failover has occurred (i.e., after
090:             * this object has been serialized and deserialized).
091:             */
092:            public void reinitialize(PageFlowController pfc) {
093:                if (_mapping == null && _mappingPath != null) {
094:                    ModuleConfig mc = pfc.getModuleConfig();
095:                    assert mc != null : "no ModuleConfig found for "
096:                            + pfc.getClass().getName();
097:                    _mapping = (ActionMapping) mc
098:                            .findActionConfig(_mappingPath);
099:                }
100:
101:                if (_forward != null && _forward instanceof  Forward) {
102:                    ((Forward) _forward).reinitialize(pfc);
103:                }
104:            }
105:
106:            /**
107:             * Get the object that was used to forward to the page.
108:             *
109:             * @return the ActionForward returned by the action that forwarded to this page.
110:             */
111:            public ActionForward getForward() {
112:                return _forward;
113:            }
114:
115:            /**
116:             * Set the object that was used to forward to the page.
117:             *
118:             * @param forward the ActionForward returned by the action that forwarded to this page.
119:             */
120:            public void setForward(ActionForward forward) {
121:                _forward = forward;
122:            }
123:
124:            /**
125:             * Get client state associated with the page (e.g., component tree state for a JSF page).
126:             */
127:            public Object getClientState() {
128:                return _clientState;
129:            }
130:
131:            /**
132:             * Set client state associated with the page (e.g., component tree state for a JSF page).
133:             */
134:            public void setClientState(Object clientState) {
135:                _clientState = clientState;
136:            }
137:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.