You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shale.apache.org by "Jonathan Baker (JIRA)" <ji...@apache.org> on 2006/10/12 19:32:25 UTC

[jira] Created: (SHALE-307) ViewController for navigated-to page is not added to the request map until bean is referenced in RenderResponse phase.

ViewController for navigated-to page is not added to the request map until bean is referenced in RenderResponse phase.
----------------------------------------------------------------------------------------------------------------------

                 Key: SHALE-307
                 URL: http://issues.apache.org/struts/browse/SHALE-307
             Project: Shale
          Issue Type: Bug
          Components: Core
    Affects Versions: 1.0.3
         Environment: linux
tomcat5.5.19
java 1.5.02
            Reporter: Jonathan Baker


I currently have a page with a list of items on it.  For each line, there is a link to select one of the items.  When an item is selected, the action method bound to that link fetches the item from a database and retruns an outcome that has a navigation rule to navigate to a item detail page.  Based on some values in that item, we would like to display a message to the user.   I initally added those methods in the prerender method of the view controller of the item detail page.  It looks though that prerender in the case described above is not being called on the view controller of the detail page because at the time of beforeRenderResponse phase the ViewController for the new page has not been added to the request scope map.

The ViewController doesn't actually get added to the request map until the first reference to it is found when parsing the jsp page components which occurs sometime during the RenderResponse jsf phase.

The prerender plug point is essentially useless.  It will get called anytime I take an action that stays on the current page, but when navigating from one page to another, it will never get called.


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

        

[jira] Commented: (SHALE-307) ViewController for navigated-to page is not added to the request map until bean is referenced in RenderResponse phase.

Posted by "Jonathan Baker (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/SHALE-307?page=comments#action_38501 ] 
            
Jonathan Baker commented on SHALE-307:
--------------------------------------

I attempted this with a build from 10/18 and my problem is still happening.  

In my action method I return "display_item"

I have a navigation rule like this:

    <navigation-rule>
        <navigation-case>
            <from-outcome>display_item</from-outcome>
            <to-view-id>/selectionItem.jsp</to-view-id>
        </navigation-case>
    </navigation-rule>

I have a spring bean defined in my application context file:

<bean id="selectionItem" class="...SelectionItemViewController" scope="request">

(using spring 2.0-final)

When the before render response phase is triggered, my view controller is still not in the request map, so prerender is not called on my view controller.  Later, when the first reference to my view controller is parsed in the jsp page, the view controller is loaded.

> ViewController for navigated-to page is not added to the request map until bean is referenced in RenderResponse phase.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: SHALE-307
>                 URL: http://issues.apache.org/struts/browse/SHALE-307
>             Project: Shale
>          Issue Type: Bug
>          Components: View
>    Affects Versions: 1.0.3
>         Environment: linux
> tomcat5.5.19
> java 1.5.02
>            Reporter: Jonathan Baker
>         Assigned To: Craig McClanahan
>             Fix For: 1.0.4-SNAPSHOT
>
>
> I currently have a page with a list of items on it.  For each line, there is a link to select one of the items.  When an item is selected, the action method bound to that link fetches the item from a database and retruns an outcome that has a navigation rule to navigate to a item detail page.  Based on some values in that item, we would like to display a message to the user.   I initally added those methods in the prerender method of the view controller of the item detail page.  It looks though that prerender in the case described above is not being called on the view controller of the detail page because at the time of beforeRenderResponse phase the ViewController for the new page has not been added to the request scope map.
> The ViewController doesn't actually get added to the request map until the first reference to it is found when parsing the jsp page components which occurs sometime during the RenderResponse jsf phase.
> The prerender plug point is essentially useless.  It will get called anytime I take an action that stays on the current page, but when navigating from one page to another, it will never get called.

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

        

[jira] Assigned: (SHALE-307) ViewController for navigated-to page is not added to the request map until bean is referenced in RenderResponse phase.

Posted by "Craig McClanahan (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/struts/browse/SHALE-307?page=all ]

Craig McClanahan reassigned SHALE-307:
--------------------------------------

    Assignee: Craig McClanahan

