[seam-commits] Seam SVN: r14141 - branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/navigation.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Fri Jul 29 15:13:27 EDT 2011


Author: manaRH
Date: 2011-07-29 15:13:27 -0400 (Fri, 29 Jul 2011)
New Revision: 14141

Modified:
   branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/navigation/SafeActions.java
Log:
JBSEAM-4800 added a slash to read from web context root

Modified: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/navigation/SafeActions.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/navigation/SafeActions.java	2011-07-29 14:19:45 UTC (rev 14140)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/navigation/SafeActions.java	2011-07-29 19:13:27 UTC (rev 14141)
@@ -63,7 +63,8 @@
       String viewId = id.substring(0, loc);
       String action = "\"#{" + id.substring(loc+1) + "}\"";
       
-      InputStream is = FacesContext.getCurrentInstance().getExternalContext().getResourceAsStream(viewId);
+      // adding slash as it otherwise won't find a page viewId by getResource*
+      InputStream is = FacesContext.getCurrentInstance().getExternalContext().getResourceAsStream("/" +viewId);
       if (is==null) throw new IllegalStateException("Unable to read view " + "/" + viewId + " to execute action " + action);
       BufferedReader reader = new BufferedReader( new InputStreamReader(is) );
       try



More information about the seam-commits mailing list