You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by st...@apache.org on 2011/09/01 16:14:03 UTC
svn commit: r1164090 - in
/myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20:
./ src/main/webapp/ src/main/webapp/WEB-INF/templates/
src/main/webapp/listsample/ src/main/webapp/resources/
src/main/webapp/resources/css/ src/m...
Author: struberg
Date: Thu Sep 1 14:14:03 2011
New Revision: 1164090
URL: http://svn.apache.org/viewvc?rev=1164090&view=rev
Log:
EXTCDI-218 cleanup example. Add nice stylesheet, layout and windowId.js
Added:
myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/WEB-INF/templates/
myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/WEB-INF/templates/layout.xhtml (with props)
myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/resources/
myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/resources/css/
myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/resources/css/theme.css (with props)
myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/resources/images/
myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/resources/images/favicon.ico (with props)
myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/resources/js/
myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/resources/js/windowId.js (with props)
Modified:
myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/pom.xml
myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/helloMyFacesCodi.xhtml
myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/helloMyFacesCodi1.xhtml
myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/index.xhtml
myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/listsample/sampleList.xhtml
myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/listsample/sampleListEntry.xhtml
myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/noCodiPage.xhtml
myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/viewAccessBeanPage.xhtml
myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/viewAccessBeanPage2.xhtml
Modified: myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/pom.xml?rev=1164090&r1=1164089&r2=1164090&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/pom.xml (original)
+++ myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/pom.xml Thu Sep 1 14:14:03 2011
@@ -237,7 +237,8 @@
<artifactId>jsp-2.1-jetty</artifactId>
<version>${maven.jetty.plugin.version}</version>
<type>jar</type>
- <scope>test</scope>
+ <scope>runtime</scope>
+ <optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.geronimo.bundles</groupId>
Added: myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/WEB-INF/templates/layout.xhtml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/WEB-INF/templates/layout.xhtml?rev=1164090&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/WEB-INF/templates/layout.xhtml (added)
+++ myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/WEB-INF/templates/layout.xhtml Thu Sep 1 14:14:03 2011
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+ <f:view>
+ <h:outputScript name="windowId.js" library="js"/>
+ <script type="text/javascript">
+ assertWindowId()
+ </script>
+
+ <ui:insert name="metadata"/>
+
+ <h:head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <link href="#{resource['images:favicon.ico']}" rel="shortcut icon" type="image/vnd.microsoft.icon"/>
+ <link href="#{resource['css:theme.css']}" rel="stylesheet" type="text/css" media="all"/>
+ <ui:insert name="header"></ui:insert>
+ <title><h:outputText value="CODI JSF2 Demo"/></title>
+ </h:head>
+
+ <!-- real content -->
+ <div id="contentContainer">
+ <h:messages id="globalMessagesPanel" globalOnly="true" errorClass="errorMessage"
+ infoClass="infoMessage" warnClass="warnMessage" fatalClass="errorMessage"/>
+ <ui:insert name="content"/>
+ </div>
+ </f:view>
+</html>
Propchange: myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/WEB-INF/templates/layout.xhtml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/helloMyFacesCodi.xhtml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/helloMyFacesCodi.xhtml?rev=1164090&r1=1164089&r2=1164090&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/helloMyFacesCodi.xhtml (original)
+++ myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/helloMyFacesCodi.xhtml Thu Sep 1 14:14:03 2011
@@ -24,11 +24,10 @@
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
- xmlns:ui="http://java.sun.com/jsf/facelets">
-
- <head><title>CODI JSF 2.0 Demo</title></head>
-
- <body>
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ >
+<ui:composition template="/WEB-INF/templates/layout.xhtml">
+ <ui:define name="content">
<h1 style="color:red">Dev-Demo (purpose: only for tests during development)</h1>
<h:form>
@@ -42,5 +41,6 @@
<h:outputLink value="converter/index.xhtml">Advanced Converter sample</h:outputLink>
<h:messages globalOnly="true"/>
- </body>
-</html>
\ No newline at end of file
+ </ui:define>
+</ui:composition>
+</html>
Modified: myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/helloMyFacesCodi1.xhtml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/helloMyFacesCodi1.xhtml?rev=1164090&r1=1164089&r2=1164090&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/helloMyFacesCodi1.xhtml (original)
+++ myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/helloMyFacesCodi1.xhtml Thu Sep 1 14:14:03 2011
@@ -25,14 +25,12 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets">
-
- <head><title>CODI JSF 2.0 Demo</title></head>
-
- <body>
+<ui:composition template="/WEB-INF/templates/layout.xhtml">
+ <ui:define name="content">
<h:form>
<h:commandLink value="back" action="/helloMyFacesCodi.xhtml"/>
</h:form>
<h:outputText value="#{conversationDemoBean1.value}"/>
- <h:messages globalOnly="true"/>
- </body>
-</html>
\ No newline at end of file
+ </ui:define>
+</ui:composition>
+</html>
Modified: myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/index.xhtml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/index.xhtml?rev=1164090&r1=1164089&r2=1164090&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/index.xhtml (original)
+++ myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/index.xhtml Thu Sep 1 14:14:03 2011
@@ -23,10 +23,10 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets">
- <h:head>
- <title>Hello MyFaces CODI JSF 2.0</title>
- </h:head>
- <h:body>
+<ui:composition template="/WEB-INF/templates/layout.xhtml">
+ <ui:define name="content">
Hello MyFaces CODI JSF 2.0
- </h:body>
+ </ui:define>
+</ui:composition>
+
</html>
Modified: myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/listsample/sampleList.xhtml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/listsample/sampleList.xhtml?rev=1164090&r1=1164089&r2=1164090&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/listsample/sampleList.xhtml (original)
+++ myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/listsample/sampleList.xhtml Thu Sep 1 14:14:03 2011
@@ -24,26 +24,22 @@
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets">
- <head><title>CODI JSF 2.0 List Demo</title></head>
+<ui:composition template="/WEB-INF/templates/layout.xhtml">
+ <ui:define name="content">
- <body>
- <f:view>
-
- <h:form>
- <h3>A sample List </h3>
- <h:dataTable value="#{sampleList.entryIds}" id="list" var="entryId">
- <h:column>
- <h:link outcome="sampleListEntry">
- <h:outputText value="#{entryId}"/>
- <f:param name="entryId" value="#{entryId}"/>
- </h:link>
- </h:column>
- </h:dataTable>
-
- </h:form>
-
- <h:messages globalOnly="true"/>
-
- </f:view>
- </body>
-</html>
\ No newline at end of file
+ <h:form>
+ <h3>A sample List </h3>
+ <h:dataTable value="#{sampleList.entryIds}" id="list" var="entryId">
+ <h:column>
+ <h:link outcome="sampleListEntry">
+ <h:outputText value="#{entryId}"/>
+ <f:param name="entryId" value="#{entryId}"/>
+ </h:link>
+ </h:column>
+ </h:dataTable>
+
+ </h:form>
+
+ </ui:define>
+</ui:composition>
+</html>
Modified: myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/listsample/sampleListEntry.xhtml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/listsample/sampleListEntry.xhtml?rev=1164090&r1=1164089&r2=1164090&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/listsample/sampleListEntry.xhtml (original)
+++ myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/listsample/sampleListEntry.xhtml Thu Sep 1 14:14:03 2011
@@ -24,31 +24,28 @@
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets">
- <head><title>CODI JSF 2.0 List Demo</title></head>
+<ui:composition template="/WEB-INF/templates/layout.xhtml">
- <f:metadata>
+ <ui:define name="metadata">
<f:viewParam name="entryId" value="#{sampleListEntry.id}"/>
- </f:metadata>
+ </ui:define>
- <body>
- <f:view>
+ <ui:define name="content">
- <h:form>
- <h3>A sample List Entry</h3>
- <h:panelGrid columns="2">
- <h:outputLabel value="id"/>
- <h:outputText value="#{sampleListEntry.id}"/>
-
- <h:outputLabel value="value"/>
- <h:inputText value="#{sampleListEntry.value}"/>
- </h:panelGrid>
-
- <h:commandButton action="#{sampleListEntry.back}" value="back"/>
- <h:commandButton action="#{sampleListEntry.reload}" value="reload"/>
- </h:form>
-
- <h:messages globalOnly="true"/>
-
- </f:view>
- </body>
-</html>
\ No newline at end of file
+ <h:form>
+ <h3>A sample List Entry</h3>
+ <h:panelGrid columns="2">
+ <h:outputLabel value="id"/>
+ <h:outputText value="#{sampleListEntry.id}"/>
+
+ <h:outputLabel value="value"/>
+ <h:inputText value="#{sampleListEntry.value}"/>
+ </h:panelGrid>
+
+ <h:commandButton action="#{sampleListEntry.back}" value="back"/>
+ <h:commandButton action="#{sampleListEntry.reload}" value="reload"/>
+ </h:form>
+
+ </ui:define>
+</ui:composition>
+</html>
Modified: myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/noCodiPage.xhtml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/noCodiPage.xhtml?rev=1164090&r1=1164089&r2=1164090&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/noCodiPage.xhtml (original)
+++ myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/noCodiPage.xhtml Thu Sep 1 14:14:03 2011
@@ -26,9 +26,9 @@
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets">
- <head><title>CODI JSF 2.0 Demo</title></head>
-
- <body>
+<ui:composition template="/WEB-INF/templates/layout.xhtml">
+ <ui:define name="content">
<h:outputText value="This page doesn't contain a CODI scoped bean!"/>
- </body>
-</html>
\ No newline at end of file
+ </ui:define>
+</ui:composition>
+</html>
Added: myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/resources/css/theme.css
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/resources/css/theme.css?rev=1164090&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/resources/css/theme.css (added)
+++ myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/resources/css/theme.css Thu Sep 1 14:14:03 2011
@@ -0,0 +1,38 @@
+HTML {
+ BORDER-TOP-WIDTH: 0px;
+ PADDING-RIGHT: 0px;
+ PADDING-LEFT: 0px;
+ BORDER-LEFT-WIDTH: 0px;
+ BORDER-BOTTOM-WIDTH: 0px;
+ PADDING-BOTTOM: 0px;
+ MARGIN: 0px;
+ PADDING-TOP: 0px;
+ BORDER-RIGHT-WIDTH: 0px;
+ background-color: #ffffff;
+ FONT-FAMILY: Verdana, Helvetica, Geneva, sans-serif;
+ color: #000000;
+}
+
+BODY {
+ BORDER-TOP-WIDTH: 0px;
+ PADDING-RIGHT: 0px;
+ PADDING-LEFT: 0px;
+ BORDER-LEFT-WIDTH: 0px;
+ BORDER-BOTTOM-WIDTH: 0px;
+ PADDING-BOTTOM: 0px;
+ MARGIN: 0px;
+ PADDING-TOP: 0px;
+ BORDER-RIGHT-WIDTH: 0px;
+}
+
+#contentContainer {
+ MARGIN: 10px 5px 15px;
+ FLOAT: left;
+ WIDTH: 950px;
+ border: none;
+ border-color: #666666;
+ border-width: 2px;
+ padding: 10px 15px;
+ background-color: #cccccc;
+}
+
Propchange: myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/resources/css/theme.css
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/resources/images/favicon.ico
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/resources/images/favicon.ico?rev=1164090&view=auto
==============================================================================
Binary file - no diff available.
Propchange: myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/resources/images/favicon.ico
------------------------------------------------------------------------------
svn:mime-type = image/x-icon
Added: myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/resources/js/windowId.js
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/resources/js/windowId.js?rev=1164090&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/resources/js/windowId.js (added)
+++ myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/resources/js/windowId.js Thu Sep 1 14:14:03 2011
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+function urlWithoutWindowId(base) {
+ var query = base;
+ var vars = query.split(/&|\?/g);
+ var newQuery = "";
+ var iParam = 0;
+ for (var i=0; vars != null && i < vars.length; i++) {
+ var pair = vars[i].split("=");
+ if (pair.length == 1) {
+ newQuery = pair[0];
+ }
+ else {
+ if (pair[0] != "windowId") {
+ var amp = iParam++ > 0 ? "&" : "?";
+ newQuery = newQuery + amp + pair[0] + "=" + pair[1];
+ }
+ }
+ }
+ return newQuery;
+}
+
+function assertWindowId() {
+ var freshWindow = window.name.length < 1;
+ if (freshWindow) {
+ url = urlWithoutWindowId(window.location.href);
+ window.name = "window";
+ window.location = url;
+ }
+}
Propchange: myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/resources/js/windowId.js
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/viewAccessBeanPage.xhtml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/viewAccessBeanPage.xhtml?rev=1164090&r1=1164089&r2=1164090&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/viewAccessBeanPage.xhtml (original)
+++ myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/viewAccessBeanPage.xhtml Thu Sep 1 14:14:03 2011
@@ -26,35 +26,35 @@
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets">
- <head><title>CODI JSF 2.0 Demo</title></head>
-
- <body>
- <f:view>
-
- <h:form>
- <h3>values of ViewAccessScoped bean 1:</h3>
- <h:panelGrid columns="2">
- <h:outputLabel value="value"/> <h:outputText value="#{vaBean1.value}"/>
- <h:outputLabel value="createdAt"/> <h:outputText value="#{vaBean1.createdAt}"/>
- <h:outputLabel value="sample"/> <h:outputText value="#{vaBean1.sampleField}"/>
- <h:outputLabel value="viewParam"/> <h:outputText value="#{vaBean1.viewParam}"/>
- </h:panelGrid>
-
-
- <h3>values of ViewAccessScoped bean 2:</h3>
- <h:panelGrid columns="2">
- <h:outputLabel value="value"/> <h:outputText value="#{vaBean2.value}"/>
- <h:outputLabel value="createdAt"/> <h:outputText value="#{vaBean2.createdAt}"/>
- <h:outputLabel value="sample"/> <h:outputText value="#{vaBean2.sampleField}"/>
- <h:outputLabel value="viewParam"/> <h:outputText value="#{vaBean2.viewParam}"/>
- </h:panelGrid>
+<ui:composition template="/WEB-INF/templates/layout.xhtml">
+ <ui:define name="content">
+ <h:form>
+ <h3>values of ViewAccessScoped bean 1:</h3>
+ <h:panelGrid columns="2">
+ <h:outputLabel value="value" for="value1"/> <h:outputText id="value1" value="#{vaBean1.value}"/>
+ <h:outputLabel value="createdAt" for="createdAt1"/> <h:outputText id="createdAt1" value="#{vaBean1.createdAt}"/>
+ <h:outputLabel value="sample" for="sample1"/> <h:outputText id="sample1" value="#{vaBean1.sampleField}"/>
+ <h:outputLabel value="viewParam" for="viewParam1"/> <h:outputText id="viewParam1" value="#{vaBean1.viewParam}"/>
+ </h:panelGrid>
+
+
+ <h3>values of ViewAccessScoped bean 2:</h3>
+ <h:panelGrid columns="2">
+ <h:outputLabel value="value" for="value2"/> <h:outputText id="value2" value="#{vaBean2.value}"/>
+ <h:outputLabel value="createdAt" for="createdAt2"/> <h:outputText id="createdAt2" value="#{vaBean2.createdAt}"/>
+ <h:outputLabel value="sample" for="sample2"/> <h:outputText id="sample2" value="#{vaBean2.sampleField}"/>
+ <h:outputLabel value="viewParam" for="viewParam2"/> <h:outputText id="viewParam2" value="#{vaBean2.viewParam}"/>
+ </h:panelGrid>
+ <h:panelGrid columns="1">
<h:commandButton value="forward" action="#{vaBean1.forward}"/><br/>
<h:commandButton value="stay on page" action="#{vaBean1.stay}"/>
- </h:form>
-
- <h:messages globalOnly="true"/>
-
- </f:view>
- </body>
-</html>
\ No newline at end of file
+ <h:link outcome="viewAccessBeanPage.xhtml" value="viewAccessBeanPage"/>
+ <h:link outcome="listsample/sampleList.xhtml" value="listSample"/>
+ </h:panelGrid>
+
+ </h:form>
+
+ </ui:define>
+</ui:composition>
+</html>
Modified: myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/viewAccessBeanPage2.xhtml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/viewAccessBeanPage2.xhtml?rev=1164090&r1=1164089&r2=1164090&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/viewAccessBeanPage2.xhtml (original)
+++ myfaces/extensions/cdi/trunk/examples/jsf-playground/hello_myfaces-codi_jsf20/src/main/webapp/viewAccessBeanPage2.xhtml Thu Sep 1 14:14:03 2011
@@ -26,29 +26,25 @@
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets">
- <head><title>CODI JSF 2.0 Demo</title></head>
+<ui:composition template="/WEB-INF/templates/layout.xhtml">
+ <ui:define name="content">
+ <h:form>
+ <h3>values of ViewAccessScoped bean 1:</h3>
+ <h:panelGrid columns="2">
+ <h:outputLabel value="value" for="value1"/> <h:outputText id="value1" value="#{vaBean1.value}"/>
+ <h:outputLabel value="createdAt" for="createdAt1"/> <h:outputText id="createdAt1" value="#{vaBean1.createdAt}"/>
+ <h:outputLabel value="sample" for="sample1"/> <h:outputText id="sample1" value="#{vaBean1.sampleField}"/>
+ <h:outputLabel value="viewParam" for="viewParam1"/> <h:outputText id="viewParam1" value="#{vaBean1.viewParam}"/>
+ </h:panelGrid>
- <body>
- <f:view>
- <h:form>
- <h3>values of ViewAccessScoped bean 1:</h3>
- <h:panelGrid columns="2">
- <h:outputLabel value="value"/> <h:outputText value="#{vaBean1.value}"/>
- <h:outputLabel value="createdAt"/> <h:outputText value="#{vaBean1.createdAt}"/>
- <h:outputLabel value="sample"/> <h:outputText value="#{vaBean1.sampleField}"/>
- <h:outputLabel value="viewParam"/> <h:outputText value="#{vaBean1.viewParam}"/>
- </h:panelGrid>
+ <h3>bean 2 will not get touched on this page</h3>
+ This means it gets another instance on page 1!
- <h3>bean 2 will not get touched on this page</h3>
- This means it gets another instance on page 1!
+ <br/><br/>
- <br/><br/>
-
- <h:commandButton value="back" action="#{vaBean1.back}"/><br/>
- <h:commandButton value="stay on page" action="#{vaBean1.stay}"/>
-
- <h:messages globalOnly="true"/>
- </h:form>
- </f:view>
- </body>
-</html>
\ No newline at end of file
+ <h:commandButton value="back" action="#{vaBean1.back}"/><br/>
+ <h:commandButton value="stay on page" action="#{vaBean1.stay}"/>
+ </h:form>
+ </ui:define>
+</ui:composition>
+</html>