Issue Details (XML | Word | Printable)

Key: SHALE-307
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Craig McClanahan
Reporter: Jonathan Baker
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Shale

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

Created: 12/Oct/06 05:31 PM   Updated: 23/Jan/07 04:40 PM
Component/s: View
Affects Version/s: 1.0.3
Fix Version/s: 1.0.4

Environment:
linux
tomcat5.5.19
java 1.5.02


 Description  « Hide
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.


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #465311 Wed Oct 18 17:40:30 UTC 2006 craigmcc Add an integration test case to investigate SHALE-307, which reports
that prerender() is not getting called on the second page when
navigating from one view controller to another. At the moment, the test
case passes (indicating prerender() was indeed called as expected), so
further investigation is necessary to see where a failure case might
still exist.

SHALE-307
Files Changed
MODIFY /shale/framework/trunk/shale-apps/shale-test-view/src/test/java/org/apache/shale/examples/test/core/systest/IntegrationTestCase.java
MODIFY /shale/framework/trunk/shale-apps/shale-test-view/src/main/webapp/menu.jsp
ADD /shale/framework/trunk/shale-apps/shale-test-view/src/main/java/org/apache/shale/examples/test/view/Recorder.java
MODIFY /shale/framework/trunk/shale-apps/shale-test-view/src/main/webapp/WEB-INF/faces-config.xml
ADD /shale/framework/trunk/shale-apps/shale-test-view/src/main/java/org/apache/shale/examples/test/view/Lifecycle2.java
ADD /shale/framework/trunk/shale-apps/shale-test-view/src/main/java/org/apache/shale/examples/test/view/Lifecycle1.java
ADD /shale/framework/trunk/shale-apps/shale-test-view/src/main/webapp/lifecycle1.jsp
ADD /shale/framework/trunk/shale-apps/shale-test-view/src/main/webapp/lifecycle2.jsp

Repository Revision Date User Message
ASF #465318 Wed Oct 18 17:58:58 UTC 2006 craigmcc Add a test case for lifecycle navigation events similar to the one just added
to shale-test-view, but this time using annotated view controllers to test
the corresponding Tiger functionality.

SHALE-307
Files Changed
ADD /shale/framework/trunk/shale-apps/shale-test-tiger/src/main/java/org/apache/shale/examples/test/tiger/Recorder.java (from /shale/framework/trunk/shale-apps/shale-test-view/src/main/java/org/apache/shale/examples/test/view/Recorder.java)
MODIFY /shale/framework/trunk/shale-apps/shale-test-tiger/src/main/webapp/menu.jsp
MODIFY /shale/framework/trunk/shale-apps/shale-test-tiger/src/test/java/org/apache/shale/examples/test/tiger/systest/IntegrationTestCase.java
MODIFY /shale/framework/trunk/shale-apps/shale-test-tiger/src/main/webapp/WEB-INF/faces-config.xml
ADD /shale/framework/trunk/shale-apps/shale-test-tiger/src/main/java/org/apache/shale/examples/test/tiger/Lifecycle2.java (from /shale/framework/trunk/shale-apps/shale-test-view/src/main/java/org/apache/shale/examples/test/view/Lifecycle2.java)
ADD /shale/framework/trunk/shale-apps/shale-test-tiger/src/main/java/org/apache/shale/examples/test/tiger/Lifecycle1.java (from /shale/framework/trunk/shale-apps/shale-test-view/src/main/java/org/apache/shale/examples/test/view/Lifecycle1.java)
ADD /shale/framework/trunk/shale-apps/shale-test-tiger/src/main/webapp/lifecycle1.jsp (from /shale/framework/trunk/shale-apps/shale-test-view/src/main/webapp/lifecycle1.jsp)
ADD /shale/framework/trunk/shale-apps/shale-test-tiger/src/main/webapp/lifecycle2.jsp (from /shale/framework/trunk/shale-apps/shale-test-view/src/main/webapp/lifecycle2.jsp)

Repository Revision Date User Message
ASF #465959 Fri Oct 20 03:08:03 UTC 2006 craigmcc Correct the package name for the integration tests, and add a bit more
debugging output so that destroy events can be manually verified.

SHALE-307
Files Changed
DEL /shale/framework/trunk/shale-apps/shale-test-view/src/test/java/org/apache/shale/examples/test/core
ADD /shale/framework/trunk/shale-apps/shale-test-view/src/test/java/org/apache/shale/examples/test/view (from /shale/framework/trunk/shale-apps/shale-test-view/src/test/java/org/apache/shale/examples/test/core)
MODIFY /shale/framework/trunk/shale-apps/shale-test-view/src/main/java/org/apache/shale/examples/test/view/Lifecycle2.java
MODIFY /shale/framework/trunk/shale-apps/shale-test-view/src/main/java/org/apache/shale/examples/test/view/Lifecycle1.java
MODIFY /shale/framework/trunk/shale-apps/shale-test-view/src/test/java/org/apache/shale/examples/test/view/systest/IntegrationTestCase.java