You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2014/04/14 13:37:55 UTC
svn commit: r1587191 - in
/myfaces/tobago/branches/tobago-3.0.x/tobago-example: ./
tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/nonfacesrequest/
tobago-example-demo/src/main/webapp/WEB-INF/
tobago-example-demo/src/main/webap...
Author: lofwyr
Date: Mon Apr 14 11:37:54 2014
New Revision: 1587191
URL: http://svn.apache.org/r1587191
Log:
moving non-faces-request example to demo
Added:
myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/nonfacesrequest/
- copied from r1587181, myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-nonfacesrequest/src/main/java/org/apache/myfaces/tobago/example/nonfacesrequest/
myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/90-non-faces-request/
myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/90-non-faces-request/non-faces-request.xhtml
myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/90-non-faces-request/x-fish-pond.xhtml
Removed:
myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-nonfacesrequest/
Modified:
myfaces/tobago/branches/tobago-3.0.x/tobago-example/pom.xml
myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/nonfacesrequest/FishPond.java
myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/nonfacesrequest/FishServlet.java
myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml
myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/web.xml
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/pom.xml?rev=1587191&r1=1587190&r2=1587191&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/pom.xml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/pom.xml Mon Apr 14 11:37:54 2014
@@ -121,7 +121,6 @@
<module>tobago-example-blank</module>
<module>tobago-example-data</module>
<module>tobago-example-demo</module>
- <module>tobago-example-nonfacesrequest</module>
<module>tobago-example-experimental</module>
<module>tobago-example-test</module>
</modules>
@@ -133,7 +132,6 @@
<module>tobago-example-blank</module>
<module>tobago-example-data</module>
<module>tobago-example-demo</module>
- <module>tobago-example-nonfacesrequest</module>
<module>tobago-example-portlet</module>
<module>tobago-example-sandbox</module>
<module>tobago-example-security</module>
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/nonfacesrequest/FishPond.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/nonfacesrequest/FishPond.java?rev=1587191&r1=1587181&r2=1587191&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/nonfacesrequest/FishPond.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/nonfacesrequest/FishPond.java Mon Apr 14 11:37:54 2014
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.myfaces.tobago.example.nonfacesrequest;
+package org.apache.myfaces.tobago.example.demo.nonfacesrequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -50,7 +50,7 @@ public class FishPond {
LOG.info("select via random: '" + selectedFish + "'");
- return "view";
+ return "/content/90-non-faces-request/x-fish-pond.xhtml";
}
public String select(final String id) {
@@ -58,7 +58,7 @@ public class FishPond {
LOG.info("select via id: '" + selectedFish + "'");
- return "view";
+ return "/content/90-non-faces-request/x-fish-pond.xhtml";
}
public String getSelectedFish() {
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/nonfacesrequest/FishServlet.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/nonfacesrequest/FishServlet.java?rev=1587191&r1=1587181&r2=1587191&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/nonfacesrequest/FishServlet.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/nonfacesrequest/FishServlet.java Mon Apr 14 11:37:54 2014
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.myfaces.tobago.example.nonfacesrequest;
+package org.apache.myfaces.tobago.example.demo.nonfacesrequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml?rev=1587191&r1=1587190&r2=1587191&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml Mon Apr 14 11:37:54 2014
@@ -249,6 +249,12 @@
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
+ <managed-bean>
+ <managed-bean-name>fishPond</managed-bean-name>
+ <managed-bean-class>org.apache.myfaces.tobago.example.demo.nonfacesrequest.FishPond</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+
<navigation-rule>
<navigation-case>
<from-outcome>reference/intro</from-outcome>
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/web.xml?rev=1587191&r1=1587190&r2=1587191&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/web.xml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/web.xml Mon Apr 14 11:37:54 2014
@@ -129,31 +129,46 @@
</listener>
-->
- <!-- servlet -->
+ <!-- FacesServlet -->
+
<servlet>
<servlet-name>FacesServlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>3</load-on-startup>
</servlet>
+ <servlet-mapping>
+ <servlet-name>FacesServlet</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+
+ <!-- ResourceServlet -->
<servlet>
<servlet-name>ResourceServlet</servlet-name>
<servlet-class>org.apache.myfaces.tobago.servlet.ResourceServlet</servlet-class>
</servlet>
- <!-- servlet-mapping -->
-
<servlet-mapping>
- <servlet-name>FacesServlet</servlet-name>
- <url-pattern>/faces/*</url-pattern>
+ <servlet-name>ResourceServlet</servlet-name>
+ <url-pattern>/org/apache/myfaces/tobago/renderkit/*</url-pattern>
</servlet-mapping>
+ <!-- Non-Faces-Request Demo -->
+
+ <servlet>
+ <servlet-name>FishServlet</servlet-name>
+ <servlet-class>org.apache.myfaces.tobago.example.demo.nonfacesrequest.FishServlet</servlet-class>
+ <load-on-startup>3</load-on-startup>
+ </servlet>
+
<servlet-mapping>
- <servlet-name>ResourceServlet</servlet-name>
- <url-pattern>/org/apache/myfaces/tobago/renderkit/*</url-pattern>
+ <servlet-name>FishServlet</servlet-name>
+ <url-pattern>/FishServlet</url-pattern>
</servlet-mapping>
+ <!-- Error Page -->
+
<error-page>
<error-code>404</error-code>
<location>/faces/error/404.xhtml</location>
Added: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/90-non-faces-request/non-faces-request.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/90-non-faces-request/non-faces-request.xhtml?rev=1587191&view=auto
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/90-non-faces-request/non-faces-request.xhtml (added)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/90-non-faces-request/non-faces-request.xhtml Mon Apr 14 11:37:54 2014
@@ -0,0 +1,40 @@
+<?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.
+-->
+
+<ui:composition template="/WEB-INF/tags/layout/overview.xhtml"
+ xmlns:tc="http://myfaces.apache.org/tobago/component"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core">
+ <ui:param name="title" value="Non-Faces-Request Demo: Start"/>
+
+ <tc:panel>
+ <tc:out value="todo: check why this content will not be rendered..."/>
+ <p>
+ Use these external links:<br/>
+
+ <a href="#{request.contextPath}/FishServlet?id=0">#{request.contextPath}/FishServlet?id=0</a><br/>
+ <a href="#{request.contextPath}/FishServlet?id=1">#{request.contextPath}/FishServlet?id=1</a><br/>
+ <a href="#{request.contextPath}/FishServlet?id=2">#{request.contextPath}/FishServlet?id=2</a><br/>
+ <a href="#{request.contextPath}/FishServlet?id=3">#{request.contextPath}/FishServlet?id=3</a><br/>
+ <a href="#{request.contextPath}/FishServlet?id=4">#{request.contextPath}/FishServlet?id=4</a><br/>
+ </p>
+
+ </tc:panel>
+
+</ui:composition>
Added: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/90-non-faces-request/x-fish-pond.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/90-non-faces-request/x-fish-pond.xhtml?rev=1587191&view=auto
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/90-non-faces-request/x-fish-pond.xhtml (added)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/90-non-faces-request/x-fish-pond.xhtml Mon Apr 14 11:37:54 2014
@@ -0,0 +1,44 @@
+<?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.
+-->
+
+<ui:composition template="/WEB-INF/tags/layout/overview.xhtml"
+ xmlns:tc="http://myfaces.apache.org/tobago/component"
+ xmlns:tx="http://myfaces.apache.org/tobago/extension"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core">
+ <ui:param name="title" value="Non-Faces-Request Demo: Fish Pont"/>
+
+ <tc:panel>
+
+ <f:facet name="layout">
+ <tc:gridLayout rows="auto;auto" margin="20px"/>
+ </f:facet>
+
+ <tx:in label="Selected:" value="#{fishPond.selectedFish}" readonly="true"/>
+
+ <tc:panel>
+ <f:facet name="layout">
+ <tc:gridLayout columns="auto;*"/>
+ </f:facet>
+ <tc:button label="random" action="#{fishPond.random}"/>
+ </tc:panel>
+
+ </tc:panel>
+
+</ui:composition>