Java Doc for FlowAction.java in  » Workflow-Engines » spring-webflow-1.0.4 » org » springframework » webflow » executor » struts » 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 » Workflow Engines » spring webflow 1.0.4 » org.springframework.webflow.executor.struts 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.springframework.webflow.executor.struts.FlowAction

FlowAction
public class FlowAction extends ActionSupport (Code)
Point of integration between Struts and Spring Web Flow: a Struts Action that acts a front controller entry point into the web flow system. A single FlowAction may launch any new FlowExecution. In addition, a single Flow Action may signal events in any existing/restored FlowExecutions.

Requests are managed by and delegated to a FlowExecutor , which this class delegates to using a FlowRequestHandler (allowing reuse of common front flow controller logic in other environments). Consult the JavaDoc of those classes for more information on how requests are processed.

  • By default, to have this controller launch a new flow execution (conversation), have the client send a FlowExecutorArgumentHandler.getFlowIdArgumentName request parameter indicating the flow definition to launch.
  • To have this controller participate in an existing flow execution (conversation), have the client send a FlowExecutorArgumentHandler.getFlowExecutionKeyArgumentName request parameter identifying the conversation to participate in.

    On each request received by this action, a StrutsExternalContext object is created as input to the web flow system. This external source event provides access to the action form, action mapping, and other Struts-specific constructs.

    This class also is aware of the SpringBindingActionForm adapter, which adapts Spring's data binding infrastructure (based on POJO binding, a standard Errors interface, and property editor type conversion) to the Struts action form model. This option gives backend web-tier developers full support for POJO-based binding with minimal hassel, while still providing consistency to view developers who already have a lot of experience with Struts for markup and request dispatching.

    Below is an example struts-config.xml configuration for a FlowAction:

     <action path="/userRegistration"
     type="org.springframework.webflow.executor.struts.FlowAction"
     name="springBindingActionForm" scope="request">
     </action>
     
    This example maps the logical request URL /userRegistration.do as a Flow controller (FlowAction). It is expected that flows to launch be provided in a dynamic fashion by the views (allowing this single FlowAction to manage any number of flow executions). A Spring binding action form instance is set in request scope, acting as an adapter enabling POJO-based binding and validation with Spring.

    Other notes regarding Struts/Spring Web Flow integration:

    The benefits here are considerable: developers now have a powerful web flow capability integrated with Struts, with a consistent-approach to POJO-based binding and validation that addresses the proliferation of ActionForm classes found in traditional Struts-based apps.
    See Also:   org.springframework.webflow.executor.FlowExecutor
    See Also:   org.springframework.webflow.executor.support.FlowRequestHandler
    See Also:   org.springframework.web.struts.SpringBindingActionForm
    See Also:   org.springframework.web.struts.DelegatingActionProxy
    author:
       Keith Donald
    author:
       Erwin Vervaet



  • Field Summary
    final protected static  StringFLOW_EXECUTOR_ARGUMENT_HANDLER_BEAN_NAME
         The flow executor argument handler will be retreived from the application context using this bean name if no argument handler is explicitly set.
    final protected static  StringFLOW_EXECUTOR_BEAN_NAME
         The flow executor will be retreived from the application context using this bean name if no executor is explicitly set.


    Method Summary
    protected  ActionForwardcreateRedirectForward(String url, HttpServletResponse response)
         Handles a redirect.
    protected  FlowRequestHandlercreateRequestHandler()
         Factory method that creates a new helper for processing a request into this flow controller.
    public  ActionForwardexecute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
        
    protected  ActionForwardfindForward(ApplicationView forward, ActionMapping mapping)
         Find an action forward for given application view.
    public  FlowExecutorArgumentHandlergetArgumentHandler()
         Returns the flow executor argument handler used by this controller.
    public  FlowExecutorgetFlowExecutor()
         Returns the flow executor used by this controller.
    protected  voidonInit()
        
    public  voidsetArgumentHandler(FlowExecutorArgumentHandler argumentHandler)
         Sets the flow executor argument handler to use.
    public  voidsetFlowExecutor(FlowExecutor flowExecutor)
         Configures the flow executor implementation to use.
    protected  ActionForwardtoActionForward(ResponseInstruction responseInstruction, ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, ExternalContext context)
         Return a Struts ActionForward given a ResponseInstruction.

    Field Detail
    FLOW_EXECUTOR_ARGUMENT_HANDLER_BEAN_NAME
    final protected static String FLOW_EXECUTOR_ARGUMENT_HANDLER_BEAN_NAME(Code)
    The flow executor argument handler will be retreived from the application context using this bean name if no argument handler is explicitly set. ("argumentHandler")



    FLOW_EXECUTOR_BEAN_NAME
    final protected static String FLOW_EXECUTOR_BEAN_NAME(Code)
    The flow executor will be retreived from the application context using this bean name if no executor is explicitly set. ("flowExecutor")





    Method Detail
    createRedirectForward
    protected ActionForward createRedirectForward(String url, HttpServletResponse response) throws Exception(Code)
    Handles a redirect. This implementation simply calls sendRedirect on the response object.
    Parameters:
      url - the url to redirect to
    Parameters:
      response - the http response the redirect forward, this implementation returns null
    throws:
      Exception - an excpetion occured processing the redirect
    See Also:   HttpServletResponse.sendRedirect(java.lang.String)



    createRequestHandler
    protected FlowRequestHandler createRequestHandler()(Code)
    Factory method that creates a new helper for processing a request into this flow controller. the controller helper



    execute
    public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception(Code)



    findForward
    protected ActionForward findForward(ApplicationView forward, ActionMapping mapping)(Code)
    Find an action forward for given application view. If no suitable forward is found in the action mapping using the view name as a key, this method will create a new action forward using the view name.
    Parameters:
      forward - the application view to find a forward for
    Parameters:
      mapping - the action mapping to use the action forward, never null



    getArgumentHandler
    public FlowExecutorArgumentHandler getArgumentHandler()(Code)
    Returns the flow executor argument handler used by this controller. the argument handler



    getFlowExecutor
    public FlowExecutor getFlowExecutor()(Code)
    Returns the flow executor used by this controller. the flow executor



    onInit
    protected void onInit()(Code)



    setArgumentHandler
    public void setArgumentHandler(FlowExecutorArgumentHandler argumentHandler)(Code)
    Sets the flow executor argument handler to use.
    Parameters:
      argumentHandler - the fully configured argument handler



    setFlowExecutor
    public void setFlowExecutor(FlowExecutor flowExecutor)(Code)
    Configures the flow executor implementation to use. Required.
    Parameters:
      flowExecutor - the fully configured flow executor



    toActionForward
    protected ActionForward toActionForward(ResponseInstruction responseInstruction, ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, ExternalContext context) throws Exception(Code)
    Return a Struts ActionForward given a ResponseInstruction. Adds all attributes from the ResponseInstruction as request attributes.



    www.java2java.com | Contact Us
    Copyright 2009 - 12 Demo Source and Support. All rights reserved.
    All other trademarks are property of their respective owners.