You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ma...@apache.org on 2006/08/26 06:37:03 UTC

svn commit: r437074 - /myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java

Author: matzew
Date: Fri Aug 25 21:37:00 2006
New Revision: 437074

URL: http://svn.apache.org/viewvc?rev=437074&view=rev
Log:
added getViewId

Modified:
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java?rev=437074&r1=437073&r2=437074&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java Fri Aug 25 21:37:00 2006
@@ -115,7 +115,10 @@
         }
     }
 
-    protected NavigationCase getNavigationCase(FacesContext facesContext, String fromAction, String outcome)
+    /**
+     * Returns the <code>NavigationCase</code>that applies for the given action and outcome
+     */
+    public NavigationCase getNavigationCase(FacesContext facesContext, String fromAction, String outcome)
     {
         String viewId = facesContext.getViewRoot().getViewId();
         Map casesMap = getNavigationCases(facesContext);
@@ -163,17 +166,22 @@
     }
 
     /**
-     * TODO
+     * Returns the view ID that would be created for the given action and outcome
      */
-    protected String getViewId(FacesContext context, String fromAction, String outcome)
+    public String getViewId(FacesContext context, String fromAction, String outcome)
     {
-        return null;
+        return this.getNavigationCase(context, fromAction, outcome).getToViewId();
     }
 
     /**
-     * TODO
+     * Invoked by the navigation handler before the new view component is created.
+     * @param viewId The view ID to be created
+     * @return The view ID that should be used instead. If null, the view ID passed
+     * in will be used without modification.
+     * 
+     * <p>not implemented/called by Apache MyFaces</p>
      */
-    protected String beforeNavigation(String viewId)
+    public String beforeNavigation(String viewId)
     {
         return null;
     }