Author: craigmcc
Date: Sat Dec 23 12:56:29 2006
New Revision: 489926
URL: http://svn.apache.org/viewvc?view=rev&rev=489926
Log:
Fix the case reported in SHALE-371 (after further discussion) such that, when
you navigate from a ViewController view to a view that does not have a managed
bean name matching the rules in ViewControllerMapper, the prerender() method
on the originating view was mistakenly getting called. Thanks to Stan
Zapryanov for the patch, and the diligent evaluation to provide a reproducible
test case.
Modified:
shale/framework/trunk/shale-view/src/main/java/org/apache/shale/view/faces/ViewViewHandler.java
Modified:
shale/framework/trunk/shale-view/src/main/java/org/apache/shale/view/faces/ViewViewHandler.java
URL:
http://svn.apache.org/viewvc/shale/framework/trunk/shale-view/src/main/java/org/apache/shale/view/faces/ViewViewHandler.java?view=diff&rev=489926&r1=489925&r2=489926
==============================================================================
---
shale/framework/trunk/shale-view/src/main/java/org/apache/shale/view/faces/ViewViewHandler.java
(original)
+++
shale/framework/trunk/shale-view/src/main/java/org/apache/shale/view/faces/ViewViewHandler.java
Sat Dec 23 12:56:29 2006
@@ -302,6 +302,12 @@
log.debug(messages.getMessage("view.noViewController",
new Object[] { viewId,
viewName }));
}
+ // We are navigating to a page with no ViewControllerMapper
+ // compatible managed bean defined. Therefore, clear the
+ // flag that would otherwise cause an originating
ViewController's
+ // prerender() method to be called
+ context.getExternalContext().getRequestMap().remove
+ (FacesConstants.VIEW_NAME_RENDERED);
return;
}
} catch (EvaluationException e) {