> ViewController for navigated-to page is not added to the request map until bean is referenced in RenderResponse phase.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: SHALE-307
>                 URL: http://issues.apache.org/struts/browse/SHALE-307
>             Project: Shale
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.3
>         Environment: linux
> tomcat5.5.19
> java 1.5.02
>            Reporter: Jonathan Baker
>         Assigned To: Craig McClanahan
>
> I currently have a page with a list of items on it.  For each line, there is a link to select one of the items.  When an item is selected, the action method bound to that link fetches the item from a database and retruns an outcome that has a navigation rule to navigate to a item detail page.  Based on some values in that item, we would like to display a message to the user.   I initally added those methods in the prerender method of the view controller of the item detail page.  It looks though that prerender in the case described above is not being called on the view controller of the detail page because at the time of beforeRenderResponse phase the ViewController for the new page has not been added to the request scope map.
> The ViewController doesn't actually get added to the request map until the first reference to it is found when parsing the jsp page components which occurs sometime during the RenderResponse jsf phase.
> The prerender plug point is essentially useless.  It will get called anytime I take an action that stays on the current page, but when navigating from one page to another, it will never get called.

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

        

[jira] Commented: (SHALE-307) ViewController for navigated-to page is not added to the request map until bean is referenced in RenderResponse phase.

Posted by "Jonathan Baker (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/SHALE-307?page=comments#action_38632 ] 
            
Jonathan Baker commented on SHALE-307:
--------------------------------------


   [[ Old comment, sent from unregistered email on Wed, 18 Oct 2006 15:29:18 -0400 ]]

Sure, thank you very much.  I will let you know if it resolves my issue.



JB



> ViewController for navigated-to page is not added to the request map until bean is referenced in RenderResponse phase.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: SHALE-307
>                 URL: http://issues.apache.org/struts/browse/SHALE-307
>             Project: Shale
>          Issue Type: Bug
>          Components: View
>    Affects Versions: 1.0.3
>         Environment: linux
> tomcat5.5.19
> java 1.5.02
>            Reporter: Jonathan Baker
>         Assigned To: Craig McClanahan
>             Fix For: 1.0.4-SNAPSHOT
>
>
> I currently have a page with a list of items on it.  For each line, there is a link to select one of the items.  When an item is selected, the action method bound to that link fetches the item from a database and retruns an outcome that has a navigation rule to navigate to a item detail page.  Based on some values in that item, we would like to display a message to the user.   I initally added those methods in the prerender method of the view controller of the item detail page.  It looks though that prerender in the case described above is not being called on the view controller of the detail page because at the time of beforeRenderResponse phase the ViewController for the new page has not been added to the request scope map.
> The ViewController doesn't actually get added to the request map until the first reference to it is found when parsing the jsp page components which occurs sometime during the RenderResponse jsf phase.
> The prerender plug point is essentially useless.  It will get called anytime I take an action that stays on the current page, but when navigating from one page to another, it will never get called.

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

        

[jira] Commented: (SHALE-307) ViewController for navigated-to page is not added to the request map until bean is referenced in RenderResponse phase.

Posted by "Craig McClanahan (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/SHALE-307?page=comments#action_38430 ] 
            
Craig McClanahan commented on SHALE-307:
----------------------------------------

Jonathan, could you please try your test case against a recent nightly build[1]?  The reason I ask is that this issue has been addressed in the current code (so it'll be fixed in 1.0.4), and I have added some test cases to verify that it does indeed work.  (The reason it now works, by the way, is that Shale's custom ViewHandler ensures the view controller managed bean, if there is one, is instantiated and placed in request scope whenever an old view is restored or a new view is created, so it will be in scope already when prerender is called.)

NOTE -- in the nightly build code, the view controller stuff has been factored out of shale-core-xxxxx.jar, so you'll need to add shale-view-xxxxx.jar to your webapp as well as replacing the othe Shale jars.

[1] http://shale.apache.org/index.html#download


