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 2004/12/28 10:19:14 UTC

cvs commit: incubator-myfaces/webapps/tiles/web/template template2.jsp

matzew      2004/12/28 01:19:14

  Modified:    webapps/tiles/web/common navigation.jsp
               webapps/tiles/web/WEB-INF tiles.xml tiles-faces-config.xml
  Added:       webapps/tiles/web/common nested1.jsp nested2.jsp
               webapps/tiles/web/template template2.jsp
  Log:
  changed Tiles example web app
  
  Revision  Changes    Path
  1.6       +3 -0      incubator-myfaces/webapps/tiles/web/common/navigation.jsp
  
  Index: navigation.jsp
  ===================================================================
  RCS file: /home/cvs/incubator-myfaces/webapps/tiles/web/common/navigation.jsp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- navigation.jsp	23 Dec 2004 17:10:53 -0000	1.5
  +++ navigation.jsp	28 Dec 2004 09:19:14 -0000	1.6
  @@ -11,4 +11,7 @@
       <h:commandLink action="nav_page3">
           <h:outputText value="non-tiles page" />
       </h:commandLink>
  +    <h:commandLink action="nav_page4">
  +        <h:outputText value="nested tiles" />
  +    </h:commandLink>
   </h:panelGrid>
  
  
  
  1.1                  incubator-myfaces/webapps/tiles/web/common/nested1.jsp
  
  Index: nested1.jsp
  ===================================================================
  <%@ taglib uri="http://myfaces.apache.org/extensions" prefix="x"%>
  <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
  <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
  <h:outputText value="Apache"/>
  
  
  1.1                  incubator-myfaces/webapps/tiles/web/common/nested2.jsp
  
  Index: nested2.jsp
  ===================================================================
  <%@ taglib uri="http://myfaces.apache.org/extensions" prefix="x"%>
  <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
  <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
  <h:outputText value="MyFaces"/>
  
  
  1.6       +13 -0     incubator-myfaces/webapps/tiles/web/WEB-INF/tiles.xml
  
  Index: tiles.xml
  ===================================================================
  RCS file: /home/cvs/incubator-myfaces/webapps/tiles/web/WEB-INF/tiles.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- tiles.xml	23 Dec 2004 17:10:53 -0000	1.5
  +++ tiles.xml	28 Dec 2004 09:19:14 -0000	1.6
  @@ -57,4 +57,17 @@
   
   <!-- workaround for non-tiles JSF pages-->
       <definition name="non.tiles1" path="/non-tile.jsp" />	
  +
  +<!-- nested tiles definition -->
  +    <definition name="nested.example" path="/template/template2.jsp" >
  +        <put name="nested1" value="/common/nested1.jsp" />
  +        <put name="nested2" value="/common/nested2.jsp" />
  +    </definition>
  +    <definition name="/page4.tiles" extends="layout.example" >
  +        <put name="body" value="nested.example" />
  +    </definition>
  +
  +
  +
  +
   </tiles-definitions>
  
  
  
  1.4       +4 -0      incubator-myfaces/webapps/tiles/web/WEB-INF/tiles-faces-config.xml
  
  Index: tiles-faces-config.xml
  ===================================================================
  RCS file: /home/cvs/incubator-myfaces/webapps/tiles/web/WEB-INF/tiles-faces-config.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- tiles-faces-config.xml	23 Dec 2004 17:10:53 -0000	1.3
  +++ tiles-faces-config.xml	28 Dec 2004 09:19:14 -0000	1.4
  @@ -27,6 +27,10 @@
               <from-outcome>nav_page3</from-outcome>
               <to-view-id>/non-tile.jsp</to-view-id>
           </navigation-case>
  +        <navigation-case>
  +            <from-outcome>nav_page4</from-outcome>
  +            <to-view-id>/page4.jsp</to-view-id>
  +        </navigation-case>		
       </navigation-rule>
   
   	<navigation-rule>
  
  
  
  1.1                  incubator-myfaces/webapps/tiles/web/template/template2.jsp
  
  Index: template2.jsp
  ===================================================================
  <%@ page session="false"%>
  <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
  <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
  <%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles"%>
  
  
  <table border="2">
  <tr>
  <td>
  <f:subview id="nested1">
    <tiles:insert attribute="nested1" flush="false" />
  </f:subview>
  </td>
  <td>
  <f:subview id="nested2"> 
    <tiles:insert attribute="nested2" flush="false"/>
  </f:subview>
  </td>
  </tr>
  </table>