myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From skitch...@apache.org
Subject svn commit: r617885 - in /myfaces/orchestra/trunk/examples/src/main/webapp: footer.jspf header.jspf index.jsp
Date Sat, 02 Feb 2008 20:29:54 GMT
Author: skitching
Date: Sat Feb  2 12:29:52 2008
New Revision: 617885

URL: http://svn.apache.org/viewvc?rev=617885&view=rev
Log:
Fix "home" and "home in new window" links.
Also add some comments

Modified:
    myfaces/orchestra/trunk/examples/src/main/webapp/footer.jspf
    myfaces/orchestra/trunk/examples/src/main/webapp/header.jspf
    myfaces/orchestra/trunk/examples/src/main/webapp/index.jsp

Modified: myfaces/orchestra/trunk/examples/src/main/webapp/footer.jspf
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/footer.jspf?rev=617885&r1=617884&r2=617885&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/footer.jspf (original)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/footer.jspf Sat Feb  2 12:29:52 2008
@@ -16,12 +16,12 @@
   specific language governing permissions and limitations
   under the License.
   --%>
-
+
+<%-- See comments in file header.jspf --%>
+
 <%@ page pageEncoding="UTF-8" %>
 <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
 <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>
-<%@ taglib uri="http://myfaces.apache.org/sandbox" prefix="s" %>
 
 
 <h:messages showDetail="true" />

Modified: myfaces/orchestra/trunk/examples/src/main/webapp/header.jspf
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/header.jspf?rev=617885&r1=617884&r2=617885&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/header.jspf (original)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/header.jspf Sat Feb  2 12:29:52 2008
@@ -16,7 +16,21 @@
   specific language governing permissions and limitations
   under the License.
   --%>
-
+
+<%--
+  - This is a page that is included into just about every other page in
+  - this webapp, to provide a standard "navigation bar" across the top
+  - of each page. There are other ways to insert common content, such as
+  - Tiles2, or facelets ui:composite, but we want to keep this webapp
+  - as simple as possible.
+  -
+  - Every page that includes this should start an f:view as the first thing
+  - in the page, then include this page as the first element within the f:view.
+  - The page must also include footer.jsp immediately before the end of the
+  - f:view. This file inserts HTML, HEAD and BODY tags into the document and
+  - the footer closes the BODY and HTML. There are JSF tags in this header
+  - (and the footer) file, so must be inside an f:view.
+  --%>
 <%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
 <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
@@ -26,7 +40,8 @@
 
 <f:verbatim>
 	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-</f:verbatim>
+</f:verbatim>
+
 <t:document state="start"/>
 
 <t:documentHead>
@@ -46,13 +61,13 @@
 <h:form styleClass="navigation">
 	<t:htmlTag value="ul">
 		<t:htmlTag value="li">
-			<h:outputLink value="/">
+			<h:outputLink value="#{facesContext.externalContext.requestContextPath}">
 				<h:outputText value="Home" />
 			</h:outputLink>
 		</t:htmlTag>
 		<t:htmlTag value="li">
 			<o:separateConversationContext>
-				<h:outputLink value="/" target="_blank">
+				<h:outputLink value="#{facesContext.externalContext.requestContextPath}" target="_blank">
 					<h:outputText value="Home in new window" />
 				</h:outputLink>
 			</o:separateConversationContext>

Modified: myfaces/orchestra/trunk/examples/src/main/webapp/index.jsp
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/index.jsp?rev=617885&r1=617884&r2=617885&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/index.jsp (original)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/index.jsp Sat Feb  2 12:29:52 2008
@@ -17,5 +17,12 @@
   under the License.
   --%>
 
+<%--
+  - The servlet container will automatically direct urls that specify
+  - no particular page to the "index.jsp" page. However the faces
+  - servlet will not have been run, so that page cannot use any 
+  - jsf features. Therefore this page just redirects to a url that
+  - *will* be handled by the faces servlet.
+  --%>
 <%@ page pageEncoding="UTF-8" %>
 <% response.sendRedirect("start.faces"); %>



Mime
View raw message