You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beehive.apache.org by "Carlin Rogers (JIRA)" <de...@beehive.apache.org> on 2005/11/11 06:59:03 UTC

[jira] Created: (BEEHIVE-1003) Calling FlowControllerFactory.createPageFlow() outside of page flow request processor and page filter does not initialize controls correctly

Calling FlowControllerFactory.createPageFlow() outside of page flow request processor and page filter does not initialize controls correctly
--------------------------------------------------------------------------------------------------------------------------------------------

         Key: BEEHIVE-1003
         URL: http://issues.apache.org/jira/browse/BEEHIVE-1003
     Project: Beehive
        Type: Bug
  Components: NetUI  
    Versions: V1    
    Reporter: Carlin Rogers
 Assigned to: Carlin Rogers 
     Fix For: 1.1


Calling the FlowControllerFactory method createPageFlow() outside of the page flow request processor and page filter does not initialize controls correctly. The page flow request processor and/or the page filter call JavaControlUtils.initializeControlContext() to create a ControlBeanContext. However, the direct call to createPageFlow() method, eventualy drills down to JavaControlUtils.initJavaControls(), but the ControlBeanContext is null and with asserts on, this method fails. With asserts off, the method continues but the control in the page flow will not have been initialized.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (BEEHIVE-1003) Calling FlowControllerFactory.createPageFlow() outside of page flow request processor and page filter does not initialize controls correctly

