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 2009/11/10 15:37:43 UTC

svn commit: r834480 - in /myfaces/tobago/trunk/example/test/src/main: java/org/apache/myfaces/tobago/example/test/Reload.java webapp/WEB-INF/faces-config.xml webapp/tc/reload/ webapp/tc/reload/tip.xhtml

Author: lofwyr
Date: Tue Nov 10 14:37:42 2009
New Revision: 834480

URL: http://svn.apache.org/viewvc?rev=834480&view=rev
Log:
TOBAGO-765: test for "reload"

Added:
    myfaces/tobago/trunk/example/test/src/main/java/org/apache/myfaces/tobago/example/test/Reload.java
    myfaces/tobago/trunk/example/test/src/main/webapp/tc/reload/
    myfaces/tobago/trunk/example/test/src/main/webapp/tc/reload/tip.xhtml
Modified:
    myfaces/tobago/trunk/example/test/src/main/webapp/WEB-INF/faces-config.xml

Added: myfaces/tobago/trunk/example/test/src/main/java/org/apache/myfaces/tobago/example/test/Reload.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/test/src/main/java/org/apache/myfaces/tobago/example/test/Reload.java?rev=834480&view=auto
==============================================================================
--- myfaces/tobago/trunk/example/test/src/main/java/org/apache/myfaces/tobago/example/test/Reload.java (added)
+++ myfaces/tobago/trunk/example/test/src/main/java/org/apache/myfaces/tobago/example/test/Reload.java Tue Nov 10 14:37:42 2009
@@ -0,0 +1,32 @@
+package org.apache.myfaces.tobago.example.test;
+
+/*
+ * 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.
+ */
+
+public class Reload {
+  
+  private int counter;
+
+  public boolean isReload() {
+    counter++;
+    return true;
+  }
+  
+  public int getCounter() {
+    return counter;
+  }
+}

Modified: myfaces/tobago/trunk/example/test/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/test/src/main/webapp/WEB-INF/faces-config.xml?rev=834480&r1=834479&r2=834480&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/test/src/main/webapp/WEB-INF/faces-config.xml (original)
+++ myfaces/tobago/trunk/example/test/src/main/webapp/WEB-INF/faces-config.xml Tue Nov 10 14:37:42 2009
@@ -71,6 +71,12 @@
     <managed-bean-scope>session</managed-bean-scope>
   </managed-bean>
 
+  <managed-bean>
+    <managed-bean-name>reload</managed-bean-name>
+    <managed-bean-class>org.apache.myfaces.tobago.example.test.Reload</managed-bean-class>
+    <managed-bean-scope>session</managed-bean-scope>
+  </managed-bean>
+
   <navigation-rule>
     <navigation-case>
       <from-outcome>navigation</from-outcome>

Added: myfaces/tobago/trunk/example/test/src/main/webapp/tc/reload/tip.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/test/src/main/webapp/tc/reload/tip.xhtml?rev=834480&view=auto
==============================================================================
--- myfaces/tobago/trunk/example/test/src/main/webapp/tc/reload/tip.xhtml (added)
+++ myfaces/tobago/trunk/example/test/src/main/webapp/tc/reload/tip.xhtml Tue Nov 10 14:37:42 2009
@@ -0,0 +1,42 @@
+<?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.
+-->
+
+<tc:page 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">
+  <tc:gridLayoutConstraint width="600px" height="600px"/>
+  <tc:panel>
+    <f:facet name="layout">
+      <tc:gridLayout margin="10px" rows="auto;20px;auto;" columns="300px"/>
+    </f:facet>
+    <f:facet name="reload">
+      <tc:reload frequency="5000" update="#{reload.reload}"/>
+    </f:facet>
+
+    <tc:in value="#{reload.counter}" readonly="true" tip="Test of &quot; (quotation mark)"/>
+
+    <tc:label value="Label" tip="Test of &quot; (quotation mark)"/>
+
+    <tc:selectOneChoice tip="Test of &quot; (quotation mark)">
+      <tc:selectItem itemValue="a" itemLabel="A Value"/>
+      <tc:selectItem itemValue="b" itemLabel="An Alternative"/>
+    </tc:selectOneChoice>
+  </tc:panel>
+</tc:page>