> ViewController for navigated-to page is not added to the request map until bean is referenced in RenderResponse phase.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: SHALE-307
>                 URL: http://issues.apache.org/struts/browse/SHALE-307
>             Project: Shale
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.3
>         Environment: linux
> tomcat5.5.19
> java 1.5.02
>            Reporter: Jonathan Baker
>         Assigned To: Craig McClanahan
>
> I currently have a page with a list of items on it.  For each line, there is a link to select one of the items.  When an item is selected, the action method bound to that link fetches the item from a database and retruns an outcome that has a navigation rule to navigate to a item detail page.  Based on some values in that item, we would like to display a message to the user.   I initally added those methods in the prerender method of the view controller of the item detail page.  It looks though that prerender in the case described above is not being called on the view controller of the detail page because at the time of beforeRenderResponse phase the ViewController for the new page has not been added to the request scope map.
> The ViewController doesn't actually get added to the request map until the first reference to it is found when parsing the jsp page components which occurs sometime during the RenderResponse jsf phase.
> The prerender plug point is essentially useless.  It will get called anytime I take an action that stays on the current page, but when navigating from one page to another, it will never get called.

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

        

[jira] Resolved: (SHALE-307) ViewController for navigated-to page is not added to the request map until bean is referenced in RenderResponse phase.

Posted by "Craig McClanahan (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/struts/browse/SHALE-307?page=all ]

Craig McClanahan resolved SHALE-307.
------------------------------------

    Fix Version/s: 1.0.4-SNAPSHOT
       Resolution: Fixed

As far as I can tell, all issues with ViewController events for navigated-to pages are operating correctly (nightly build 20061020, and will be included in 1.0.4), so I'm marking this issue as fixed.  Please reopen if you still have problems with the current code.


> ViewController for navigated-to page is not added to the request map until bean is referenced in RenderResponse phase.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: SHALE-307
>                 URL: http://issues.apache.org/struts/browse/SHALE-307
>             Project: Shale
>          Issue Type: Bug
>          Components: View
>    Affects Versions: 1.0.3
>         Environment: linux
> tomcat5.5.19
> java 1.5.02
>            Reporter: Jonathan Baker
>         Assigned To: Craig McClanahan
>             Fix For: 1.0.4-SNAPSHOT
>
>
> I currently have a page with a list of items on it.  For each line, there is a link to select one of the items.  When an item is selected, the action method bound to that link fetches the item from a database and retruns an outcome that has a navigation rule to navigate to a item detail page.  Based on some values in that item, we would like to display a message to the user.   I initally added those methods in the prerender method of the view controller of the item detail page.  It looks though that prerender in the case described above is not being called on the view controller of the detail page because at the time of beforeRenderResponse phase the ViewController for the new page has not been added to the request scope map.
> The ViewController doesn't actually get added to the request map until the first reference to it is found when parsing the jsp page components which occurs sometime during the RenderResponse jsf phase.
> The prerender plug point is essentially useless.  It will get called anytime I take an action that stays on the current page, but when navigating from one page to another, it will never get called.

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

        

[jira] Updated: (SHALE-307) ViewController for navigated-to page is not added to the request map until bean is referenced in RenderResponse phase.

Posted by "Craig McClanahan (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/struts/browse/SHALE-307?page=all ]

Craig McClanahan updated SHALE-307:
-----------------------------------

    Component/s: View
                     (was: Core)

> ViewController for navigated-to page is not added to the request map until bean is referenced in RenderResponse phase.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: SHALE-307
>                 URL: http://issues.apache.org/struts/browse/SHALE-307
>             Project: Shale
>          Issue Type: Bug
>          Components: View
>    Affects Versions: 1.0.3
>         Environment: linux
> tomcat5.5.19
> java 1.5.02
>            Reporter: Jonathan Baker
>         Assigned To: Craig McClanahan
>
> I currently have a page with a list of items on it.  For each line, there is a link to select one of the items.  When an item is selected, the action method bound to that link fetches the item from a database and retruns an outcome that has a navigation rule to navigate to a item detail page.  Based on some values in that item, we would like to display a message to the user.   I initally added those methods in the prerender method of the view controller of the item detail page.  It looks though that prerender in the case described above is not being called on the view controller of the detail page because at the time of beforeRenderResponse phase the ViewController for the new page has not been added to the request scope map.
> The ViewController doesn't actually get added to the request map until the first reference to it is found when parsing the jsp page components which occurs sometime during the RenderResponse jsf phase.
> The prerender plug point is essentially useless.  It will get called anytime I take an action that stays on the current page, but when navigating from one page to another, it will never get called.

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