Posted by "Rich Feit (JIRA)" <de...@beehive.apache.org>.
    [ http://issues.apache.org/jira/browse/BEEHIVE-1003?page=comments#action_12357663 ] 

Rich Feit commented on BEEHIVE-1003:
------------------------------------

I just commented on this in the dev@beehive thread.  I'm suggesting we replace the reflection-based method invocation with a call to PageFlowUtils.strutsLookup().  Will that work to fix this particular issue?

> Calling FlowControllerFactory.createPageFlow() outside of page flow request processor and page filter does not initialize controls correctly
> --------------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: BEEHIVE-1003
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-1003
>      Project: Beehive
>         Type: Bug
>   Components: NetUI
>     Versions: V1
>     Reporter: Carlin Rogers
>     Assignee: Carlin Rogers
>      Fix For: 1.1
>  Attachments: pfControlLifecycle.jar
>
> Calling the FlowControllerFactory method createPageFlow() outside of the page flow request processor and page filter does not initialize controls correctly. The page flow request processor and/or the page filter call JavaControlUtils.initializeControlContext() to create a ControlBeanContext. However, the direct call to createPageFlow() method, eventualy drills down to JavaControlUtils.initJavaControls(), but the ControlBeanContext is null and with asserts on, this method fails. With asserts off, the method continues but the control in the page flow will not have been initialized.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (BEEHIVE-1003) Calling FlowControllerFactory.createPageFlow() outside of page flow request processor and page filter does not initialize controls correctly

Posted by "Eddie O'Neil (JIRA)" <de...@beehive.apache.org>.
     [ http://issues.apache.org/jira/browse/BEEHIVE-1003?page=all ]

Eddie O'Neil updated BEEHIVE-1003:
----------------------------------

    Attachment: pfControlLifecycle.jar

Repro control.

> Calling FlowControllerFactory.createPageFlow() outside of page flow request processor and page filter does not initialize controls correctly
> --------------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: BEEHIVE-1003
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-1003
>      Project: Beehive
>         Type: Bug
>   Components: NetUI
>     Versions: V1
>     Reporter: Carlin Rogers
>     Assignee: Carlin Rogers
>      Fix For: 1.1
>  Attachments: pfControlLifecycle.jar
>
> Calling the FlowControllerFactory method createPageFlow() outside of the page flow request processor and page filter does not initialize controls correctly. The page flow request processor and/or the page filter call JavaControlUtils.initializeControlContext() to create a ControlBeanContext. However, the direct call to createPageFlow() method, eventualy drills down to JavaControlUtils.initJavaControls(), but the ControlBeanContext is null and with asserts on, this method fails. With asserts off, the method continues but the control in the page flow will not have been initialized.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (BEEHIVE-1003) Calling FlowControllerFactory.createPageFlow() outside of page flow request processor and page filter does not initialize controls correctly

Posted by "Carlin Rogers (JIRA)" <de...@beehive.apache.org>.
     [ http://issues.apache.org/jira/browse/BEEHIVE-1003?page=all ]
     
Carlin Rogers resolved BEEHIVE-1003:
------------------------------------

    Resolution: Fixed
     Assign To: Alejandro Ramirez  (was: Carlin Rogers)

Fixed with revision 332482.

I modified JavaControlUtils.initJavaControls() such that if the call to getControlBeanContext() returns null we call initializeControlContext() and try to get the control bean context again. In this ase we will also call uninitializeControlContext().

This revision includes a servlet that calls FlowControllerFactory method, createPageFlow(), then checks to see that the control was initialized. There is a new TestRecorder file as well.

To reproduce the error condition, build and run the test files in a workspace that does not have the changes to JavaControlUtils.

> Calling FlowControllerFactory.createPageFlow() outside of page flow request processor and page filter does not initialize controls correctly
> --------------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: BEEHIVE-1003
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-1003
>      Project: Beehive
>         Type: Bug
>   Components: NetUI
>     Versions: V1
>     Reporter: Carlin Rogers
>     Assignee: Alejandro Ramirez
>      Fix For: 1.1

>
> Calling the FlowControllerFactory method createPageFlow() outside of the page flow request processor and page filter does not initialize controls correctly. The page flow request processor and/or the page filter call JavaControlUtils.initializeControlContext() to create a ControlBeanContext. However, the direct call to createPageFlow() method, eventualy drills down to JavaControlUtils.initJavaControls(), but the ControlBeanContext is null and with asserts on, this method fails. With asserts off, the method continues but the control in the page flow will not have been initialized.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Reopened: (BEEHIVE-1003) Calling FlowControllerFactory.createPageFlow() outside of page flow request processor and page filter does not initialize controls correctly

Posted by "Eddie O'Neil (JIRA)" <de...@beehive.apache.org>.
     [ http://issues.apache.org/jira/browse/BEEHIVE-1003?page=all ]
     
Eddie O'Neil reopened BEEHIVE-1003:
-----------------------------------

     Assign To: Carlin Rogers  (was: Alejandro Ramirez)

Reopening this...the problem is that with this initialization process, the ControlContainerContext only exists during between the initialize and uninitialize calls.  This leads to trouble when a control implementation depends on the CCC to be available at runtime.  

The basic issue is that the control lifecycle usually works like this:

- initialize
- unit of work (request, method invocation, page rendering)
- uninitialize

but the JavaControlUtils fix does this:

- initialize
- uninitialize 
- unit of work (reflective call)

I've got a control implementation that will demonstrate this problem; should be possible to basically swap-out the PortfolioControl used in the test to demonstrate this problem.

I'll record a test that ensures that normal JPFs "do the right thing" here and will leave the fix and test for the FlowControllerFactory to Carlin.

> Calling FlowControllerFactory.createPageFlow() outside of page flow request processor and page filter does not initialize controls correctly
> --------------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: BEEHIVE-1003
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-1003
>      Project: Beehive
>         Type: Bug
>   Components: NetUI
>     Versions: V1
>     Reporter: Carlin Rogers
>     Assignee: Carlin Rogers
>      Fix For: 1.1

>
> Calling the FlowControllerFactory method createPageFlow() outside of the page flow request processor and page filter does not initialize controls correctly. The page flow request processor and/or the page filter call JavaControlUtils.initializeControlContext() to create a ControlBeanContext. However, the direct call to createPageFlow() method, eventualy drills down to JavaControlUtils.initJavaControls(), but the ControlBeanContext is null and with asserts on, this method fails. With asserts off, the method continues but the control in the page flow will not have been initialized.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (BEEHIVE-1003) Calling FlowControllerFactory.createPageFlow() outside of page flow request processor and page filter does not initialize controls correctly

Posted by "Alejandro Ramirez (JIRA)" <de...@beehive.apache.org>.
     [ http://issues.apache.org/jira/browse/BEEHIVE-1003?page=all ]

Alejandro Ramirez reassigned BEEHIVE-1003:
------------------------------------------

    Assign To: Julie Zhuo  (was: Alejandro Ramirez)

please verify

> Calling FlowControllerFactory.createPageFlow() outside of page flow request processor and page filter does not initialize controls correctly
> --------------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: BEEHIVE-1003
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-1003
>      Project: Beehive
>         Type: Bug
>   Components: NetUI
>     Versions: V1
>     Reporter: Carlin Rogers
>     Assignee: Julie Zhuo
>      Fix For: 1.1
>  Attachments: pfControlLifecycle.jar
>
> Calling the FlowControllerFactory method createPageFlow() outside of the page flow request processor and page filter does not initialize controls correctly. The page flow request processor and/or the page filter call JavaControlUtils.initializeControlContext() to create a ControlBeanContext. However, the direct call to createPageFlow() method, eventualy drills down to JavaControlUtils.initJavaControls(), but the ControlBeanContext is null and with asserts on, this method fails. With asserts off, the method continues but the control in the page flow will not have been initialized.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (BEEHIVE-1003) Calling FlowControllerFactory.createPageFlow() outside of page flow request processor and page filter does not initialize controls correctly

Posted by "Carlin Rogers (JIRA)" <de...@beehive.apache.org>.
     [ http://issues.apache.org/jira/browse/BEEHIVE-1003?page=all ]
     
Carlin Rogers resolved BEEHIVE-1003:
------------------------------------

    Resolution: Fixed
     Assign To: Alejandro Ramirez  (was: Carlin Rogers)

Fixed with revision 345162.

The fix in this revision just adds Javadoc to both the FlowControllerFactory and the JavaControlUtils classes that before creating a FlowController via the factory, the caller should first initialize the ControlContainerContext, then after once the FlowController has gone through its life cylce, the caller should uninitialize the ControlContainerContext.
See the dev list discussion, http://www.mail-archive.com/dev@beehive.apache.org/msg01359.html.

The test has been updated to do the CCC initialize/uninitialize around the calls to create the FlowController as well as execute the begin action.

Note that the control used in this test includes the same implementation as Eddie's control to depends on the CCC to be available at runtime.

To run the test manually and see the failures when the initialization is not done around the FCF, just hit the servlet... /createPageFlow/. note that the control has logging in it so you log4j.xml can be tuned accordingly for more detail.

To run the test successfully, use the query, initializeControlContext=true...
(e.g. /coreWeb/createPageFlow/?initializeControlContext=true)

> Calling FlowControllerFactory.createPageFlow() outside of page flow request processor and page filter does not initialize controls correctly
> --------------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: BEEHIVE-1003
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-1003
>      Project: Beehive
>         Type: Bug
>   Components: NetUI
>     Versions: V1
>     Reporter: Carlin Rogers
>     Assignee: Alejandro Ramirez
>      Fix For: 1.1
>  Attachments: pfControlLifecycle.jar
>
> Calling the FlowControllerFactory method createPageFlow() outside of the page flow request processor and page filter does not initialize controls correctly. The page flow request processor and/or the page filter call JavaControlUtils.initializeControlContext() to create a ControlBeanContext. However, the direct call to createPageFlow() method, eventualy drills down to JavaControlUtils.initJavaControls(), but the ControlBeanContext is null and with asserts on, this method fails. With asserts off, the method continues but the control in the page flow will not have been initialized.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (BEEHIVE-1003) Calling FlowControllerFactory.createPageFlow() outside of page flow request processor and page filter does not initialize controls correctly

Posted by "Julie Zhuo (JIRA)" <de...@beehive.apache.org>.
     [ http://issues.apache.org/jira/browse/BEEHIVE-1003?page=all ]
     
Julie Zhuo closed BEEHIVE-1003:
-------------------------------


Verified with rev372375.

With the revision  http://svn.apache.org/viewcvs?rev=371706&view=rev,  the CCC initialization and uninitialization are all handled in the FlowControllerFactory. So, it is no longer needed for the caller to do any of those. The createPageFlow tests are now producing the same results whether or not the param is passed in the url which is the correct behavior. Although the FlowControllerFactory java doc have not been changed back yet. Will open a separate Jira bug to track on this java doc issue so that we can close this one here.

> Calling FlowControllerFactory.createPageFlow() outside of page flow request processor and page filter does not initialize controls correctly
> --------------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: BEEHIVE-1003
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-1003
>      Project: Beehive
>         Type: Bug
>   Components: NetUI
>     Versions: V1
>     Reporter: Carlin Rogers
>     Assignee: Julie Zhuo
>      Fix For: 1.0.1
>  Attachments: pfControlLifecycle.jar
>
> Calling the FlowControllerFactory method createPageFlow() outside of the page flow request processor and page filter does not initialize controls correctly. The page flow request processor and/or the page filter call JavaControlUtils.initializeControlContext() to create a ControlBeanContext. However, the direct call to createPageFlow() method, eventualy drills down to JavaControlUtils.initJavaControls(), but the ControlBeanContext is null and with asserts on, this method fails. With asserts off, the method continues but the control in the page flow will not have been initialized.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira