|
From: Chad B. <cwb...@us...> - 2008-06-30 15:15:15
|
User: cwbrandon
Date: 08/06/30 08:15:23
Modified: andromda-jsf2/src/main/resources/templates/jsf2/flow/portlet
PortletPhaseListener.java.vsl
Log:
improve handling of use case entry points
Revision Changes Path
1.13 +6 -3 cartridges/andromda-jsf2/src/main/resources/templates/jsf2/flow/portlet/PortletPhaseListener.java.vsl
Index: PortletPhaseListener.java.vsl
===================================================================
RCS file: /cvsroot/andromdaplugins/cartridges/andromda-jsf2/src/main/resources/templates/jsf2/flow/portlet/PortletPhaseListener.java.vsl,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -w -r1.12 -r1.13
--- PortletPhaseListener.java.vsl 16 May 2008 22:09:05 -0000 1.12
+++ PortletPhaseListener.java.vsl 30 Jun 2008 15:15:22 -0000 1.13
@@ -19,7 +19,7 @@
@Override
protected void handleBeforePhase(javax.faces.event.PhaseEvent event)
{
- final String viewId = this.getViewId(event);
+ String viewId = this.getViewId(event);
if (viewId != null && event.getFacesContext() != null)
{
// - make the faces context available to all views
@@ -43,12 +43,15 @@
#if ($velocityCount > 1)
#set ($ifClause = "else $ifClause")
#end
- $ifClause (viewId.equals("${useCase.initialTargetPath}.xhtml"))
+ $ifClause (viewId.equals("${useCase.portletViewPath}.xhtml"))
{
final $controller.fullyQualifiedName controller = ($controller.fullyQualifiedName)
event.getFacesContext().getApplication().getVariableResolver().resolveVariable(
event.getFacesContext(), "$controller.beanName");
- controller.${useCase.controllerAction}();
+ event.getFacesContext().getApplication().getNavigationHandler().handleNavigation(
+ event.getFacesContext(), null, controller.${useCase.controllerAction}());
+ // - get the new view id before population since we are navigating to a new view
+ viewId = event.getFacesContext().getViewRoot().getViewId();
this.populateView(event, viewId);
}
#end
|