JBoss Rich Faces SVN: r19706 - in branches/RF-8742/ui/validator/ui/src: test/java/org/richfaces/convert and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2010-10-27 12:37:39 -0400 (Wed, 27 Oct 2010)
New Revision: 19706
Added:
branches/RF-8742/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/byte-converter.js
branches/RF-8742/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/number-converter.js
branches/RF-8742/ui/validator/ui/src/test/java/org/richfaces/convert/ByteConverterTest.java
Removed:
branches/RF-8742/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/converter-number.js
Modified:
branches/RF-8742/ui/validator/ui/src/test/java/org/richfaces/convert/NumberConverterTest.java
Log:
https://jira.jboss.org/browse/RF-9521
Added: branches/RF-8742/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/byte-converter.js
===================================================================
--- branches/RF-8742/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/byte-converter.js (rev 0)
+++ branches/RF-8742/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/byte-converter.js 2010-10-27 16:37:39 UTC (rev 19706)
@@ -0,0 +1,11 @@
+RichFaces.csv.addConverter({"byte":
+(function(rf) {
+ return function (value, params) {
+ var result = parseInt(value);
+ if (isNaN(result) || result<-128 || result>127) {
+ throw rf.csv.getMessage(params.customMessage, 'BYTE_CONVERTER_BYTE', [value, 0, params.componentId]);
+ }
+ return result;
+ }
+})(window.RichFaces || (window.RichFaces={}))
+});
\ No newline at end of file
Deleted: branches/RF-8742/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/converter-number.js
===================================================================
--- branches/RF-8742/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/converter-number.js 2010-10-27 16:32:43 UTC (rev 19705)
+++ branches/RF-8742/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/converter-number.js 2010-10-27 16:37:39 UTC (rev 19706)
@@ -1,13 +0,0 @@
-RichFaces.csv.addConverter({"number":
-(function(rf) {
- return function (value, params) {
- var result;
- if (isNaN(value)) {
- throw rf.csv.getMessage(params.customMessage, 'NUMBER_CONVERTER_NUMBER', [value, 0, params.componentId]);
- } else {
- result = parseInt(value);
- }
- return result;
- }
-})(window.RichFaces || (window.RichFaces={}))
-});
\ No newline at end of file
Copied: branches/RF-8742/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/number-converter.js (from rev 19702, branches/RF-8742/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/converter-number.js)
===================================================================
--- branches/RF-8742/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/number-converter.js (rev 0)
+++ branches/RF-8742/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/number-converter.js 2010-10-27 16:37:39 UTC (rev 19706)
@@ -0,0 +1,13 @@
+RichFaces.csv.addConverter({"number":
+(function(rf) {
+ return function (value, params) {
+ var result;
+ if (isNaN(value)) {
+ throw rf.csv.getMessage(params.customMessage, 'NUMBER_CONVERTER_NUMBER', [value, 0, params.componentId]);
+ } else {
+ result = parseInt(value);
+ }
+ return result;
+ }
+})(window.RichFaces || (window.RichFaces={}))
+});
\ No newline at end of file
Added: branches/RF-8742/ui/validator/ui/src/test/java/org/richfaces/convert/ByteConverterTest.java
===================================================================
--- branches/RF-8742/ui/validator/ui/src/test/java/org/richfaces/convert/ByteConverterTest.java (rev 0)
+++ branches/RF-8742/ui/validator/ui/src/test/java/org/richfaces/convert/ByteConverterTest.java 2010-10-27 16:37:39 UTC (rev 19706)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.convert;
+
+import static org.junit.Assert.*;
+
+import javax.faces.convert.ByteConverter;
+import javax.faces.convert.NumberConverter;
+
+import org.junit.Test;
+import org.richfaces.application.MessageFactory;
+import org.richfaces.application.ServiceTracker;
+import org.richfaces.appplication.FacesMessages;
+
+/**
+ * @author Pavel Yaschenko
+ *
+ */
+public class ByteConverterTest extends BaseConverterTest {
+
+ public ByteConverterTest() {
+ super("META-INF/resources/org.richfaces/byte-converter.js");
+ }
+
+ @Test
+ @TestDataHolder(
+ successes = {
+ @TestData(submittedValue = "-128"),
+ @TestData(submittedValue = "0"),
+ @TestData(submittedValue = "127")
+ },
+ failures = {
+ @TestData(submittedValue = "-129"),
+ @TestData(submittedValue = "128"),
+ @TestData(submittedValue = "aaa")
+ }
+ )
+ public void testSuccess() throws Exception {
+ setClientConverterClassName("RichFaces.csv.getConverter('byte')");
+ setConverterId(ByteConverter.CONVERTER_ID);
+ setConversionErrorMessageEnum(FacesMessages.BYTE_CONVERTER_BYTE);
+ }
+}
Modified: branches/RF-8742/ui/validator/ui/src/test/java/org/richfaces/convert/NumberConverterTest.java
===================================================================
--- branches/RF-8742/ui/validator/ui/src/test/java/org/richfaces/convert/NumberConverterTest.java 2010-10-27 16:32:43 UTC (rev 19705)
+++ branches/RF-8742/ui/validator/ui/src/test/java/org/richfaces/convert/NumberConverterTest.java 2010-10-27 16:37:39 UTC (rev 19706)
@@ -37,7 +37,7 @@
public class NumberConverterTest extends BaseConverterTest {
public NumberConverterTest() {
- super("META-INF/resources/org.richfaces/converter-number.js");
+ super("META-INF/resources/org.richfaces/number-converter.js");
}
@Test
14 years, 3 months
JBoss Rich Faces SVN: r19705 - in branches/RF-7817: bom and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-10-27 12:32:43 -0400 (Wed, 27 Oct 2010)
New Revision: 19705
Added:
branches/RF-7817/svn.externals
Modified:
branches/RF-7817/bom/pom.xml
branches/RF-7817/dist/readme-examples.txt
branches/RF-7817/dist/readme-ui.txt
branches/RF-7817/parent/pom.xml
branches/RF-7817/ui/dist/richfaces-components-api/pom.xml
branches/RF-7817/ui/dist/richfaces-components-ui/pom.xml
Log:
Merged revisions 19156-19157,19159-19160,19176,19186-19187,19190,19194,19196,19199,19203-19204,19231-19234,19248-19249,19255-19256,19258-19262,19276,19279-19281,19283,19285,19291-19299,19307,19312,19315,19318-19319,19325,19341-19342,19345-19351,19353-19355,19358-19359,19364,19367-19369,19371,19374-19377,19379-19385,19387,19393-19394,19400,19402-19404,19418-19422,19426,19430-19431,19434-19441,19443-19444,19446,19468,19470,19477,19491,19498-19499,19501,19504,19506-19507,19517-19519,19525,19542-19543,19548,19550,19555,19557,19560-19561,19565-19566,19571-19573,19582-19585,19592-19593,19599,19601-19602,19613,19646,19657-19659,19665,19671-19674 via svnmerge from
https://svn.jboss.org/repos/richfaces/trunk
Modified: branches/RF-7817/bom/pom.xml
===================================================================
--- branches/RF-7817/bom/pom.xml 2010-10-27 16:28:07 UTC (rev 19704)
+++ branches/RF-7817/bom/pom.xml 2010-10-27 16:32:43 UTC (rev 19705)
@@ -139,12 +139,12 @@
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-api</artifactId>
- <version>2.0.1</version>
+ <version>2.0.2</version>
</dependency>
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-impl</artifactId>
- <version>2.0.1</version>
+ <version>2.0.2</version>
</dependency>
<!-- Misc -->
Modified: branches/RF-7817/dist/readme-examples.txt
===================================================================
--- branches/RF-7817/dist/readme-examples.txt 2010-10-27 16:28:07 UTC (rev 19704)
+++ branches/RF-7817/dist/readme-examples.txt 2010-10-27 16:32:43 UTC (rev 19705)
@@ -1,6 +1,6 @@
RichFaces 4.0 Examples
=========================================================
-Version 4.0.0.M2
+Version 4.0.0.M3
This software is distributed under the terms of the FSF Lesser Gnu Public License (see lgpl.txt).
@@ -21,11 +21,11 @@
More additional information about build profiles for concrete applications and working with them - inside readme's for application itself.
-NEW for M2: richfaces-showcase contains readme.txt which shows how to publish the application to Google Application Engine.
+NOTE: richfaces-showcase contains readme.txt which shows how to publish the application to Google Application Engine.
Using IDE to work with examples
-------------------------------
- *You could use Jboss Tools with m2eclipse plugin and just import the examples as maven-based projects.
+ *You could use JBoss Tools with m2eclipse plugin and just import the examples as maven-based projects.
*Or if you have not using m2eclipse - execute:
mvn eclipse:ecllipse
Modified: branches/RF-7817/dist/readme-ui.txt
===================================================================
--- branches/RF-7817/dist/readme-ui.txt 2010-10-27 16:28:07 UTC (rev 19704)
+++ branches/RF-7817/dist/readme-ui.txt 2010-10-27 16:32:43 UTC (rev 19705)
@@ -1,6 +1,6 @@
RichFaces - Ajax enabled JSF 2.0 component library
=========================================================
-Version 4.0.0.M2
+Version 4.0.0.M3
This software is distributed under the terms of the FSF Lesser Gnu Public License (see lgpl.txt).
@@ -8,18 +8,18 @@
-------------------------------
1) Put RichFaces libraries and its dependencies in your application libraries folder:
- 1.1) richfaces-core-api-4.0.0.20100824-M2.jar
- 1.2) richfaces-core-impl-4.0.0.20100824-M2.jar
- 1.3) richfaces-components-api-4.0.0.20100824-M2.jar
- 1.4) richfaces-components-ui-4.0.0.20100824-M2.jar
+ 1.1) richfaces-core-api-4.0.0.20101004-M3.jar
+ 1.2) richfaces-core-impl-4.0.0.20101004-M3.jar
+ 1.3) richfaces-components-api-4.0.0.20101004-M3.jar
+ 1.4) richfaces-components-ui-4.0.0.20101004-M3.jar
1.5) sac-1.3, cssparser-0.9.5 - required for components CSS work
1.6) google-guava-r06 - core runtime dependency.
- 1.7) annotations.jar from org.richfaces.cdk . It's optional and should be added only if some RichFaces components will be
- created/accessed dynamically from some appication actions/listeners.
+ 1.7) annotations.jar from org.richfaces.cdk
+ - It's optional and only needs to be added if RichFaces components will be
+ created/accessed dynamically in your apps actions/listeners.
For optimal performance it's recommended to add one of these caching frameworks to application classpath: EhCache, JBoss Cache, OsCache.
-
2) As opposed to the previous 3.x.y versions of RichFaces, no special configuration steps are necessary.
You don't need to modify web.xml or faces-config.xml
@@ -27,8 +27,8 @@
Use xmlns:a4j="http://richfaces.org/a4j" namespace for core components
Use xmlns:rich="http://richfaces.org/rich" namespace for rich components
-4) Add one of the available RichFaces 4.0.M2 components to your page and try it!
- 4.1) Take a look at the RichFaces examples for assistance with usage.
+4) Add one of the available RichFaces 4.0.M3 components to your page and try it!
+4.1) Take a look at the RichFaces examples for assistance with usage.
Available Components/Behaviors/Tags/Functions
@@ -81,21 +81,25 @@
---------------------------------
Output:
---------------------------------
+rich:collapsiblePanel
rich:panel
rich:popupPanel
+rich:tabPanel
rich:togglePanel
rich:toggleControl
rich:togglePanelItem
rich:itemChangeListener
rich:accordion
rich:accordionItem
+rich:progressBar
---------------------------------
-Output:
+Input:
---------------------------------
rich:autocomplete
rich:inplaceInput
rich:inputNumberSlider
+rich:inputNumberSpinner
Learn more
----------
Modified: branches/RF-7817/parent/pom.xml
===================================================================
--- branches/RF-7817/parent/pom.xml 2010-10-27 16:28:07 UTC (rev 19704)
+++ branches/RF-7817/parent/pom.xml 2010-10-27 16:32:43 UTC (rev 19705)
@@ -163,10 +163,11 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
- <version>2.3</version>
+ <version>2.5</version>
<configuration>
- <configLocation>richfaces-checkstyle/richfaces-checkstyle.xml
- </configLocation>
+ <configLocation>richfaces-checkstyle/richfaces-checkstyle.xml</configLocation>
+ <logViolationsToConsole>true</logViolationsToConsole>
+ <violationSeverity>error</violationSeverity>
</configuration>
<executions>
<execution>
@@ -378,13 +379,13 @@
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-api</artifactId>
- <version>2.0.2-SNAPSHOT</version>
+ <version>2.0.3-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-impl</artifactId>
- <version>2.0.2-SNAPSHOT</version>
+ <version>2.0.3-SNAPSHOT</version>
<scope>test</scope>
</dependency>
</dependencies>
Copied: branches/RF-7817/svn.externals (from rev 19674, trunk/svn.externals)
===================================================================
--- branches/RF-7817/svn.externals (rev 0)
+++ branches/RF-7817/svn.externals 2010-10-27 16:32:43 UTC (rev 19705)
@@ -0,0 +1,3 @@
+build/parent http://anonsvn.jboss.org/repos/richfaces/modules/build/parent/tags/richfa...
+build/checkstyle http://anonsvn.jboss.org/repos/richfaces/modules/build/resources/tags/ric...
+build/faces-shade-transformers https://svn.jboss.org/repos/richfaces/modules/build/resources/tags/richfa...
\ No newline at end of file
Modified: branches/RF-7817/ui/dist/richfaces-components-api/pom.xml
===================================================================
--- branches/RF-7817/ui/dist/richfaces-components-api/pom.xml 2010-10-27 16:28:07 UTC (rev 19704)
+++ branches/RF-7817/ui/dist/richfaces-components-api/pom.xml 2010-10-27 16:32:43 UTC (rev 19705)
@@ -66,10 +66,6 @@
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
</dependency>
- <dependency>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- </dependency>
<dependency>
<groupId>javax.servlet</groupId>
Modified: branches/RF-7817/ui/dist/richfaces-components-ui/pom.xml
===================================================================
--- branches/RF-7817/ui/dist/richfaces-components-ui/pom.xml 2010-10-27 16:28:07 UTC (rev 19704)
+++ branches/RF-7817/ui/dist/richfaces-components-ui/pom.xml 2010-10-27 16:32:43 UTC (rev 19705)
@@ -78,10 +78,6 @@
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-impl</artifactId>
</dependency>
- <dependency>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- </dependency>
<dependency>
<groupId>javax.servlet</groupId>
@@ -137,6 +133,9 @@
</taglibs>
</transformer>
<transformer implementation="org.richfaces.build.shade.resource.FacesConfigXmlResourceTransformer" />
+ <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+ <resource>META-INF/richfaces/resource-mappings.properties</resource>
+ </transformer>
</transformers>
</configuration>
</execution>
14 years, 3 months
JBoss Rich Faces SVN: r19704 - in branches/RF-7817/examples: input-demo/src/main/java/org/richfaces/demo and 34 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-10-27 12:28:07 -0400 (Wed, 27 Oct 2010)
New Revision: 19704
Added:
branches/RF-7817/examples/input-demo/src/main/java/org/richfaces/demo/InputBean.java
branches/RF-7817/examples/input-demo/src/main/webapp/examples/
branches/RF-7817/examples/input-demo/src/main/webapp/examples/autocomplete.xhtml
branches/RF-7817/examples/input-demo/src/main/webapp/examples/inplaceInput.xhtml
branches/RF-7817/examples/input-demo/src/main/webapp/examples/inplaceSelect.xhtml
branches/RF-7817/examples/input-demo/src/main/webapp/examples/inputNumberSlider.xhtml
branches/RF-7817/examples/input-demo/src/main/webapp/examples/inputNumberSpinner.xhtml
branches/RF-7817/examples/input-demo/src/main/webapp/examples/select.xhtml
branches/RF-7817/examples/input-demo/src/main/webapp/qunit/
branches/RF-7817/examples/input-demo/src/main/webapp/qunit/autocomplete-qunit.xhtml
branches/RF-7817/examples/input-demo/src/main/webapp/resources/
branches/RF-7817/examples/input-demo/src/main/webapp/resources/qunit/
branches/RF-7817/examples/input-demo/src/main/webapp/resources/qunit/qunit.css
branches/RF-7817/examples/input-demo/src/main/webapp/resources/qunit/qunit.js
branches/RF-7817/examples/input-demo/src/main/webapp/resources/qunit/richfaces-qunit.js
branches/RF-7817/examples/input-demo/src/main/webapp/resources/tests/
branches/RF-7817/examples/input-demo/src/main/webapp/resources/tests/autocomplete-qunit.js
branches/RF-7817/examples/input-demo/src/main/webapp/templates/
branches/RF-7817/examples/input-demo/src/main/webapp/templates/template.xhtml
branches/RF-7817/examples/output-demo/src/main/java/org/richfaces/ModalPanel.java
branches/RF-7817/examples/output-demo/src/main/java/org/richfaces/ProgressBarBean.java
branches/RF-7817/examples/output-demo/src/main/java/org/richfaces/SkinBean.java
branches/RF-7817/examples/output-demo/src/main/webapp/examples/panel.xhtml
branches/RF-7817/examples/output-demo/src/main/webapp/examples/popupPanel.xhtml
branches/RF-7817/examples/output-demo/src/main/webapp/examples/progressbar.xhtml
branches/RF-7817/examples/output-demo/src/main/webapp/examples/tabPanel.xhtml
branches/RF-7817/examples/output-demo/src/main/webapp/qunit/tab.xhtml
branches/RF-7817/examples/output-demo/src/main/webapp/qunit/tabPanel.xhtml
branches/RF-7817/examples/output-demo/src/main/webapp/resources/tests/richfaces-accordion-item-qunit.js
branches/RF-7817/examples/output-demo/src/main/webapp/resources/tests/richfaces-tab-panel-qunit.js
branches/RF-7817/examples/output-demo/src/main/webapp/resources/tests/richfaces-tab-qunit.js
branches/RF-7817/examples/richfaces-showcase/src/main/java/org/richfaces/demo/progressBar/
branches/RF-7817/examples/richfaces-showcase/src/main/java/org/richfaces/demo/progressBar/ProgressBarBean.java
branches/RF-7817/examples/richfaces-showcase/src/main/resources-gae/
branches/RF-7817/examples/richfaces-showcase/src/main/resources-gae/META-INF/
branches/RF-7817/examples/richfaces-showcase/src/main/resources-gae/META-INF/jdoconfig.xml
branches/RF-7817/examples/richfaces-showcase/src/main/resources-gae/META-INF/persistence.xml
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/collapsiblePanel/
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/collapsiblePanel/samples/
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/collapsiblePanel/samples/simple-sample.xhtml
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/collapsiblePanel/simple.xhtml
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/inputNumberSpinner/
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/inputNumberSpinner/samples/
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/inputNumberSpinner/samples/spinners-sample.xhtml
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/inputNumberSpinner/spinners.xhtml
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/ajaxProgressBar.xhtml
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/clientProgressBar.xhtml
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples/
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples/ajaxProgressBar-sample.xhtml
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples/clientProgressBar-sample.xhtml
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/headerCustomization.xhtml
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/samples/
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/samples/headerCustomization-sample.xhtml
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/samples/simple-sample.xhtml
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/samples/valueManagement-sample.xhtml
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/simple.xhtml
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/valueManagement.xhtml
Removed:
branches/RF-7817/examples/input-demo/src/main/webapp/autocomplete.xhtml
branches/RF-7817/examples/input-demo/src/main/webapp/examples/autocomplete.xhtml
branches/RF-7817/examples/input-demo/src/main/webapp/examples/inplaceInput.xhtml
branches/RF-7817/examples/input-demo/src/main/webapp/examples/inplaceSelect.xhtml
branches/RF-7817/examples/input-demo/src/main/webapp/examples/inputNumberSlider.xhtml
branches/RF-7817/examples/input-demo/src/main/webapp/examples/inputNumberSpinner.xhtml
branches/RF-7817/examples/input-demo/src/main/webapp/examples/select.xhtml
branches/RF-7817/examples/input-demo/src/main/webapp/inplaceInput.xhtml
branches/RF-7817/examples/input-demo/src/main/webapp/inputNumberSlider.xhtml
branches/RF-7817/examples/input-demo/src/main/webapp/qunit/autocomplete-qunit.xhtml
branches/RF-7817/examples/input-demo/src/main/webapp/resources/qunit/
branches/RF-7817/examples/input-demo/src/main/webapp/resources/qunit/qunit.css
branches/RF-7817/examples/input-demo/src/main/webapp/resources/qunit/qunit.js
branches/RF-7817/examples/input-demo/src/main/webapp/resources/qunit/richfaces-qunit.js
branches/RF-7817/examples/input-demo/src/main/webapp/resources/tests/
branches/RF-7817/examples/input-demo/src/main/webapp/resources/tests/autocomplete-qunit.js
branches/RF-7817/examples/input-demo/src/main/webapp/templates/template.xhtml
branches/RF-7817/examples/richfaces-showcase/src/main/java/org/richfaces/demo/progressBar/ProgressBarBean.java
branches/RF-7817/examples/richfaces-showcase/src/main/resources-gae/META-INF/
branches/RF-7817/examples/richfaces-showcase/src/main/resources-gae/META-INF/jdoconfig.xml
branches/RF-7817/examples/richfaces-showcase/src/main/resources-gae/META-INF/persistence.xml
branches/RF-7817/examples/richfaces-showcase/src/main/resources/META-INF/jdoconfig.xml
branches/RF-7817/examples/richfaces-showcase/src/main/resources/META-INF/persistence.xml
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/collapsiblePanel/samples/
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/collapsiblePanel/samples/simple-sample.xhtml
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/collapsiblePanel/simple.xhtml
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/inputNumberSpinner/samples/
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/inputNumberSpinner/samples/spinners-sample.xhtml
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/inputNumberSpinner/spinners.xhtml
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/ajaxProgressBar.xhtml
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/clientProgressBar.xhtml
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples/
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples/ajaxProgressBar-sample.xhtml
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples/clientProgressBar-sample.xhtml
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/headerCustomization.xhtml
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/samples/
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/samples/headerCustomization-sample.xhtml
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/samples/simple-sample.xhtml
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/samples/valueManagement-sample.xhtml
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/simple.xhtml
branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/valueManagement.xhtml
Modified:
branches/RF-7817/examples/input-demo/pom.xml
branches/RF-7817/examples/input-demo/src/main/java/org/richfaces/demo/AutoCompleteBean.java
branches/RF-7817/examples/input-demo/src/main/java/org/richfaces/demo/InputNumberSliderBean.java
branches/RF-7817/examples/input-demo/src/main/webapp/WEB-INF/faces-config.xml
branches/RF-7817/examples/input-demo/src/main/webapp/index.xhtml
branches/RF-7817/examples/iteration-demo/src/main/webapp/dataGrid.xhtml
branches/RF-7817/examples/output-demo/pom.xml
branches/RF-7817/examples/output-demo/src/main/webapp/WEB-INF/faces-config.xml
branches/RF-7817/examples/output-demo/src/main/webapp/WEB-INF/web.xml
branches/RF-7817/examples/output-demo/src/main/webapp/templates/template.xhtml
branches/RF-7817/examples/parent/pom.xml
branches/RF-7817/examples/richfaces-showcase/pom.xml
branches/RF-7817/examples/richfaces-showcase/readme.txt
branches/RF-7817/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml
Log:
Merged revisions 19156-19157,19159-19160,19176,19186-19187,19190,19194,19196,19199,19203-19204,19231-19234,19248-19249,19255-19256,19258-19262,19276,19279-19281,19283,19285,19291-19299,19307,19312,19315,19318-19319,19325,19341-19342,19345-19351,19353-19355,19358-19359,19364,19367-19369,19371,19374-19377,19379-19385,19387,19393-19394,19400,19402-19404,19418-19422,19426,19430-19431,19434-19441,19443-19444,19446,19468,19470,19477,19491,19498-19499,19501,19504,19506-19507,19517-19519,19525,19542-19543,19548,19550,19555,19557,19560-19561,19565-19566,19571-19573,19582-19585,19592-19593,19599,19601-19602,19613,19646,19657-19659,19665,19671-19674 via svnmerge from
https://svn.jboss.org/repos/richfaces/trunk
Modified: branches/RF-7817/examples/input-demo/pom.xml
===================================================================
--- branches/RF-7817/examples/input-demo/pom.xml 2010-10-27 16:17:45 UTC (rev 19703)
+++ branches/RF-7817/examples/input-demo/pom.xml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -17,7 +17,7 @@
<packaging>war</packaging>
<build>
- <finalName>${artifactId}-${project.version}</finalName>
+ <finalName>${project.artifactId}-${project.version}</finalName>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
Modified: branches/RF-7817/examples/input-demo/src/main/java/org/richfaces/demo/AutoCompleteBean.java
===================================================================
--- branches/RF-7817/examples/input-demo/src/main/java/org/richfaces/demo/AutoCompleteBean.java 2010-10-27 16:17:45 UTC (rev 19703)
+++ branches/RF-7817/examples/input-demo/src/main/java/org/richfaces/demo/AutoCompleteBean.java 2010-10-27 16:28:07 UTC (rev 19704)
@@ -64,6 +64,17 @@
}
}
+ private String value;
+
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
private String mode = "lazyClient";
public String getMode() {
Copied: branches/RF-7817/examples/input-demo/src/main/java/org/richfaces/demo/InputBean.java (from rev 19674, trunk/examples/input-demo/src/main/java/org/richfaces/demo/InputBean.java)
===================================================================
--- branches/RF-7817/examples/input-demo/src/main/java/org/richfaces/demo/InputBean.java (rev 0)
+++ branches/RF-7817/examples/input-demo/src/main/java/org/richfaces/demo/InputBean.java 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,20 @@
+package org.richfaces.demo;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+
+
+@SessionScoped
+@ManagedBean(name = "inputBean")
+public class InputBean {
+
+ private String value;
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+}
Modified: branches/RF-7817/examples/input-demo/src/main/java/org/richfaces/demo/InputNumberSliderBean.java
===================================================================
--- branches/RF-7817/examples/input-demo/src/main/java/org/richfaces/demo/InputNumberSliderBean.java 2010-10-27 16:17:45 UTC (rev 19703)
+++ branches/RF-7817/examples/input-demo/src/main/java/org/richfaces/demo/InputNumberSliderBean.java 2010-10-27 16:28:07 UTC (rev 19704)
@@ -21,6 +21,8 @@
*/
package org.richfaces.demo;
+import java.util.Date;
+
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
@@ -160,4 +162,8 @@
public int getInputSize() {
return inputSize;
}
+
+ public Date getDate() {
+ return new Date();
+ }
}
Modified: branches/RF-7817/examples/input-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- branches/RF-7817/examples/input-demo/src/main/webapp/WEB-INF/faces-config.xml 2010-10-27 16:17:45 UTC (rev 19703)
+++ branches/RF-7817/examples/input-demo/src/main/webapp/WEB-INF/faces-config.xml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -3,5 +3,36 @@
<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
- version="2.0">
+ version="2.0">
+
+ <navigation-rule>
+ <!-- Examples -->
+ <navigation-case>
+ <from-outcome>inplaceInput</from-outcome>
+ <to-view-id>/examples/inplaceInput.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>inplaceSelect</from-outcome>
+ <to-view-id>/examples/inplaceSelect.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>inputNumberSlider</from-outcome>
+ <to-view-id>/examples/inputNumberSlider.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>inputNumberSpinner</from-outcome>
+ <to-view-id>/examples/inputNumberSpinner.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>autocomplete</from-outcome>
+ <to-view-id>/examples/autocomplete.xhtml</to-view-id>
+ </navigation-case>
+
+ <!-- QUnit -->
+ <navigation-case>
+ <from-outcome>qunit/autocomplete</from-outcome>
+ <to-view-id>/qunit/autocomplete-qunit.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
</faces-config>
Deleted: branches/RF-7817/examples/input-demo/src/main/webapp/autocomplete.xhtml
===================================================================
--- branches/RF-7817/examples/input-demo/src/main/webapp/autocomplete.xhtml 2010-10-27 16:17:45 UTC (rev 19703)
+++ branches/RF-7817/examples/input-demo/src/main/webapp/autocomplete.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,65 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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"
- xmlns:input="http://richfaces.org/input">
-<f:view contentType="text/html" />
-
-<h:head>
- <title>Richfaces ComboBox</title>
-</h:head>
-
-<h:body style="margin: 30px;">
-
- <h:form id="form">
- <h:selectOneMenu value="#{autoCompleteBean.mode}" onchange="submit()">
- <f:selectItem itemValue="lazyClient"/>
- <f:selectItem itemValue="client"/>
- <f:selectItem itemValue="cachedAjax"/>
- <f:selectItem itemValue="ajax"/>
- </h:selectOneMenu>
- <div style="height: 300px; width: 300px; overflow: auto;">Text
- block text block text block text block text block text block text
- block text block
-
- <input:autocomplete clientFilter="if(subString.length>1) if(value.indexOf(subString)!=-1) return true;" mode="#{autoCompleteBean.mode}" minChars="2" autocompleteMethod="#{autoCompleteBean.autocomplete}" var="country" fetchValue="#{country.name}" showButton="true">
- #{country.name} #{country.iso} #{country.domain}
- </input:autocomplete>
-
- <br />
- <select style="width: 200px" name="select">
- <option>ccccc</option>
- </select> text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block
- </div>
- </h:form>
-</h:body>
-</html>
Copied: branches/RF-7817/examples/input-demo/src/main/webapp/examples (from rev 19674, trunk/examples/input-demo/src/main/webapp/examples)
Deleted: branches/RF-7817/examples/input-demo/src/main/webapp/examples/autocomplete.xhtml
===================================================================
--- trunk/examples/input-demo/src/main/webapp/examples/autocomplete.xhtml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/examples/input-demo/src/main/webapp/examples/autocomplete.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,90 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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"
- xmlns:input="http://richfaces.org/input"
- xmlns:a4j="http://richfaces.org/a4j">
-<f:view contentType="text/html" />
-
-<h:head>
- <title>Richfaces Autocomplete</title>
-</h:head>
-
-<h:body style="margin: 30px;">
-
-<ui:composition template="/templates/template.xhtml">
-
- <ui:define name="title">Autocomplete Example</ui:define>
- <ui:define name="body_head">Autocomplete Example</ui:define>
-
- <ui:define name="body">
-
- <h:form id="form">
- <h:selectOneMenu value="#{autoCompleteBean.mode}" onchange="submit()">
- <f:selectItem itemValue="lazyClient"/>
- <f:selectItem itemValue="client"/>
- <f:selectItem itemValue="cachedAjax"/>
- <f:selectItem itemValue="ajax"/>
- </h:selectOneMenu><br/>
- <div style="height: 300px; width: 300px; overflow: auto; float:left;">Text
- block text block text block text block text block text block text
- block text block
-
- <input:autocomplete autofill="false" id="myAutocomplete" clientFilter="if(subString.length>1) if(value.indexOf(subString)!=-1) return true;" mode="#{autoCompleteBean.mode}" minChars="2" autocompleteMethod="#{autoCompleteBean.autocomplete}" var="country" fetchValue="#{country.name}" showButton="true"
- value = "#{autoCompleteBean.value}"
- onchange="return onEvent.call(this, event);" onselectitem="return onEvent.call(this, event);" onblur="return onEvent.call(this, event);" onfocus="return onEvent.call(this, event);">
- #{country.name} #{country.iso} #{country.domain}
- <a4j:ajax event="change" render="output"/>
- </input:autocomplete>
- <br/><br/>
- Your selection: <h:outputText id="output" value="#{autoCompleteBean.value}"/>
- <script type="text/javascript">
- onEvent = function(event, element, data){
- RichFaces.log.info("jQuery Event: "+(event instanceof jQuery.Event)+"; event: "+event.type+"; data:"+(data || (event['rich']||{})['data'])+"; this.id:"+this.id+"; component:"+ (event['rich']||{})['component']||RichFaces.$(this.id));
- };
- RichFaces.Event.bindById("form:myAutocomplete", "selectitem change blur focus", onEvent);
- </script>
- <br />
- <select style="width: 200px" name="select">
- <option>ccccc</option>
- </select> text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block text block text block text block text
- block text block text block
- </div>
- <div>
- <a4j:log mode="inline"></a4j:log>
- </div>
- </h:form>
-
- </ui:define>
-</ui:composition>
-
-</h:body>
-</html>
Copied: branches/RF-7817/examples/input-demo/src/main/webapp/examples/autocomplete.xhtml (from rev 19674, trunk/examples/input-demo/src/main/webapp/examples/autocomplete.xhtml)
===================================================================
--- branches/RF-7817/examples/input-demo/src/main/webapp/examples/autocomplete.xhtml (rev 0)
+++ branches/RF-7817/examples/input-demo/src/main/webapp/examples/autocomplete.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,90 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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"
+ xmlns:input="http://richfaces.org/input"
+ xmlns:a4j="http://richfaces.org/a4j">
+<f:view contentType="text/html" />
+
+<h:head>
+ <title>Richfaces Autocomplete</title>
+</h:head>
+
+<h:body style="margin: 30px;">
+
+<ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="title">Autocomplete Example</ui:define>
+ <ui:define name="body_head">Autocomplete Example</ui:define>
+
+ <ui:define name="body">
+
+ <h:form id="form">
+ <h:selectOneMenu value="#{autoCompleteBean.mode}" onchange="submit()">
+ <f:selectItem itemValue="lazyClient"/>
+ <f:selectItem itemValue="client"/>
+ <f:selectItem itemValue="cachedAjax"/>
+ <f:selectItem itemValue="ajax"/>
+ </h:selectOneMenu><br/>
+ <div style="height: 300px; width: 300px; overflow: auto; float:left;">Text
+ block text block text block text block text block text block text
+ block text block
+
+ <input:autocomplete autofill="false" id="myAutocomplete" clientFilter="if(subString.length>1) if(value.indexOf(subString)!=-1) return true;" mode="#{autoCompleteBean.mode}" minChars="2" autocompleteMethod="#{autoCompleteBean.autocomplete}" var="country" fetchValue="#{country.name}" showButton="true"
+ value = "#{autoCompleteBean.value}"
+ onchange="return onEvent.call(this, event);" onselectitem="return onEvent.call(this, event);" onblur="return onEvent.call(this, event);" onfocus="return onEvent.call(this, event);">
+ #{country.name} #{country.iso} #{country.domain}
+ <a4j:ajax event="change" render="output"/>
+ </input:autocomplete>
+ <br/><br/>
+ Your selection: <h:outputText id="output" value="#{autoCompleteBean.value}"/>
+ <script type="text/javascript">
+ onEvent = function(event, element, data){
+ RichFaces.log.info("jQuery Event: "+(event instanceof jQuery.Event)+"; event: "+event.type+"; data:"+(data || (event['rich']||{})['data'])+"; this.id:"+this.id+"; component:"+ (event['rich']||{})['component']||RichFaces.$(this.id));
+ };
+ RichFaces.Event.bindById("form:myAutocomplete", "selectitem change blur focus", onEvent);
+ </script>
+ <br />
+ <select style="width: 200px" name="select">
+ <option>ccccc</option>
+ </select> text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block
+ </div>
+ <div>
+ <a4j:log mode="inline"></a4j:log>
+ </div>
+ </h:form>
+
+ </ui:define>
+</ui:composition>
+
+</h:body>
+</html>
Deleted: branches/RF-7817/examples/input-demo/src/main/webapp/examples/inplaceInput.xhtml
===================================================================
--- trunk/examples/input-demo/src/main/webapp/examples/inplaceInput.xhtml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/examples/input-demo/src/main/webapp/examples/inplaceInput.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,20 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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"
- xmlns:in="http://richfaces.org/input">
-<f:view contentType="text/html" />
-
-<h:head>
- <title>InplaceInput</title>
-</h:head>
-
-<h:body>
- <h:form id="form">
- <in:inplaceInput showControls="true" value="New York">
- </in:inplaceInput>
- <h:commandButton value="submit"/>
- </h:form>
-</h:body>
-</html>
Copied: branches/RF-7817/examples/input-demo/src/main/webapp/examples/inplaceInput.xhtml (from rev 19674, trunk/examples/input-demo/src/main/webapp/examples/inplaceInput.xhtml)
===================================================================
--- branches/RF-7817/examples/input-demo/src/main/webapp/examples/inplaceInput.xhtml (rev 0)
+++ branches/RF-7817/examples/input-demo/src/main/webapp/examples/inplaceInput.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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"
+ xmlns:in="http://richfaces.org/input">
+<f:view contentType="text/html" />
+
+<h:head>
+ <title>InplaceInput</title>
+</h:head>
+
+<h:body>
+ <h:form id="form">
+ <in:inplaceInput showControls="true" value="New York">
+ </in:inplaceInput>
+ <h:commandButton value="submit"/>
+ </h:form>
+</h:body>
+</html>
Deleted: branches/RF-7817/examples/input-demo/src/main/webapp/examples/inplaceSelect.xhtml
===================================================================
--- trunk/examples/input-demo/src/main/webapp/examples/inplaceSelect.xhtml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/examples/input-demo/src/main/webapp/examples/inplaceSelect.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,35 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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"
- xmlns:in="http://richfaces.org/input">
-<f:view contentType="text/html" />
-
-<h:head>
- <title>InplaceSelect</title>
-</h:head>
-
-
-<h:body>
- <h:form id="form">
- <div id="scroll" style="width: 400px; height:200px; overflow:auto;" >
- <fieldset>
- <legend>InplaceSelect Test App</legend>
- Fresh off his victory in the Florida primary, Sen. John McCain is poised to take another big prize. Former
- <in:inplaceSelect defaultLabel="Edit Text" value="#{inputBean.value}">
- <f:selectItem itemLabel="Label#1" itemValue="Value#1"/>
- <f:selectItem itemLabel="Label#2" itemValue="Value#2"/>
- <f:selectItem itemLabel="Label#3" itemValue="Value#3"/>
- <f:selectItem itemLabel="Label#4" itemValue="Value#4"/>
- </in:inplaceSelect>
- Mayor Rudy Giuliani plans to drop out and endorse McCain, two GOP sources said. That would give McCain added momentum heading into a debate Wednesday and next week's Super Tuesday contests
- </fieldset>
- <h:commandButton value="submit"></h:commandButton>
- </div>
- <h:panelGroup id="out">
- <h:outputText value="Entered Value: #{inputBean.value}"/>
- </h:panelGroup>
- </h:form>
-</h:body>
-</html>
Copied: branches/RF-7817/examples/input-demo/src/main/webapp/examples/inplaceSelect.xhtml (from rev 19674, trunk/examples/input-demo/src/main/webapp/examples/inplaceSelect.xhtml)
===================================================================
--- branches/RF-7817/examples/input-demo/src/main/webapp/examples/inplaceSelect.xhtml (rev 0)
+++ branches/RF-7817/examples/input-demo/src/main/webapp/examples/inplaceSelect.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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"
+ xmlns:in="http://richfaces.org/input">
+<f:view contentType="text/html" />
+
+<h:head>
+ <title>InplaceSelect</title>
+</h:head>
+
+
+<h:body>
+ <h:form id="form">
+ <div id="scroll" style="width: 400px; height:200px; overflow:auto;" >
+ <fieldset>
+ <legend>InplaceSelect Test App</legend>
+ Fresh off his victory in the Florida primary, Sen. John McCain is poised to take another big prize. Former
+ <in:inplaceSelect defaultLabel="Edit Text" value="#{inputBean.value}">
+ <f:selectItem itemLabel="Label#1" itemValue="Value#1"/>
+ <f:selectItem itemLabel="Label#2" itemValue="Value#2"/>
+ <f:selectItem itemLabel="Label#3" itemValue="Value#3"/>
+ <f:selectItem itemLabel="Label#4" itemValue="Value#4"/>
+ </in:inplaceSelect>
+ Mayor Rudy Giuliani plans to drop out and endorse McCain, two GOP sources said. That would give McCain added momentum heading into a debate Wednesday and next week's Super Tuesday contests
+ </fieldset>
+ <h:commandButton value="submit"></h:commandButton>
+ </div>
+ <h:panelGroup id="out">
+ <h:outputText value="Entered Value: #{inputBean.value}"/>
+ </h:panelGroup>
+ </h:form>
+</h:body>
+</html>
Deleted: branches/RF-7817/examples/input-demo/src/main/webapp/examples/inputNumberSlider.xhtml
===================================================================
--- trunk/examples/input-demo/src/main/webapp/examples/inputNumberSlider.xhtml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/examples/input-demo/src/main/webapp/examples/inputNumberSlider.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,121 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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"
- xmlns:ins="http://richfaces.org/input">
-<!--
-JBoss, Home of Professional Open Source
-Copyright ${year}, Red Hat, Inc. and individual contributors
-by the @authors tag. See the copyright.txt in the distribution for a
-full listing of individual contributors.
-
-
-This is free software; you can redistribute it and/or modify it
-under the terms of the GNU Lesser General Public License as
-published by the Free Software Foundation; either version 2.1 of
-the License, or (at your option) any later version.
-
-
-This software is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-
-You should have received a copy of the GNU Lesser General Public
-License along with this software; if not, write to the Free
-Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-02110-1301 USA, or see the FSF site: http://www.fsf.org.
--->
- <h:head>
- <title>Richfaces InputNumberSlider Demo</title>
- </h:head>
- <h:body>
- <h:form id="form">
- <h:outputText value="Skin: "/>
- <h:selectOneMenu value="#{skinBean.skin}" onchange="submit();">
- <f:selectItems value="#{skinBean.skins}"/>
- </h:selectOneMenu>
- <br />
- <h:outputText value="Date: "/>
- <h:outputText id="date" value="#{inputNumberSliderBean.date}" />
- <br />
- <ins:inputNumberSlider id="ins" value="#{inputNumberSliderBean.value}" accesskey="#{inputNumberSliderBean.accesskey}" delay="#{inputNumberSliderBean.delay}"
- disabled="#{inputNumberSliderBean.disabled}" enableManualInput="#{inputNumberSliderBean.enableManualInput}"
- inputPosition="#{inputNumberSliderBean.inputPosition}" inputSize="#{inputNumberSliderBean.inputSize}" showArrows="#{inputNumberSliderBean.showArrows}"
- showBoundaryValues="#{inputNumberSliderBean.showBoundaryValues}" showInput="#{inputNumberSliderBean.showInput}"
- showToolTip="#{inputNumberSliderBean.showToolTip}" maxValue="#{inputNumberSliderBean.maxValue}" minValue="#{inputNumberSliderBean.minValue}"
- step="#{inputNumberSliderBean.step}" >
- <f:ajax render="date" />
- </ins:inputNumberSlider>
- <br />
- <h:outputText value="Accesskey: "/>
- <h:inputText value="#{inputNumberSliderBean.accesskey}">
- <f:ajax render="ins"/>
- </h:inputText>
- <br />
- <h:outputText value="EnableManualInput: "/>
- <h:selectBooleanCheckbox value="#{inputNumberSliderBean.enableManualInput}">
- <f:ajax render="ins"/>
- </h:selectBooleanCheckbox>
- <br />
- <h:outputText value="Disabled "/>
- <h:selectBooleanCheckbox value="#{inputNumberSliderBean.disabled}">
- <f:ajax render="ins"/>
- </h:selectBooleanCheckbox>
- <br />
- <h:outputText value="Delay: "/>
- <h:inputText value="#{inputNumberSliderBean.delay}">
- <f:ajax render="ins"/>
- </h:inputText>
- <br />
- <h:outputText value="InputPosition: "/>
- <h:selectOneMenu value="#{inputNumberSliderBean.inputPosition}">
- <f:selectItems value="#{inputNumberSliderBean.positionTypes}"/>
- <f:ajax render="ins"/>
- </h:selectOneMenu>
- <br />
- <h:outputText value="InputSize: "/>
- <h:inputText value="#{inputNumberSliderBean.inputSize}">
- <f:ajax render="ins"/>
- </h:inputText>
- <br />
- <h:outputText value="MaxValue: "/>
- <h:inputText value="#{inputNumberSliderBean.maxValue}">
- <f:ajax render="ins"/>
- </h:inputText>
- <br />
- <h:outputText value="MinValue: "/>
- <h:inputText value="#{inputNumberSliderBean.minValue}">
- <f:ajax render="ins"/>
- </h:inputText>
- <br />
- <h:outputText value="ShowArrows: "/>
- <h:selectBooleanCheckbox value="#{inputNumberSliderBean.showArrows}">
- <f:ajax render="ins"/>
- </h:selectBooleanCheckbox>
- <br />
- <h:outputText value="ShowBoundaryValues: "/>
- <h:selectBooleanCheckbox value="#{inputNumberSliderBean.showBoundaryValues}">
- <f:ajax render="ins"/>
- </h:selectBooleanCheckbox>
- <br />
- <h:outputText value="ShowInput: "/>
- <h:selectBooleanCheckbox value="#{inputNumberSliderBean.showInput}">
- <f:ajax render="ins"/>
- </h:selectBooleanCheckbox>
- <br />
- <h:outputText value="ShowToolTip: "/>
- <h:selectBooleanCheckbox value="#{inputNumberSliderBean.showToolTip}">
- <f:ajax render="ins"/>
- </h:selectBooleanCheckbox>
- <br />
- <h:outputText value="Step: "/>
- <h:inputText value="#{inputNumberSliderBean.step}">
- <f:ajax render="ins"/>
- </h:inputText>
- </h:form>
- </h:body>
-</html>
Copied: branches/RF-7817/examples/input-demo/src/main/webapp/examples/inputNumberSlider.xhtml (from rev 19674, trunk/examples/input-demo/src/main/webapp/examples/inputNumberSlider.xhtml)
===================================================================
--- branches/RF-7817/examples/input-demo/src/main/webapp/examples/inputNumberSlider.xhtml (rev 0)
+++ branches/RF-7817/examples/input-demo/src/main/webapp/examples/inputNumberSlider.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,121 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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"
+ xmlns:ins="http://richfaces.org/input">
+<!--
+JBoss, Home of Professional Open Source
+Copyright ${year}, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+ <h:head>
+ <title>Richfaces InputNumberSlider Demo</title>
+ </h:head>
+ <h:body>
+ <h:form id="form">
+ <h:outputText value="Skin: "/>
+ <h:selectOneMenu value="#{skinBean.skin}" onchange="submit();">
+ <f:selectItems value="#{skinBean.skins}"/>
+ </h:selectOneMenu>
+ <br />
+ <h:outputText value="Date: "/>
+ <h:outputText id="date" value="#{inputNumberSliderBean.date}" />
+ <br />
+ <ins:inputNumberSlider id="ins" value="#{inputNumberSliderBean.value}" accesskey="#{inputNumberSliderBean.accesskey}" delay="#{inputNumberSliderBean.delay}"
+ disabled="#{inputNumberSliderBean.disabled}" enableManualInput="#{inputNumberSliderBean.enableManualInput}"
+ inputPosition="#{inputNumberSliderBean.inputPosition}" inputSize="#{inputNumberSliderBean.inputSize}" showArrows="#{inputNumberSliderBean.showArrows}"
+ showBoundaryValues="#{inputNumberSliderBean.showBoundaryValues}" showInput="#{inputNumberSliderBean.showInput}"
+ showToolTip="#{inputNumberSliderBean.showToolTip}" maxValue="#{inputNumberSliderBean.maxValue}" minValue="#{inputNumberSliderBean.minValue}"
+ step="#{inputNumberSliderBean.step}" >
+ <f:ajax render="date" />
+ </ins:inputNumberSlider>
+ <br />
+ <h:outputText value="Accesskey: "/>
+ <h:inputText value="#{inputNumberSliderBean.accesskey}">
+ <f:ajax render="ins"/>
+ </h:inputText>
+ <br />
+ <h:outputText value="EnableManualInput: "/>
+ <h:selectBooleanCheckbox value="#{inputNumberSliderBean.enableManualInput}">
+ <f:ajax render="ins"/>
+ </h:selectBooleanCheckbox>
+ <br />
+ <h:outputText value="Disabled "/>
+ <h:selectBooleanCheckbox value="#{inputNumberSliderBean.disabled}">
+ <f:ajax render="ins"/>
+ </h:selectBooleanCheckbox>
+ <br />
+ <h:outputText value="Delay: "/>
+ <h:inputText value="#{inputNumberSliderBean.delay}">
+ <f:ajax render="ins"/>
+ </h:inputText>
+ <br />
+ <h:outputText value="InputPosition: "/>
+ <h:selectOneMenu value="#{inputNumberSliderBean.inputPosition}">
+ <f:selectItems value="#{inputNumberSliderBean.positionTypes}"/>
+ <f:ajax render="ins"/>
+ </h:selectOneMenu>
+ <br />
+ <h:outputText value="InputSize: "/>
+ <h:inputText value="#{inputNumberSliderBean.inputSize}">
+ <f:ajax render="ins"/>
+ </h:inputText>
+ <br />
+ <h:outputText value="MaxValue: "/>
+ <h:inputText value="#{inputNumberSliderBean.maxValue}">
+ <f:ajax render="ins"/>
+ </h:inputText>
+ <br />
+ <h:outputText value="MinValue: "/>
+ <h:inputText value="#{inputNumberSliderBean.minValue}">
+ <f:ajax render="ins"/>
+ </h:inputText>
+ <br />
+ <h:outputText value="ShowArrows: "/>
+ <h:selectBooleanCheckbox value="#{inputNumberSliderBean.showArrows}">
+ <f:ajax render="ins"/>
+ </h:selectBooleanCheckbox>
+ <br />
+ <h:outputText value="ShowBoundaryValues: "/>
+ <h:selectBooleanCheckbox value="#{inputNumberSliderBean.showBoundaryValues}">
+ <f:ajax render="ins"/>
+ </h:selectBooleanCheckbox>
+ <br />
+ <h:outputText value="ShowInput: "/>
+ <h:selectBooleanCheckbox value="#{inputNumberSliderBean.showInput}">
+ <f:ajax render="ins"/>
+ </h:selectBooleanCheckbox>
+ <br />
+ <h:outputText value="ShowToolTip: "/>
+ <h:selectBooleanCheckbox value="#{inputNumberSliderBean.showToolTip}">
+ <f:ajax render="ins"/>
+ </h:selectBooleanCheckbox>
+ <br />
+ <h:outputText value="Step: "/>
+ <h:inputText value="#{inputNumberSliderBean.step}">
+ <f:ajax render="ins"/>
+ </h:inputText>
+ </h:form>
+ </h:body>
+</html>
Deleted: branches/RF-7817/examples/input-demo/src/main/webapp/examples/inputNumberSpinner.xhtml
===================================================================
--- trunk/examples/input-demo/src/main/webapp/examples/inputNumberSpinner.xhtml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/examples/input-demo/src/main/webapp/examples/inputNumberSpinner.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,98 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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"
- xmlns:ins="http://richfaces.org/input">
-<!--
-JBoss, Home of Professional Open Source
-Copyright ${year}, Red Hat, Inc. and individual contributors
-by the @authors tag. See the copyright.txt in the distribution for a
-full listing of individual contributors.
-
-
-This is free software; you can redistribute it and/or modify it
-under the terms of the GNU Lesser General Public License as
-published by the Free Software Foundation; either version 2.1 of
-the License, or (at your option) any later version.
-
-
-This software is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-
-You should have received a copy of the GNU Lesser General Public
-License along with this software; if not, write to the Free
-Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-02110-1301 USA, or see the FSF site: http://www.fsf.org.
--->
- <h:head>
- <title>Richfaces InputNumberSlider Demo</title>
- </h:head>
- <h:body>
- <h:form id="form">
- <h:outputText value="Skin: "/>
- <h:selectOneMenu value="#{skinBean.skin}" onchange="submit();">
- <f:selectItems value="#{skinBean.skins}"/>
- </h:selectOneMenu>
- <br />
- <h:outputText value="Date: "/>
- <h:outputText id="date" value="#{inputNumberSliderBean.date}" />
- <br />
- <ins:inputNumberSpinner id="ins" value="#{inputNumberSliderBean.value}" accesskey="#{inputNumberSliderBean.accesskey}" cycled="#{inputNumberSliderBean.showInput}"
- disableBrowserAutoComplete="#{inputNumberSliderBean.showArrows}" disabled="#{inputNumberSliderBean.disabled}" enableManualInput="#{inputNumberSliderBean.enableManualInput}"
- inputSize="#{inputNumberSliderBean.inputSize}" maxValue="#{inputNumberSliderBean.maxValue}" minValue="#{inputNumberSliderBean.minValue}"
- step="#{inputNumberSliderBean.step}">
- <f:ajax render="date" />
- </ins:inputNumberSpinner>
- <br />
- <h:outputText value="Accesskey: " />
- <h:inputText value="#{inputNumberSliderBean.accesskey}">
- <f:ajax render="ins"/>
- </h:inputText>
- <br />
- <h:outputText value="Cycled: "/>
- <h:selectBooleanCheckbox value="#{inputNumberSliderBean.showInput}">
- <f:ajax render="ins"/>
- </h:selectBooleanCheckbox>
- <br />
- <h:outputText value="DisableBrowserAutoComplete: "/>
- <h:selectBooleanCheckbox value="#{inputNumberSliderBean.showArrows}">
- <f:ajax render="ins"/>
- </h:selectBooleanCheckbox>
- <br />
- <h:outputText value="Disabled: "/>
- <h:selectBooleanCheckbox value="#{inputNumberSliderBean.disabled}">
- <f:ajax render="ins"/>
- </h:selectBooleanCheckbox>
- <br />
- <h:outputText value="EnableManualInput: "/>
- <h:selectBooleanCheckbox value="#{inputNumberSliderBean.enableManualInput}">
- <f:ajax render="ins"/>
- </h:selectBooleanCheckbox>
- <br />
- <h:outputText value="InputSize: "/>
- <h:inputText value="#{inputNumberSliderBean.inputSize}">
- <f:ajax render="ins"/>
- </h:inputText>
- <br />
- <h:outputText value="MaxValue: "/>
- <h:inputText value="#{inputNumberSliderBean.maxValue}">
- <f:ajax render="ins"/>
- </h:inputText>
- <br />
- <h:outputText value="MinValue: "/>
- <h:inputText value="#{inputNumberSliderBean.minValue}">
- <f:ajax render="ins"/>
- </h:inputText>
- <br />
- <h:outputText value="Step: "/>
- <h:inputText value="#{inputNumberSliderBean.step}">
- <f:ajax render="ins"/>
- </h:inputText>
- </h:form>
- </h:body>
-</html>
Copied: branches/RF-7817/examples/input-demo/src/main/webapp/examples/inputNumberSpinner.xhtml (from rev 19674, trunk/examples/input-demo/src/main/webapp/examples/inputNumberSpinner.xhtml)
===================================================================
--- branches/RF-7817/examples/input-demo/src/main/webapp/examples/inputNumberSpinner.xhtml (rev 0)
+++ branches/RF-7817/examples/input-demo/src/main/webapp/examples/inputNumberSpinner.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,98 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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"
+ xmlns:ins="http://richfaces.org/input">
+<!--
+JBoss, Home of Professional Open Source
+Copyright ${year}, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+ <h:head>
+ <title>Richfaces InputNumberSlider Demo</title>
+ </h:head>
+ <h:body>
+ <h:form id="form">
+ <h:outputText value="Skin: "/>
+ <h:selectOneMenu value="#{skinBean.skin}" onchange="submit();">
+ <f:selectItems value="#{skinBean.skins}"/>
+ </h:selectOneMenu>
+ <br />
+ <h:outputText value="Date: "/>
+ <h:outputText id="date" value="#{inputNumberSliderBean.date}" />
+ <br />
+ <ins:inputNumberSpinner id="ins" value="#{inputNumberSliderBean.value}" accesskey="#{inputNumberSliderBean.accesskey}" cycled="#{inputNumberSliderBean.showInput}"
+ disableBrowserAutoComplete="#{inputNumberSliderBean.showArrows}" disabled="#{inputNumberSliderBean.disabled}" enableManualInput="#{inputNumberSliderBean.enableManualInput}"
+ inputSize="#{inputNumberSliderBean.inputSize}" maxValue="#{inputNumberSliderBean.maxValue}" minValue="#{inputNumberSliderBean.minValue}"
+ step="#{inputNumberSliderBean.step}">
+ <f:ajax render="date" />
+ </ins:inputNumberSpinner>
+ <br />
+ <h:outputText value="Accesskey: " />
+ <h:inputText value="#{inputNumberSliderBean.accesskey}">
+ <f:ajax render="ins"/>
+ </h:inputText>
+ <br />
+ <h:outputText value="Cycled: "/>
+ <h:selectBooleanCheckbox value="#{inputNumberSliderBean.showInput}">
+ <f:ajax render="ins"/>
+ </h:selectBooleanCheckbox>
+ <br />
+ <h:outputText value="DisableBrowserAutoComplete: "/>
+ <h:selectBooleanCheckbox value="#{inputNumberSliderBean.showArrows}">
+ <f:ajax render="ins"/>
+ </h:selectBooleanCheckbox>
+ <br />
+ <h:outputText value="Disabled: "/>
+ <h:selectBooleanCheckbox value="#{inputNumberSliderBean.disabled}">
+ <f:ajax render="ins"/>
+ </h:selectBooleanCheckbox>
+ <br />
+ <h:outputText value="EnableManualInput: "/>
+ <h:selectBooleanCheckbox value="#{inputNumberSliderBean.enableManualInput}">
+ <f:ajax render="ins"/>
+ </h:selectBooleanCheckbox>
+ <br />
+ <h:outputText value="InputSize: "/>
+ <h:inputText value="#{inputNumberSliderBean.inputSize}">
+ <f:ajax render="ins"/>
+ </h:inputText>
+ <br />
+ <h:outputText value="MaxValue: "/>
+ <h:inputText value="#{inputNumberSliderBean.maxValue}">
+ <f:ajax render="ins"/>
+ </h:inputText>
+ <br />
+ <h:outputText value="MinValue: "/>
+ <h:inputText value="#{inputNumberSliderBean.minValue}">
+ <f:ajax render="ins"/>
+ </h:inputText>
+ <br />
+ <h:outputText value="Step: "/>
+ <h:inputText value="#{inputNumberSliderBean.step}">
+ <f:ajax render="ins"/>
+ </h:inputText>
+ </h:form>
+ </h:body>
+</html>
Deleted: branches/RF-7817/examples/input-demo/src/main/webapp/examples/select.xhtml
===================================================================
--- trunk/examples/input-demo/src/main/webapp/examples/select.xhtml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/examples/input-demo/src/main/webapp/examples/select.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,33 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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"
- xmlns:in="http://richfaces.org/input">
-<f:view contentType="text/html" />
-
-<h:head>
- <title>Select</title>
-</h:head>
-
-
-<h:body>
- <h:form id="form">
- <div id="scroll" style="width: 400px; height:100px; overflow:auto;" >
- <fieldset>
- <legend>Select Test App</legend>
- <in:select defaultLabel="Select Value ..." value="#{inputBean.value}">
- <f:selectItem itemLabel="Label#1" itemValue="Value#1"/>
- <f:selectItem itemLabel="Label#2" itemValue="Value#2"/>
- <f:selectItem itemLabel="Label#3" itemValue="Value#3"/>
- <f:selectItem itemLabel="Label#4" itemValue="Value#4"/>
- </in:select>
- </fieldset>
- <h:commandButton value="submit"></h:commandButton>
- </div>
- <h:panelGroup id="out">
- <h:outputText value="Selected Value: #{inputBean.value}"/>
- </h:panelGroup>
- </h:form>
-</h:body>
-</html>
Copied: branches/RF-7817/examples/input-demo/src/main/webapp/examples/select.xhtml (from rev 19674, trunk/examples/input-demo/src/main/webapp/examples/select.xhtml)
===================================================================
--- branches/RF-7817/examples/input-demo/src/main/webapp/examples/select.xhtml (rev 0)
+++ branches/RF-7817/examples/input-demo/src/main/webapp/examples/select.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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"
+ xmlns:in="http://richfaces.org/input">
+<f:view contentType="text/html" />
+
+<h:head>
+ <title>Select</title>
+</h:head>
+
+
+<h:body>
+ <h:form id="form">
+ <div id="scroll" style="width: 400px; height:100px; overflow:auto;" >
+ <fieldset>
+ <legend>Select Test App</legend>
+ <in:select defaultLabel="Select Value ..." value="#{inputBean.value}">
+ <f:selectItem itemLabel="Label#1" itemValue="Value#1"/>
+ <f:selectItem itemLabel="Label#2" itemValue="Value#2"/>
+ <f:selectItem itemLabel="Label#3" itemValue="Value#3"/>
+ <f:selectItem itemLabel="Label#4" itemValue="Value#4"/>
+ </in:select>
+ </fieldset>
+ <h:commandButton value="submit"></h:commandButton>
+ </div>
+ <h:panelGroup id="out">
+ <h:outputText value="Selected Value: #{inputBean.value}"/>
+ </h:panelGroup>
+ </h:form>
+</h:body>
+</html>
Modified: branches/RF-7817/examples/input-demo/src/main/webapp/index.xhtml
===================================================================
--- branches/RF-7817/examples/input-demo/src/main/webapp/index.xhtml 2010-10-27 16:17:45 UTC (rev 19703)
+++ branches/RF-7817/examples/input-demo/src/main/webapp/index.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -6,25 +6,14 @@
<h:head>
</h:head>
<h:body>
- <h4>Input Components Sample</h4>
- <ul>
- <li><h:link outcome="inplaceInput">rich:inplaceInput</h:link></li>
- <li><h:link outcome="inputNumberSlider">rich:inputNumberSlider</h:link></li>
- <li><h:link outcome="autocomplete">rich:autocomplete</h:link></li>
- </ul>
+<ui:composition template="/templates/template.xhtml">
- <h:form>
- <h:panelGrid columns="3">
- <h:commandButton value="Classic">
- <f:setPropertyActionListener target="#{skinBean.skin}" value="classic" />
- </h:commandButton>
- <h:commandButton value="BlueSky">
- <f:setPropertyActionListener target="#{skinBean.skin}" value="blueSky" />
- </h:commandButton>
- <h:commandButton value="DeepMarine">
- <f:setPropertyActionListener target="#{skinBean.skin}" value="deepMarine" />
- </h:commandButton>
- </h:panelGrid>
- </h:form>
+ <ui:define name="title">RichFaces Sample</ui:define>
+
+ <ui:define name="body">
+ </ui:define>
+
+ <div style="top: auto;"></div>
+</ui:composition>
</h:body>
</html>
\ No newline at end of file
Deleted: branches/RF-7817/examples/input-demo/src/main/webapp/inplaceInput.xhtml
===================================================================
--- branches/RF-7817/examples/input-demo/src/main/webapp/inplaceInput.xhtml 2010-10-27 16:17:45 UTC (rev 19703)
+++ branches/RF-7817/examples/input-demo/src/main/webapp/inplaceInput.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,19 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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"
- xmlns:in="http://richfaces.org/input">
-<f:view contentType="text/html" />
-
-<h:head>
- <title>InplaceInput</title>
-</h:head>
-
-<h:body>
- <h:form id="form">
- <in:inplaceInput showControls="false" value="New York"/>
- <h:commandButton value="submit"/>
- </h:form>
-</h:body>
-</html>
Deleted: branches/RF-7817/examples/input-demo/src/main/webapp/inputNumberSlider.xhtml
===================================================================
--- branches/RF-7817/examples/input-demo/src/main/webapp/inputNumberSlider.xhtml 2010-10-27 16:17:45 UTC (rev 19703)
+++ branches/RF-7817/examples/input-demo/src/main/webapp/inputNumberSlider.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,116 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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"
- xmlns:ins="http://richfaces.org/input">
-<!--
-JBoss, Home of Professional Open Source
-Copyright ${year}, Red Hat, Inc. and individual contributors
-by the @authors tag. See the copyright.txt in the distribution for a
-full listing of individual contributors.
-
-
-This is free software; you can redistribute it and/or modify it
-under the terms of the GNU Lesser General Public License as
-published by the Free Software Foundation; either version 2.1 of
-the License, or (at your option) any later version.
-
-
-This software is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-
-You should have received a copy of the GNU Lesser General Public
-License along with this software; if not, write to the Free
-Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-02110-1301 USA, or see the FSF site: http://www.fsf.org.
--->
- <h:head>
- <title>Richfaces InputNumberSlider Demo</title>
- </h:head>
- <h:body>
- <h:form id="form">
- <h:outputText value="Skin: "/>
- <h:selectOneMenu value="#{skinBean.skin}" onchange="submit();">
- <f:selectItems value="#{skinBean.skins}"/>
- </h:selectOneMenu>
- <br />
- <ins:inputNumberSlider id="ins" value="#{inputNumberSliderBean.value}" accesskey="#{inputNumberSliderBean.accesskey}" delay="#{inputNumberSliderBean.delay}"
- disabled="#{inputNumberSliderBean.disabled}" enableManualInput="#{inputNumberSliderBean.enableManualInput}"
- inputPosition="#{inputNumberSliderBean.inputPosition}" inputSize="#{inputNumberSliderBean.inputSize}" showArrows="#{inputNumberSliderBean.showArrows}"
- showBoundaryValues="#{inputNumberSliderBean.showBoundaryValues}" showInput="#{inputNumberSliderBean.showInput}"
- showToolTip="#{inputNumberSliderBean.showToolTip}" maxValue="#{inputNumberSliderBean.maxValue}" minValue="#{inputNumberSliderBean.minValue}"
- step="#{inputNumberSliderBean.step}" />
- <br />
- <h:outputText value="Accesskey: "/>
- <h:inputText value="#{inputNumberSliderBean.accesskey}">
- <f:ajax render="ins"/>
- </h:inputText>
- <br />
- <h:outputText value="EnableManualInput: "/>
- <h:selectBooleanCheckbox value="#{inputNumberSliderBean.enableManualInput}">
- <f:ajax render="ins"/>
- </h:selectBooleanCheckbox>
- <br />
- <h:outputText value="Disabled "/>
- <h:selectBooleanCheckbox value="#{inputNumberSliderBean.disabled}">
- <f:ajax render="ins"/>
- </h:selectBooleanCheckbox>
- <br />
- <h:outputText value="Delay: "/>
- <h:inputText value="#{inputNumberSliderBean.delay}">
- <f:ajax render="ins"/>
- </h:inputText>
- <br />
- <h:outputText value="InputPosition: "/>
- <h:selectOneMenu value="#{inputNumberSliderBean.inputPosition}">
- <f:selectItems value="#{inputNumberSliderBean.positionTypes}"/>
- <f:ajax render="ins"/>
- </h:selectOneMenu>
- <br />
- <h:outputText value="InputSize: "/>
- <h:inputText value="#{inputNumberSliderBean.inputSize}">
- <f:ajax render="ins"/>
- </h:inputText>
- <br />
- <h:outputText value="MaxValue: "/>
- <h:inputText value="#{inputNumberSliderBean.maxValue}">
- <f:ajax render="ins"/>
- </h:inputText>
- <br />
- <h:outputText value="MinValue: "/>
- <h:inputText value="#{inputNumberSliderBean.minValue}">
- <f:ajax render="ins"/>
- </h:inputText>
- <br />
- <h:outputText value="ShowArrows: "/>
- <h:selectBooleanCheckbox value="#{inputNumberSliderBean.showArrows}">
- <f:ajax render="ins"/>
- </h:selectBooleanCheckbox>
- <br />
- <h:outputText value="ShowBoundaryValues: "/>
- <h:selectBooleanCheckbox value="#{inputNumberSliderBean.showBoundaryValues}">
- <f:ajax render="ins"/>
- </h:selectBooleanCheckbox>
- <br />
- <h:outputText value="ShowInput: "/>
- <h:selectBooleanCheckbox value="#{inputNumberSliderBean.showInput}">
- <f:ajax render="ins"/>
- </h:selectBooleanCheckbox>
- <br />
- <h:outputText value="ShowToolTip: "/>
- <h:selectBooleanCheckbox value="#{inputNumberSliderBean.showToolTip}">
- <f:ajax render="ins"/>
- </h:selectBooleanCheckbox>
- <br />
- <h:outputText value="Step: "/>
- <h:inputText value="#{inputNumberSliderBean.step}">
- <f:ajax render="ins"/>
- </h:inputText>
- </h:form>
- </h:body>
-</html>
Copied: branches/RF-7817/examples/input-demo/src/main/webapp/qunit (from rev 19674, trunk/examples/input-demo/src/main/webapp/qunit)
Deleted: branches/RF-7817/examples/input-demo/src/main/webapp/qunit/autocomplete-qunit.xhtml
===================================================================
--- trunk/examples/input-demo/src/main/webapp/qunit/autocomplete-qunit.xhtml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/examples/input-demo/src/main/webapp/qunit/autocomplete-qunit.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,64 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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"
- xmlns:input="http://richfaces.org/input"
- xmlns:a4j="http://richfaces.org/a4j">
-
-<f:view contentType="text/html" />
-
-<h:head>
- <title>Richfaces Autocomplete</title>
-</h:head>
-
-<h:body style="margin: 30px;">
-
-<ui:composition template="/templates/template.xhtml">
-
- <ui:define name="scripts">
- <h:outputScript name="qunit/qunit.js" />
- <h:outputScript name="qunit/richfaces-qunit.js" />
-
- <h:outputStylesheet name="qunit/qunit.css" />
- </ui:define>
-
- <ui:define name="title">Autocomplete qunit tests</ui:define>
- <ui:define name="body_head">Autocomplete qunit tests</ui:define>
-
- <ui:define name="body">
- <p>Page</p>
-
- <h:form id="form">
- <input:autocomplete id="autocompleteDefault" value="a" fetchValue="#{country.name}" autocompleteMethod="#{autoCompleteBean.autocomplete}" var="country"
- onchange="return onEvent.call(this, event);" onselectitem="return onEvent.call(this, event);" onblur="return onEvent.call(this, event);" onfocus="return onEvent.call(this, event);">
- #{country.name} #{country.iso} #{country.domain}
- </input:autocomplete><br />
- <input:autocomplete id="autocompleteDefault2" fetchValue="#{country.name}" autocompleteMethod="#{autoCompleteBean.autocomplete}" var="country"
- onselectitem="return onEvent.call(this, event);" showButton="true" mode="client">
- #{country.name} #{country.iso} #{country.domain}
- </input:autocomplete><br />
- <input:autocomplete id="autocompleteClientMode" mode="client" fetchValue="#{country.name}" autocompleteMethod="#{autoCompleteBean.autocomplete}" var="country" showButton="true">
- #{country.name} #{country.iso} #{country.domain}
- </input:autocomplete><br />
- <input:autocomplete id="autocompleteLazyClientMode" mode="lazyClient" fetchValue="#{country.name}" autocompleteMethod="#{autoCompleteBean.autocomplete}" var="country" showButton="true">
- #{country.name} #{country.iso} #{country.domain}
- </input:autocomplete><br />
- <input:autocomplete id="autocompleteAjaxMode" mode="ajax" fetchValue="#{country.name}" autocompleteMethod="#{autoCompleteBean.autocomplete}" var="country" showButton="true">
- #{country.name} #{country.iso} #{country.domain}
- </input:autocomplete><br />
- <input:autocomplete id="autocompleteCachedAjaxMode" mode="cachedAjax" fetchValue="#{country.name}" autocompleteMethod="#{autoCompleteBean.autocomplete}" var="country" showButton="true">
- #{country.name} #{country.iso} #{country.domain}
- </input:autocomplete>
- </h:form>
-
- <p>Result</p>
- <div>
- <ol id="qunit-tests"></ol>
- </div>
- <h:outputScript name="tests/autocomplete-qunit.js" />
- </ui:define>
-</ui:composition>
-</h:body>
-</html>
-
Copied: branches/RF-7817/examples/input-demo/src/main/webapp/qunit/autocomplete-qunit.xhtml (from rev 19674, trunk/examples/input-demo/src/main/webapp/qunit/autocomplete-qunit.xhtml)
===================================================================
--- branches/RF-7817/examples/input-demo/src/main/webapp/qunit/autocomplete-qunit.xhtml (rev 0)
+++ branches/RF-7817/examples/input-demo/src/main/webapp/qunit/autocomplete-qunit.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,64 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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"
+ xmlns:input="http://richfaces.org/input"
+ xmlns:a4j="http://richfaces.org/a4j">
+
+<f:view contentType="text/html" />
+
+<h:head>
+ <title>Richfaces Autocomplete</title>
+</h:head>
+
+<h:body style="margin: 30px;">
+
+<ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="scripts">
+ <h:outputScript name="qunit/qunit.js" />
+ <h:outputScript name="qunit/richfaces-qunit.js" />
+
+ <h:outputStylesheet name="qunit/qunit.css" />
+ </ui:define>
+
+ <ui:define name="title">Autocomplete qunit tests</ui:define>
+ <ui:define name="body_head">Autocomplete qunit tests</ui:define>
+
+ <ui:define name="body">
+ <p>Page</p>
+
+ <h:form id="form">
+ <input:autocomplete id="autocompleteDefault" value="a" fetchValue="#{country.name}" autocompleteMethod="#{autoCompleteBean.autocomplete}" var="country"
+ onchange="return onEvent.call(this, event);" onselectitem="return onEvent.call(this, event);" onblur="return onEvent.call(this, event);" onfocus="return onEvent.call(this, event);">
+ #{country.name} #{country.iso} #{country.domain}
+ </input:autocomplete><br />
+ <input:autocomplete id="autocompleteDefault2" fetchValue="#{country.name}" autocompleteMethod="#{autoCompleteBean.autocomplete}" var="country"
+ onselectitem="return onEvent.call(this, event);" showButton="true" mode="client">
+ #{country.name} #{country.iso} #{country.domain}
+ </input:autocomplete><br />
+ <input:autocomplete id="autocompleteClientMode" mode="client" fetchValue="#{country.name}" autocompleteMethod="#{autoCompleteBean.autocomplete}" var="country" showButton="true">
+ #{country.name} #{country.iso} #{country.domain}
+ </input:autocomplete><br />
+ <input:autocomplete id="autocompleteLazyClientMode" mode="lazyClient" fetchValue="#{country.name}" autocompleteMethod="#{autoCompleteBean.autocomplete}" var="country" showButton="true">
+ #{country.name} #{country.iso} #{country.domain}
+ </input:autocomplete><br />
+ <input:autocomplete id="autocompleteAjaxMode" mode="ajax" fetchValue="#{country.name}" autocompleteMethod="#{autoCompleteBean.autocomplete}" var="country" showButton="true">
+ #{country.name} #{country.iso} #{country.domain}
+ </input:autocomplete><br />
+ <input:autocomplete id="autocompleteCachedAjaxMode" mode="cachedAjax" fetchValue="#{country.name}" autocompleteMethod="#{autoCompleteBean.autocomplete}" var="country" showButton="true">
+ #{country.name} #{country.iso} #{country.domain}
+ </input:autocomplete>
+ </h:form>
+
+ <p>Result</p>
+ <div>
+ <ol id="qunit-tests"></ol>
+ </div>
+ <h:outputScript name="tests/autocomplete-qunit.js" />
+ </ui:define>
+</ui:composition>
+</h:body>
+</html>
+
Copied: branches/RF-7817/examples/input-demo/src/main/webapp/resources (from rev 19674, trunk/examples/input-demo/src/main/webapp/resources)
Copied: branches/RF-7817/examples/input-demo/src/main/webapp/resources/qunit (from rev 19674, trunk/examples/input-demo/src/main/webapp/resources/qunit)
Deleted: branches/RF-7817/examples/input-demo/src/main/webapp/resources/qunit/qunit.css
===================================================================
--- trunk/examples/input-demo/src/main/webapp/resources/qunit/qunit.css 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/examples/input-demo/src/main/webapp/resources/qunit/qunit.css 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,119 +0,0 @@
-
-ol#qunit-tests {
- font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
- margin:0;
- padding:0;
- list-style-position:inside;
-
- font-size: smaller;
-}
-ol#qunit-tests li{
- padding:0.4em 0.5em 0.4em 2.5em;
- border-bottom:1px solid #fff;
- font-size:small;
- list-style-position:inside;
-}
-ol#qunit-tests li ol{
- box-shadow: inset 0px 2px 13px #999;
- -moz-box-shadow: inset 0px 2px 13px #999;
- -webkit-box-shadow: inset 0px 2px 13px #999;
- margin-top:0.5em;
- margin-left:0;
- padding:0.5em;
- background-color:#fff;
- border-radius:15px;
- -moz-border-radius: 15px;
- -webkit-border-radius: 15px;
-}
-ol#qunit-tests li li{
- border-bottom:none;
- margin:0.5em;
- background-color:#fff;
- list-style-position: inside;
- padding:0.4em 0.5em 0.4em 0.5em;
-}
-
-ol#qunit-tests li li.pass{
- border-left:26px solid #C6E746;
- background-color:#fff;
- color:#5E740B;
- }
-ol#qunit-tests li li.fail{
- border-left:26px solid #EE5757;
- background-color:#fff;
- color:#710909;
-}
-ol#qunit-tests li.pass{
- background-color:#D2E0E6;
- color:#528CE0;
-}
-ol#qunit-tests li.fail{
- background-color:#EE5757;
- color:#000;
-}
-ol#qunit-tests li strong {
- cursor:pointer;
-}
-h1#qunit-header{
- background-color:#0d3349;
- margin:0;
- padding:0.5em 0 0.5em 1em;
- color:#fff;
- font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
- border-top-right-radius:15px;
- border-top-left-radius:15px;
- -moz-border-radius-topright:15px;
- -moz-border-radius-topleft:15px;
- -webkit-border-top-right-radius:15px;
- -webkit-border-top-left-radius:15px;
- text-shadow: rgba(0, 0, 0, 0.5) 4px 4px 1px;
-}
-h2#qunit-banner{
- font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
- height:5px;
- margin:0;
- padding:0;
-}
-h2#qunit-banner.qunit-pass{
- background-color:#C6E746;
-}
-h2#qunit-banner.qunit-fail, #qunit-testrunner-toolbar {
- background-color:#EE5757;
-}
-#qunit-testrunner-toolbar {
- font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
- padding:0;
- /*width:80%;*/
- padding:0em 0 0.5em 2em;
- font-size: small;
-}
-h2#qunit-userAgent {
- font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
- background-color:#2b81af;
- margin:0;
- padding:0;
- color:#fff;
- font-size: small;
- padding:0.5em 0 0.5em 2.5em;
- text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
-}
-p#qunit-testresult{
- font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
- margin:0;
- font-size: small;
- color:#2b81af;
- border-bottom-right-radius:15px;
- border-bottom-left-radius:15px;
- -moz-border-radius-bottomright:15px;
- -moz-border-radius-bottomleft:15px;
- -webkit-border-bottom-right-radius:15px;
- -webkit-border-bottom-left-radius:15px;
- background-color:#D2E0E6;
- padding:0.5em 0.5em 0.5em 2.5em;
-}
-strong b.fail{
- color:#710909;
- }
-strong b.pass{
- color:#5E740B;
- }
Copied: branches/RF-7817/examples/input-demo/src/main/webapp/resources/qunit/qunit.css (from rev 19674, trunk/examples/input-demo/src/main/webapp/resources/qunit/qunit.css)
===================================================================
--- branches/RF-7817/examples/input-demo/src/main/webapp/resources/qunit/qunit.css (rev 0)
+++ branches/RF-7817/examples/input-demo/src/main/webapp/resources/qunit/qunit.css 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,119 @@
+
+ol#qunit-tests {
+ font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
+ margin:0;
+ padding:0;
+ list-style-position:inside;
+
+ font-size: smaller;
+}
+ol#qunit-tests li{
+ padding:0.4em 0.5em 0.4em 2.5em;
+ border-bottom:1px solid #fff;
+ font-size:small;
+ list-style-position:inside;
+}
+ol#qunit-tests li ol{
+ box-shadow: inset 0px 2px 13px #999;
+ -moz-box-shadow: inset 0px 2px 13px #999;
+ -webkit-box-shadow: inset 0px 2px 13px #999;
+ margin-top:0.5em;
+ margin-left:0;
+ padding:0.5em;
+ background-color:#fff;
+ border-radius:15px;
+ -moz-border-radius: 15px;
+ -webkit-border-radius: 15px;
+}
+ol#qunit-tests li li{
+ border-bottom:none;
+ margin:0.5em;
+ background-color:#fff;
+ list-style-position: inside;
+ padding:0.4em 0.5em 0.4em 0.5em;
+}
+
+ol#qunit-tests li li.pass{
+ border-left:26px solid #C6E746;
+ background-color:#fff;
+ color:#5E740B;
+ }
+ol#qunit-tests li li.fail{
+ border-left:26px solid #EE5757;
+ background-color:#fff;
+ color:#710909;
+}
+ol#qunit-tests li.pass{
+ background-color:#D2E0E6;
+ color:#528CE0;
+}
+ol#qunit-tests li.fail{
+ background-color:#EE5757;
+ color:#000;
+}
+ol#qunit-tests li strong {
+ cursor:pointer;
+}
+h1#qunit-header{
+ background-color:#0d3349;
+ margin:0;
+ padding:0.5em 0 0.5em 1em;
+ color:#fff;
+ font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
+ border-top-right-radius:15px;
+ border-top-left-radius:15px;
+ -moz-border-radius-topright:15px;
+ -moz-border-radius-topleft:15px;
+ -webkit-border-top-right-radius:15px;
+ -webkit-border-top-left-radius:15px;
+ text-shadow: rgba(0, 0, 0, 0.5) 4px 4px 1px;
+}
+h2#qunit-banner{
+ font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
+ height:5px;
+ margin:0;
+ padding:0;
+}
+h2#qunit-banner.qunit-pass{
+ background-color:#C6E746;
+}
+h2#qunit-banner.qunit-fail, #qunit-testrunner-toolbar {
+ background-color:#EE5757;
+}
+#qunit-testrunner-toolbar {
+ font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
+ padding:0;
+ /*width:80%;*/
+ padding:0em 0 0.5em 2em;
+ font-size: small;
+}
+h2#qunit-userAgent {
+ font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
+ background-color:#2b81af;
+ margin:0;
+ padding:0;
+ color:#fff;
+ font-size: small;
+ padding:0.5em 0 0.5em 2.5em;
+ text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
+}
+p#qunit-testresult{
+ font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
+ margin:0;
+ font-size: small;
+ color:#2b81af;
+ border-bottom-right-radius:15px;
+ border-bottom-left-radius:15px;
+ -moz-border-radius-bottomright:15px;
+ -moz-border-radius-bottomleft:15px;
+ -webkit-border-bottom-right-radius:15px;
+ -webkit-border-bottom-left-radius:15px;
+ background-color:#D2E0E6;
+ padding:0.5em 0.5em 0.5em 2.5em;
+}
+strong b.fail{
+ color:#710909;
+ }
+strong b.pass{
+ color:#5E740B;
+ }
Deleted: branches/RF-7817/examples/input-demo/src/main/webapp/resources/qunit/qunit.js
===================================================================
--- trunk/examples/input-demo/src/main/webapp/resources/qunit/qunit.js 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/examples/input-demo/src/main/webapp/resources/qunit/qunit.js 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,1043 +0,0 @@
-/*
- * QUnit - A JavaScript Unit Testing Framework
- *
- * http://docs.jquery.com/QUnit
- *
- * Copyright (c) 2009 John Resig, Jörn Zaefferer
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- */
-
-(function(window) {
-
-var QUnit = {
-
- // Initialize the configuration options
- init: function() {
- config = {
- stats: { all: 0, bad: 0 },
- moduleStats: { all: 0, bad: 0 },
- started: +new Date,
- blocking: false,
- autorun: false,
- assertions: [],
- filters: [],
- queue: []
- };
-
- var tests = id("qunit-tests"),
- banner = id("qunit-banner"),
- result = id("qunit-testresult");
-
- if ( tests ) {
- tests.innerHTML = "";
- }
-
- if ( banner ) {
- banner.className = "";
- }
-
- if ( result ) {
- result.parentNode.removeChild( result );
- }
- },
-
- // call on start of module test to prepend name to all tests
- module: function(name, testEnvironment) {
- config.currentModule = name;
-
- synchronize(function() {
- if ( config.currentModule ) {
- QUnit.moduleDone( config.currentModule, config.moduleStats.bad, config.moduleStats.all );
- }
-
- config.currentModule = name;
- config.moduleTestEnvironment = testEnvironment;
- config.moduleStats = { all: 0, bad: 0 };
-
- QUnit.moduleStart( name, testEnvironment );
- });
- },
-
- asyncTest: function(testName, expected, callback) {
- if ( arguments.length === 2 ) {
- callback = expected;
- expected = 0;
- }
-
- QUnit.test(testName, expected, callback, true);
- },
-
- test: function(testName, expected, callback, async) {
- var name = testName, testEnvironment, testEnvironmentArg;
-
- if ( arguments.length === 2 ) {
- callback = expected;
- expected = null;
- }
- // is 2nd argument a testEnvironment?
- if ( expected && typeof expected === 'object') {
- testEnvironmentArg = expected;
- expected = null;
- }
-
- if ( config.currentModule ) {
- name = config.currentModule + " module: " + name;
- }
-
- if ( !validTest(name) ) {
- return;
- }
-
- synchronize(function() {
- QUnit.testStart( testName );
-
- testEnvironment = extend({
- setup: function() {},
- teardown: function() {}
- }, config.moduleTestEnvironment);
- if (testEnvironmentArg) {
- extend(testEnvironment,testEnvironmentArg);
- }
-
- // allow utility functions to access the current test environment
- QUnit.current_testEnvironment = testEnvironment;
-
- config.assertions = [];
- config.expected = expected;
-
- try {
- if ( !config.pollution ) {
- saveGlobal();
- }
-
- testEnvironment.setup.call(testEnvironment);
- } catch(e) {
- QUnit.ok( false, "Setup failed on " + name + ": " + e.message );
- }
-
- if ( async ) {
- QUnit.stop();
- }
-
- try {
- callback.call(testEnvironment);
- } catch(e) {
- fail("Test " + name + " died, exception and test follows", e, callback);
- QUnit.ok( false, "Died on test #" + (config.assertions.length + 1) + ": " + e.message );
- // else next test will carry the responsibility
- saveGlobal();
-
- // Restart the tests if they're blocking
- if ( config.blocking ) {
- start();
- }
- }
- });
-
- synchronize(function() {
- try {
- checkPollution();
- testEnvironment.teardown.call(testEnvironment);
- } catch(e) {
- QUnit.ok( false, "Teardown failed on " + name + ": " + e.message );
- }
-
- try {
- QUnit.reset();
- } catch(e) {
- fail("reset() failed, following Test " + name + ", exception and reset fn follows", e, reset);
- }
-
- if ( config.expected && config.expected != config.assertions.length ) {
- QUnit.ok( false, "Expected " + config.expected + " assertions, but " + config.assertions.length + " were run" );
- }
-
- var good = 0, bad = 0,
- tests = id("qunit-tests");
-
- config.stats.all += config.assertions.length;
- config.moduleStats.all += config.assertions.length;
-
- if ( tests ) {
- var ol = document.createElement("ol");
- ol.style.display = "none";
-
- for ( var i = 0; i < config.assertions.length; i++ ) {
- var assertion = config.assertions[i];
-
- var li = document.createElement("li");
- li.className = assertion.result ? "pass" : "fail";
- li.appendChild(document.createTextNode(assertion.message || "(no message)"));
- ol.appendChild( li );
-
- if ( assertion.result ) {
- good++;
- } else {
- bad++;
- config.stats.bad++;
- config.moduleStats.bad++;
- }
- }
-
- var b = document.createElement("strong");
- b.innerHTML = name + " <b style='color:black;'>(<b class='fail'>" + bad + "</b>, <b class='pass'>" + good + "</b>, " + config.assertions.length + ")</b>";
-
- addEvent(b, "click", function() {
- var next = b.nextSibling, display = next.style.display;
- next.style.display = display === "none" ? "block" : "none";
- });
-
- addEvent(b, "dblclick", function(e) {
- var target = e && e.target ? e.target : window.event.srcElement;
- if ( target.nodeName.toLowerCase() === "strong" ) {
- var text = "", node = target.firstChild;
-
- while ( node.nodeType === 3 ) {
- text += node.nodeValue;
- node = node.nextSibling;
- }
-
- text = text.replace(/(^\s*|\s*$)/g, "");
-
- if ( window.location ) {
- window.location.href = window.location.href.match(/^(.+?)(\?.*)?$/)[1] + "?" + encodeURIComponent(text);
- }
- }
- });
-
- var li = document.createElement("li");
- li.className = bad ? "fail" : "pass";
- li.appendChild( b );
- li.appendChild( ol );
- tests.appendChild( li );
-
- if ( bad ) {
- var toolbar = id("qunit-testrunner-toolbar");
- if ( toolbar ) {
- toolbar.style.display = "block";
- id("qunit-filter-pass").disabled = null;
- id("qunit-filter-missing").disabled = null;
- }
- }
-
- } else {
- for ( var i = 0; i < config.assertions.length; i++ ) {
- if ( !config.assertions[i].result ) {
- bad++;
- config.stats.bad++;
- config.moduleStats.bad++;
- }
- }
- }
-
- QUnit.testDone( testName, bad, config.assertions.length );
-
- if ( !window.setTimeout && !config.queue.length ) {
- done();
- }
- });
-
- if ( window.setTimeout && !config.doneTimer ) {
- config.doneTimer = window.setTimeout(function(){
- if ( !config.queue.length ) {
- done();
- } else {
- synchronize( done );
- }
- }, 13);
- }
- },
-
- /**
- * Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through.
- */
- expect: function(asserts) {
- config.expected = asserts;
- },
-
- /**
- * Asserts true.
- * @example ok( "asdfasdf".length > 5, "There must be at least 5 chars" );
- */
- ok: function(a, msg) {
- QUnit.log(a, msg);
-
- config.assertions.push({
- result: !!a,
- message: msg
- });
- },
-
- /**
- * Checks that the first two arguments are equal, with an optional message.
- * Prints out both actual and expected values.
- *
- * Prefered to ok( actual == expected, message )
- *
- * @example equal( format("Received {0} bytes.", 2), "Received 2 bytes." );
- *
- * @param Object actual
- * @param Object expected
- * @param String message (optional)
- */
- equal: function(actual, expected, message) {
- push(expected == actual, actual, expected, message);
- },
-
- notEqual: function(actual, expected, message) {
- push(expected != actual, actual, expected, message);
- },
-
- deepEqual: function(a, b, message) {
- push(QUnit.equiv(a, b), a, b, message);
- },
-
- notDeepEqual: function(a, b, message) {
- push(!QUnit.equiv(a, b), a, b, message);
- },
-
- strictEqual: function(actual, expected, message) {
- push(expected === actual, actual, expected, message);
- },
-
- notStrictEqual: function(actual, expected, message) {
- push(expected !== actual, actual, expected, message);
- },
-
- start: function() {
- // A slight delay, to avoid any current callbacks
- if ( window.setTimeout ) {
- window.setTimeout(function() {
- if ( config.timeout ) {
- clearTimeout(config.timeout);
- }
-
- config.blocking = false;
- process();
- }, 13);
- } else {
- config.blocking = false;
- process();
- }
- },
-
- stop: function(timeout) {
- config.blocking = true;
-
- if ( timeout && window.setTimeout ) {
- config.timeout = window.setTimeout(function() {
- QUnit.ok( false, "Test timed out" );
- QUnit.start();
- }, timeout);
- }
- },
-
- /**
- * Resets the test setup. Useful for tests that modify the DOM.
- */
- reset: function() {
- if ( window.jQuery ) {
- jQuery("#main").html( config.fixture );
- jQuery.event.global = {};
- jQuery.ajaxSettings = extend({}, config.ajaxSettings);
- }
- },
-
- /**
- * Trigger an event on an element.
- *
- * @example triggerEvent( document.body, "click" );
- *
- * @param DOMElement elem
- * @param String type
- */
- triggerEvent: function( elem, type, event ) {
- if ( document.createEvent ) {
- event = document.createEvent("MouseEvents");
- event.initMouseEvent(type, true, true, elem.ownerDocument.defaultView,
- 0, 0, 0, 0, 0, false, false, false, false, 0, null);
- elem.dispatchEvent( event );
-
- } else if ( elem.fireEvent ) {
- elem.fireEvent("on"+type);
- }
- },
-
- // Safe object type checking
- is: function( type, obj ) {
- return Object.prototype.toString.call( obj ) === "[object "+ type +"]";
- },
-
- // Logging callbacks
- done: function(failures, total) {},
- log: function(result, message) {},
- testStart: function(name) {},
- testDone: function(name, failures, total) {},
- moduleStart: function(name, testEnvironment) {},
- moduleDone: function(name, failures, total) {}
-};
-
-// Backwards compatibility, deprecated
-QUnit.equals = QUnit.equal;
-QUnit.same = QUnit.deepEqual;
-
-// Maintain internal state
-var config = {
- // The queue of tests to run
- queue: [],
-
- // block until document ready
- blocking: true
-};
-
-// Load paramaters
-(function() {
- var location = window.location || { search: "", protocol: "file:" },
- GETParams = location.search.slice(1).split('&');
-
- for ( var i = 0; i < GETParams.length; i++ ) {
- GETParams[i] = decodeURIComponent( GETParams[i] );
- if ( GETParams[i] === "noglobals" ) {
- GETParams.splice( i, 1 );
- i--;
- config.noglobals = true;
- } else if ( GETParams[i].search('=') > -1 ) {
- GETParams.splice( i, 1 );
- i--;
- }
- }
-
- // restrict modules/tests by get parameters
- config.filters = GETParams;
-
- // Figure out if we're running the tests from a server or not
- QUnit.isLocal = !!(location.protocol === 'file:');
-})();
-
-// Expose the API as global variables, unless an 'exports'
-// object exists, in that case we assume we're in CommonJS
-if ( typeof exports === "undefined" || typeof require === "undefined" ) {
- extend(window, QUnit);
- window.QUnit = QUnit;
-} else {
- extend(exports, QUnit);
- exports.QUnit = QUnit;
-}
-
-if ( typeof document === "undefined" || document.readyState === "complete" ) {
- config.autorun = true;
-}
-
-addEvent(window, "load", function() {
- // Initialize the config, saving the execution queue
- var oldconfig = extend({}, config);
- QUnit.init();
- extend(config, oldconfig);
-
- config.blocking = false;
-
- var userAgent = id("qunit-userAgent");
- if ( userAgent ) {
- userAgent.innerHTML = navigator.userAgent;
- }
-
- var toolbar = id("qunit-testrunner-toolbar");
- if ( toolbar ) {
- toolbar.style.display = "none";
-
- var filter = document.createElement("input");
- filter.type = "checkbox";
- filter.id = "qunit-filter-pass";
- filter.disabled = true;
- addEvent( filter, "click", function() {
- var li = document.getElementsByTagName("li");
- for ( var i = 0; i < li.length; i++ ) {
- if ( li[i].className.indexOf("pass") > -1 ) {
- li[i].style.display = filter.checked ? "none" : "";
- }
- }
- });
- toolbar.appendChild( filter );
-
- var label = document.createElement("label");
- label.setAttribute("for", "qunit-filter-pass");
- label.innerHTML = "Hide passed tests";
- toolbar.appendChild( label );
-
- var missing = document.createElement("input");
- missing.type = "checkbox";
- missing.id = "qunit-filter-missing";
- missing.disabled = true;
- addEvent( missing, "click", function() {
- var li = document.getElementsByTagName("li");
- for ( var i = 0; i < li.length; i++ ) {
- if ( li[i].className.indexOf("fail") > -1 && li[i].innerHTML.indexOf('missing test - untested code is broken code') > - 1 ) {
- li[i].parentNode.parentNode.style.display = missing.checked ? "none" : "block";
- }
- }
- });
- toolbar.appendChild( missing );
-
- label = document.createElement("label");
- label.setAttribute("for", "qunit-filter-missing");
- label.innerHTML = "Hide missing tests (untested code is broken code)";
- toolbar.appendChild( label );
- }
-
- var main = id('main');
- if ( main ) {
- config.fixture = main.innerHTML;
- }
-
- if ( window.jQuery ) {
- config.ajaxSettings = window.jQuery.ajaxSettings;
- }
-
- QUnit.start();
-});
-
-function done() {
- if ( config.doneTimer && window.clearTimeout ) {
- window.clearTimeout( config.doneTimer );
- config.doneTimer = null;
- }
-
- if ( config.queue.length ) {
- config.doneTimer = window.setTimeout(function(){
- if ( !config.queue.length ) {
- done();
- } else {
- synchronize( done );
- }
- }, 13);
-
- return;
- }
-
- config.autorun = true;
-
- // Log the last module results
- if ( config.currentModule ) {
- QUnit.moduleDone( config.currentModule, config.moduleStats.bad, config.moduleStats.all );
- }
-
- var banner = id("qunit-banner"),
- tests = id("qunit-tests"),
- html = ['Tests completed in ',
- +new Date - config.started, ' milliseconds.<br/>',
- '<span class="passed">', config.stats.all - config.stats.bad, '</span> tests of <span class="total">', config.stats.all, '</span> passed, <span class="failed">', config.stats.bad,'</span> failed.'].join('');
-
- if ( banner ) {
- banner.className = (config.stats.bad ? "qunit-fail" : "qunit-pass");
- }
-
- if ( tests ) {
- var result = id("qunit-testresult");
-
- if ( !result ) {
- result = document.createElement("p");
- result.id = "qunit-testresult";
- result.className = "result";
- tests.parentNode.insertBefore( result, tests.nextSibling );
- }
-
- result.innerHTML = html;
- }
-
- QUnit.done( config.stats.bad, config.stats.all );
-}
-
-function validTest( name ) {
- var i = config.filters.length,
- run = false;
-
- if ( !i ) {
- return true;
- }
-
- while ( i-- ) {
- var filter = config.filters[i],
- not = filter.charAt(0) == '!';
-
- if ( not ) {
- filter = filter.slice(1);
- }
-
- if ( name.indexOf(filter) !== -1 ) {
- return !not;
- }
-
- if ( not ) {
- run = true;
- }
- }
-
- return run;
-}
-
-function push(result, actual, expected, message) {
- message = message || (result ? "okay" : "failed");
- QUnit.ok( result, result ? message + ": " + expected : message + ", expected: " + QUnit.jsDump.parse(expected) + " result: " + QUnit.jsDump.parse(actual) );
-}
-
-function synchronize( callback ) {
- config.queue.push( callback );
-
- if ( config.autorun && !config.blocking ) {
- process();
- }
-}
-
-function process() {
- while ( config.queue.length && !config.blocking ) {
- config.queue.shift()();
- }
-}
-
-function saveGlobal() {
- config.pollution = [];
-
- if ( config.noglobals ) {
- for ( var key in window ) {
- config.pollution.push( key );
- }
- }
-}
-
-function checkPollution( name ) {
- var old = config.pollution;
- saveGlobal();
-
- var newGlobals = diff( old, config.pollution );
- if ( newGlobals.length > 0 ) {
- ok( false, "Introduced global variable(s): " + newGlobals.join(", ") );
- config.expected++;
- }
-
- var deletedGlobals = diff( config.pollution, old );
- if ( deletedGlobals.length > 0 ) {
- ok( false, "Deleted global variable(s): " + deletedGlobals.join(", ") );
- config.expected++;
- }
-}
-
-// returns a new Array with the elements that are in a but not in b
-function diff( a, b ) {
- var result = a.slice();
- for ( var i = 0; i < result.length; i++ ) {
- for ( var j = 0; j < b.length; j++ ) {
- if ( result[i] === b[j] ) {
- result.splice(i, 1);
- i--;
- break;
- }
- }
- }
- return result;
-}
-
-function fail(message, exception, callback) {
- if ( typeof console !== "undefined" && console.error && console.warn ) {
- console.error(message);
- console.error(exception);
- console.warn(callback.toString());
-
- } else if ( window.opera && opera.postError ) {
- opera.postError(message, exception, callback.toString);
- }
-}
-
-function extend(a, b) {
- for ( var prop in b ) {
- a[prop] = b[prop];
- }
-
- return a;
-}
-
-function addEvent(elem, type, fn) {
- if ( elem.addEventListener ) {
- elem.addEventListener( type, fn, false );
- } else if ( elem.attachEvent ) {
- elem.attachEvent( "on" + type, fn );
- } else {
- fn();
- }
-}
-
-function id(name) {
- return !!(typeof document !== "undefined" && document && document.getElementById) &&
- document.getElementById( name );
-}
-
-// Test for equality any JavaScript type.
-// Discussions and reference: http://philrathe.com/articles/equiv
-// Test suites: http://philrathe.com/tests/equiv
-// Author: Philippe Rathé <prathe(a)gmail.com>
-QUnit.equiv = function () {
-
- var innerEquiv; // the real equiv function
- var callers = []; // stack to decide between skip/abort functions
-
-
- // Determine what is o.
- function hoozit(o) {
- if (QUnit.is("String", o)) {
- return "string";
-
- } else if (QUnit.is("Boolean", o)) {
- return "boolean";
-
- } else if (QUnit.is("Number", o)) {
-
- if (isNaN(o)) {
- return "nan";
- } else {
- return "number";
- }
-
- } else if (typeof o === "undefined") {
- return "undefined";
-
- // consider: typeof null === object
- } else if (o === null) {
- return "null";
-
- // consider: typeof [] === object
- } else if (QUnit.is( "Array", o)) {
- return "array";
-
- // consider: typeof new Date() === object
- } else if (QUnit.is( "Date", o)) {
- return "date";
-
- // consider: /./ instanceof Object;
- // /./ instanceof RegExp;
- // typeof /./ === "function"; // => false in IE and Opera,
- // true in FF and Safari
- } else if (QUnit.is( "RegExp", o)) {
- return "regexp";
-
- } else if (typeof o === "object") {
- return "object";
-
- } else if (QUnit.is( "Function", o)) {
- return "function";
- } else {
- return undefined;
- }
- }
-
- // Call the o related callback with the given arguments.
- function bindCallbacks(o, callbacks, args) {
- var prop = hoozit(o);
- if (prop) {
- if (hoozit(callbacks[prop]) === "function") {
- return callbacks[prop].apply(callbacks, args);
- } else {
- return callbacks[prop]; // or undefined
- }
- }
- }
-
- var callbacks = function () {
-
- // for string, boolean, number and null
- function useStrictEquality(b, a) {
- if (b instanceof a.constructor || a instanceof b.constructor) {
- // to catch short annotaion VS 'new' annotation of a declaration
- // e.g. var i = 1;
- // var j = new Number(1);
- return a == b;
- } else {
- return a === b;
- }
- }
-
- return {
- "string": useStrictEquality,
- "boolean": useStrictEquality,
- "number": useStrictEquality,
- "null": useStrictEquality,
- "undefined": useStrictEquality,
-
- "nan": function (b) {
- return isNaN(b);
- },
-
- "date": function (b, a) {
- return hoozit(b) === "date" && a.valueOf() === b.valueOf();
- },
-
- "regexp": function (b, a) {
- return hoozit(b) === "regexp" &&
- a.source === b.source && // the regex itself
- a.global === b.global && // and its modifers (gmi) ...
- a.ignoreCase === b.ignoreCase &&
- a.multiline === b.multiline;
- },
-
- // - skip when the property is a method of an instance (OOP)
- // - abort otherwise,
- // initial === would have catch identical references anyway
- "function": function () {
- var caller = callers[callers.length - 1];
- return caller !== Object &&
- typeof caller !== "undefined";
- },
-
- "array": function (b, a) {
- var i;
- var len;
-
- // b could be an object literal here
- if ( ! (hoozit(b) === "array")) {
- return false;
- }
-
- len = a.length;
- if (len !== b.length) { // safe and faster
- return false;
- }
- for (i = 0; i < len; i++) {
- if ( ! innerEquiv(a[i], b[i])) {
- return false;
- }
- }
- return true;
- },
-
- "object": function (b, a) {
- var i;
- var eq = true; // unless we can proove it
- var aProperties = [], bProperties = []; // collection of strings
-
- // comparing constructors is more strict than using instanceof
- if ( a.constructor !== b.constructor) {
- return false;
- }
-
- // stack constructor before traversing properties
- callers.push(a.constructor);
-
- for (i in a) { // be strict: don't ensures hasOwnProperty and go deep
-
- aProperties.push(i); // collect a's properties
-
- if ( ! innerEquiv(a[i], b[i])) {
- eq = false;
- break;
- }
- }
-
- callers.pop(); // unstack, we are done
-
- for (i in b) {
- bProperties.push(i); // collect b's properties
- }
-
- // Ensures identical properties name
- return eq && innerEquiv(aProperties.sort(), bProperties.sort());
- }
- };
- }();
-
- innerEquiv = function () { // can take multiple arguments
- var args = Array.prototype.slice.apply(arguments);
- if (args.length < 2) {
- return true; // end transition
- }
-
- return (function (a, b) {
- if (a === b) {
- return true; // catch the most you can
- } else if (a === null || b === null || typeof a === "undefined" || typeof b === "undefined" || hoozit(a) !== hoozit(b)) {
- return false; // don't lose time with error prone cases
- } else {
- return bindCallbacks(a, callbacks, [b, a]);
- }
-
- // apply transition with (1..n) arguments
- })(args[0], args[1]) && arguments.callee.apply(this, args.splice(1, args.length -1));
- };
-
- return innerEquiv;
-
-}();
-
-/**
- * jsDump
- * Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
- * Licensed under BSD (http://www.opensource.org/licenses/bsd-license.php)
- * Date: 5/15/2008
- * @projectDescription Advanced and extensible data dumping for Javascript.
- * @version 1.0.0
- * @author Ariel Flesler
- * @link {http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html}
- */
-QUnit.jsDump = (function() {
- function quote( str ) {
- return '"' + str.toString().replace(/"/g, '\\"') + '"';
- };
- function literal( o ) {
- return o + '';
- };
- function join( pre, arr, post ) {
- var s = jsDump.separator(),
- base = jsDump.indent(),
- inner = jsDump.indent(1);
- if ( arr.join )
- arr = arr.join( ',' + s + inner );
- if ( !arr )
- return pre + post;
- return [ pre, inner + arr, base + post ].join(s);
- };
- function array( arr ) {
- var i = arr.length, ret = Array(i);
- this.up();
- while ( i-- )
- ret[i] = this.parse( arr[i] );
- this.down();
- return join( '[', ret, ']' );
- };
-
- var reName = /^function (\w+)/;
-
- var jsDump = {
- parse:function( obj, type ) { //type is used mostly internally, you can fix a (custom)type in advance
- var parser = this.parsers[ type || this.typeOf(obj) ];
- type = typeof parser;
-
- return type == 'function' ? parser.call( this, obj ) :
- type == 'string' ? parser :
- this.parsers.error;
- },
- typeOf:function( obj ) {
- var type;
- if ( obj === null ) {
- type = "null";
- } else if (typeof obj === "undefined") {
- type = "undefined";
- } else if (QUnit.is("RegExp", obj)) {
- type = "regexp";
- } else if (QUnit.is("Date", obj)) {
- type = "date";
- } else if (QUnit.is("Function", obj)) {
- type = "function";
- } else if (QUnit.is("Array", obj)) {
- type = "array";
- } else if (QUnit.is("Window", obj) || QUnit.is("global", obj)) {
- type = "window";
- } else if (QUnit.is("HTMLDocument", obj)) {
- type = "document";
- } else if (QUnit.is("HTMLCollection", obj) || QUnit.is("NodeList", obj)) {
- type = "nodelist";
- } else if (/^\[object HTML/.test(Object.prototype.toString.call( obj ))) {
- type = "node";
- } else {
- type = typeof obj;
- }
- return type;
- },
- separator:function() {
- return this.multiline ? this.HTML ? '<br />' : '\n' : this.HTML ? ' ' : ' ';
- },
- indent:function( extra ) {// extra can be a number, shortcut for increasing-calling-decreasing
- if ( !this.multiline )
- return '';
- var chr = this.indentChar;
- if ( this.HTML )
- chr = chr.replace(/\t/g,' ').replace(/ /g,' ');
- return Array( this._depth_ + (extra||0) ).join(chr);
- },
- up:function( a ) {
- this._depth_ += a || 1;
- },
- down:function( a ) {
- this._depth_ -= a || 1;
- },
- setParser:function( name, parser ) {
- this.parsers[name] = parser;
- },
- // The next 3 are exposed so you can use them
- quote:quote,
- literal:literal,
- join:join,
- //
- _depth_: 1,
- // This is the list of parsers, to modify them, use jsDump.setParser
- parsers:{
- window: '[Window]',
- document: '[Document]',
- error:'[ERROR]', //when no parser is found, shouldn't happen
- unknown: '[Unknown]',
- 'null':'null',
- undefined:'undefined',
- 'function':function( fn ) {
- var ret = 'function',
- name = 'name' in fn ? fn.name : (reName.exec(fn)||[])[1];//functions never have name in IE
- if ( name )
- ret += ' ' + name;
- ret += '(';
-
- ret = [ ret, this.parse( fn, 'functionArgs' ), '){'].join('');
- return join( ret, this.parse(fn,'functionCode'), '}' );
- },
- array: array,
- nodelist: array,
- arguments: array,
- object:function( map ) {
- var ret = [ ];
- this.up();
- for ( var key in map )
- ret.push( this.parse(key,'key') + ': ' + this.parse(map[key]) );
- this.down();
- return join( '{', ret, '}' );
- },
- node:function( node ) {
- var open = this.HTML ? '<' : '<',
- close = this.HTML ? '>' : '>';
-
- var tag = node.nodeName.toLowerCase(),
- ret = open + tag;
-
- for ( var a in this.DOMAttrs ) {
- var val = node[this.DOMAttrs[a]];
- if ( val )
- ret += ' ' + a + '=' + this.parse( val, 'attribute' );
- }
- return ret + close + open + '/' + tag + close;
- },
- functionArgs:function( fn ) {//function calls it internally, it's the arguments part of the function
- var l = fn.length;
- if ( !l ) return '';
-
- var args = Array(l);
- while ( l-- )
- args[l] = String.fromCharCode(97+l);//97 is 'a'
- return ' ' + args.join(', ') + ' ';
- },
- key:quote, //object calls it internally, the key part of an item in a map
- functionCode:'[code]', //function calls it internally, it's the content of the function
- attribute:quote, //node calls it internally, it's an html attribute value
- string:quote,
- date:quote,
- regexp:literal, //regex
- number:literal,
- 'boolean':literal
- },
- DOMAttrs:{//attributes to dump from nodes, name=>realName
- id:'id',
- name:'name',
- 'class':'className'
- },
- HTML:true,//if true, entities are escaped ( <, >, \t, space and \n )
- indentChar:' ',//indentation unit
- multiline:true //if true, items in a collection, are separated by a \n, else just a space.
- };
-
- return jsDump;
-})();
-
-})(this);
Copied: branches/RF-7817/examples/input-demo/src/main/webapp/resources/qunit/qunit.js (from rev 19674, trunk/examples/input-demo/src/main/webapp/resources/qunit/qunit.js)
===================================================================
--- branches/RF-7817/examples/input-demo/src/main/webapp/resources/qunit/qunit.js (rev 0)
+++ branches/RF-7817/examples/input-demo/src/main/webapp/resources/qunit/qunit.js 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,1043 @@
+/*
+ * QUnit - A JavaScript Unit Testing Framework
+ *
+ * http://docs.jquery.com/QUnit
+ *
+ * Copyright (c) 2009 John Resig, Jörn Zaefferer
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ */
+
+(function(window) {
+
+var QUnit = {
+
+ // Initialize the configuration options
+ init: function() {
+ config = {
+ stats: { all: 0, bad: 0 },
+ moduleStats: { all: 0, bad: 0 },
+ started: +new Date,
+ blocking: false,
+ autorun: false,
+ assertions: [],
+ filters: [],
+ queue: []
+ };
+
+ var tests = id("qunit-tests"),
+ banner = id("qunit-banner"),
+ result = id("qunit-testresult");
+
+ if ( tests ) {
+ tests.innerHTML = "";
+ }
+
+ if ( banner ) {
+ banner.className = "";
+ }
+
+ if ( result ) {
+ result.parentNode.removeChild( result );
+ }
+ },
+
+ // call on start of module test to prepend name to all tests
+ module: function(name, testEnvironment) {
+ config.currentModule = name;
+
+ synchronize(function() {
+ if ( config.currentModule ) {
+ QUnit.moduleDone( config.currentModule, config.moduleStats.bad, config.moduleStats.all );
+ }
+
+ config.currentModule = name;
+ config.moduleTestEnvironment = testEnvironment;
+ config.moduleStats = { all: 0, bad: 0 };
+
+ QUnit.moduleStart( name, testEnvironment );
+ });
+ },
+
+ asyncTest: function(testName, expected, callback) {
+ if ( arguments.length === 2 ) {
+ callback = expected;
+ expected = 0;
+ }
+
+ QUnit.test(testName, expected, callback, true);
+ },
+
+ test: function(testName, expected, callback, async) {
+ var name = testName, testEnvironment, testEnvironmentArg;
+
+ if ( arguments.length === 2 ) {
+ callback = expected;
+ expected = null;
+ }
+ // is 2nd argument a testEnvironment?
+ if ( expected && typeof expected === 'object') {
+ testEnvironmentArg = expected;
+ expected = null;
+ }
+
+ if ( config.currentModule ) {
+ name = config.currentModule + " module: " + name;
+ }
+
+ if ( !validTest(name) ) {
+ return;
+ }
+
+ synchronize(function() {
+ QUnit.testStart( testName );
+
+ testEnvironment = extend({
+ setup: function() {},
+ teardown: function() {}
+ }, config.moduleTestEnvironment);
+ if (testEnvironmentArg) {
+ extend(testEnvironment,testEnvironmentArg);
+ }
+
+ // allow utility functions to access the current test environment
+ QUnit.current_testEnvironment = testEnvironment;
+
+ config.assertions = [];
+ config.expected = expected;
+
+ try {
+ if ( !config.pollution ) {
+ saveGlobal();
+ }
+
+ testEnvironment.setup.call(testEnvironment);
+ } catch(e) {
+ QUnit.ok( false, "Setup failed on " + name + ": " + e.message );
+ }
+
+ if ( async ) {
+ QUnit.stop();
+ }
+
+ try {
+ callback.call(testEnvironment);
+ } catch(e) {
+ fail("Test " + name + " died, exception and test follows", e, callback);
+ QUnit.ok( false, "Died on test #" + (config.assertions.length + 1) + ": " + e.message );
+ // else next test will carry the responsibility
+ saveGlobal();
+
+ // Restart the tests if they're blocking
+ if ( config.blocking ) {
+ start();
+ }
+ }
+ });
+
+ synchronize(function() {
+ try {
+ checkPollution();
+ testEnvironment.teardown.call(testEnvironment);
+ } catch(e) {
+ QUnit.ok( false, "Teardown failed on " + name + ": " + e.message );
+ }
+
+ try {
+ QUnit.reset();
+ } catch(e) {
+ fail("reset() failed, following Test " + name + ", exception and reset fn follows", e, reset);
+ }
+
+ if ( config.expected && config.expected != config.assertions.length ) {
+ QUnit.ok( false, "Expected " + config.expected + " assertions, but " + config.assertions.length + " were run" );
+ }
+
+ var good = 0, bad = 0,
+ tests = id("qunit-tests");
+
+ config.stats.all += config.assertions.length;
+ config.moduleStats.all += config.assertions.length;
+
+ if ( tests ) {
+ var ol = document.createElement("ol");
+ ol.style.display = "none";
+
+ for ( var i = 0; i < config.assertions.length; i++ ) {
+ var assertion = config.assertions[i];
+
+ var li = document.createElement("li");
+ li.className = assertion.result ? "pass" : "fail";
+ li.appendChild(document.createTextNode(assertion.message || "(no message)"));
+ ol.appendChild( li );
+
+ if ( assertion.result ) {
+ good++;
+ } else {
+ bad++;
+ config.stats.bad++;
+ config.moduleStats.bad++;
+ }
+ }
+
+ var b = document.createElement("strong");
+ b.innerHTML = name + " <b style='color:black;'>(<b class='fail'>" + bad + "</b>, <b class='pass'>" + good + "</b>, " + config.assertions.length + ")</b>";
+
+ addEvent(b, "click", function() {
+ var next = b.nextSibling, display = next.style.display;
+ next.style.display = display === "none" ? "block" : "none";
+ });
+
+ addEvent(b, "dblclick", function(e) {
+ var target = e && e.target ? e.target : window.event.srcElement;
+ if ( target.nodeName.toLowerCase() === "strong" ) {
+ var text = "", node = target.firstChild;
+
+ while ( node.nodeType === 3 ) {
+ text += node.nodeValue;
+ node = node.nextSibling;
+ }
+
+ text = text.replace(/(^\s*|\s*$)/g, "");
+
+ if ( window.location ) {
+ window.location.href = window.location.href.match(/^(.+?)(\?.*)?$/)[1] + "?" + encodeURIComponent(text);
+ }
+ }
+ });
+
+ var li = document.createElement("li");
+ li.className = bad ? "fail" : "pass";
+ li.appendChild( b );
+ li.appendChild( ol );
+ tests.appendChild( li );
+
+ if ( bad ) {
+ var toolbar = id("qunit-testrunner-toolbar");
+ if ( toolbar ) {
+ toolbar.style.display = "block";
+ id("qunit-filter-pass").disabled = null;
+ id("qunit-filter-missing").disabled = null;
+ }
+ }
+
+ } else {
+ for ( var i = 0; i < config.assertions.length; i++ ) {
+ if ( !config.assertions[i].result ) {
+ bad++;
+ config.stats.bad++;
+ config.moduleStats.bad++;
+ }
+ }
+ }
+
+ QUnit.testDone( testName, bad, config.assertions.length );
+
+ if ( !window.setTimeout && !config.queue.length ) {
+ done();
+ }
+ });
+
+ if ( window.setTimeout && !config.doneTimer ) {
+ config.doneTimer = window.setTimeout(function(){
+ if ( !config.queue.length ) {
+ done();
+ } else {
+ synchronize( done );
+ }
+ }, 13);
+ }
+ },
+
+ /**
+ * Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through.
+ */
+ expect: function(asserts) {
+ config.expected = asserts;
+ },
+
+ /**
+ * Asserts true.
+ * @example ok( "asdfasdf".length > 5, "There must be at least 5 chars" );
+ */
+ ok: function(a, msg) {
+ QUnit.log(a, msg);
+
+ config.assertions.push({
+ result: !!a,
+ message: msg
+ });
+ },
+
+ /**
+ * Checks that the first two arguments are equal, with an optional message.
+ * Prints out both actual and expected values.
+ *
+ * Prefered to ok( actual == expected, message )
+ *
+ * @example equal( format("Received {0} bytes.", 2), "Received 2 bytes." );
+ *
+ * @param Object actual
+ * @param Object expected
+ * @param String message (optional)
+ */
+ equal: function(actual, expected, message) {
+ push(expected == actual, actual, expected, message);
+ },
+
+ notEqual: function(actual, expected, message) {
+ push(expected != actual, actual, expected, message);
+ },
+
+ deepEqual: function(a, b, message) {
+ push(QUnit.equiv(a, b), a, b, message);
+ },
+
+ notDeepEqual: function(a, b, message) {
+ push(!QUnit.equiv(a, b), a, b, message);
+ },
+
+ strictEqual: function(actual, expected, message) {
+ push(expected === actual, actual, expected, message);
+ },
+
+ notStrictEqual: function(actual, expected, message) {
+ push(expected !== actual, actual, expected, message);
+ },
+
+ start: function() {
+ // A slight delay, to avoid any current callbacks
+ if ( window.setTimeout ) {
+ window.setTimeout(function() {
+ if ( config.timeout ) {
+ clearTimeout(config.timeout);
+ }
+
+ config.blocking = false;
+ process();
+ }, 13);
+ } else {
+ config.blocking = false;
+ process();
+ }
+ },
+
+ stop: function(timeout) {
+ config.blocking = true;
+
+ if ( timeout && window.setTimeout ) {
+ config.timeout = window.setTimeout(function() {
+ QUnit.ok( false, "Test timed out" );
+ QUnit.start();
+ }, timeout);
+ }
+ },
+
+ /**
+ * Resets the test setup. Useful for tests that modify the DOM.
+ */
+ reset: function() {
+ if ( window.jQuery ) {
+ jQuery("#main").html( config.fixture );
+ jQuery.event.global = {};
+ jQuery.ajaxSettings = extend({}, config.ajaxSettings);
+ }
+ },
+
+ /**
+ * Trigger an event on an element.
+ *
+ * @example triggerEvent( document.body, "click" );
+ *
+ * @param DOMElement elem
+ * @param String type
+ */
+ triggerEvent: function( elem, type, event ) {
+ if ( document.createEvent ) {
+ event = document.createEvent("MouseEvents");
+ event.initMouseEvent(type, true, true, elem.ownerDocument.defaultView,
+ 0, 0, 0, 0, 0, false, false, false, false, 0, null);
+ elem.dispatchEvent( event );
+
+ } else if ( elem.fireEvent ) {
+ elem.fireEvent("on"+type);
+ }
+ },
+
+ // Safe object type checking
+ is: function( type, obj ) {
+ return Object.prototype.toString.call( obj ) === "[object "+ type +"]";
+ },
+
+ // Logging callbacks
+ done: function(failures, total) {},
+ log: function(result, message) {},
+ testStart: function(name) {},
+ testDone: function(name, failures, total) {},
+ moduleStart: function(name, testEnvironment) {},
+ moduleDone: function(name, failures, total) {}
+};
+
+// Backwards compatibility, deprecated
+QUnit.equals = QUnit.equal;
+QUnit.same = QUnit.deepEqual;
+
+// Maintain internal state
+var config = {
+ // The queue of tests to run
+ queue: [],
+
+ // block until document ready
+ blocking: true
+};
+
+// Load paramaters
+(function() {
+ var location = window.location || { search: "", protocol: "file:" },
+ GETParams = location.search.slice(1).split('&');
+
+ for ( var i = 0; i < GETParams.length; i++ ) {
+ GETParams[i] = decodeURIComponent( GETParams[i] );
+ if ( GETParams[i] === "noglobals" ) {
+ GETParams.splice( i, 1 );
+ i--;
+ config.noglobals = true;
+ } else if ( GETParams[i].search('=') > -1 ) {
+ GETParams.splice( i, 1 );
+ i--;
+ }
+ }
+
+ // restrict modules/tests by get parameters
+ config.filters = GETParams;
+
+ // Figure out if we're running the tests from a server or not
+ QUnit.isLocal = !!(location.protocol === 'file:');
+})();
+
+// Expose the API as global variables, unless an 'exports'
+// object exists, in that case we assume we're in CommonJS
+if ( typeof exports === "undefined" || typeof require === "undefined" ) {
+ extend(window, QUnit);
+ window.QUnit = QUnit;
+} else {
+ extend(exports, QUnit);
+ exports.QUnit = QUnit;
+}
+
+if ( typeof document === "undefined" || document.readyState === "complete" ) {
+ config.autorun = true;
+}
+
+addEvent(window, "load", function() {
+ // Initialize the config, saving the execution queue
+ var oldconfig = extend({}, config);
+ QUnit.init();
+ extend(config, oldconfig);
+
+ config.blocking = false;
+
+ var userAgent = id("qunit-userAgent");
+ if ( userAgent ) {
+ userAgent.innerHTML = navigator.userAgent;
+ }
+
+ var toolbar = id("qunit-testrunner-toolbar");
+ if ( toolbar ) {
+ toolbar.style.display = "none";
+
+ var filter = document.createElement("input");
+ filter.type = "checkbox";
+ filter.id = "qunit-filter-pass";
+ filter.disabled = true;
+ addEvent( filter, "click", function() {
+ var li = document.getElementsByTagName("li");
+ for ( var i = 0; i < li.length; i++ ) {
+ if ( li[i].className.indexOf("pass") > -1 ) {
+ li[i].style.display = filter.checked ? "none" : "";
+ }
+ }
+ });
+ toolbar.appendChild( filter );
+
+ var label = document.createElement("label");
+ label.setAttribute("for", "qunit-filter-pass");
+ label.innerHTML = "Hide passed tests";
+ toolbar.appendChild( label );
+
+ var missing = document.createElement("input");
+ missing.type = "checkbox";
+ missing.id = "qunit-filter-missing";
+ missing.disabled = true;
+ addEvent( missing, "click", function() {
+ var li = document.getElementsByTagName("li");
+ for ( var i = 0; i < li.length; i++ ) {
+ if ( li[i].className.indexOf("fail") > -1 && li[i].innerHTML.indexOf('missing test - untested code is broken code') > - 1 ) {
+ li[i].parentNode.parentNode.style.display = missing.checked ? "none" : "block";
+ }
+ }
+ });
+ toolbar.appendChild( missing );
+
+ label = document.createElement("label");
+ label.setAttribute("for", "qunit-filter-missing");
+ label.innerHTML = "Hide missing tests (untested code is broken code)";
+ toolbar.appendChild( label );
+ }
+
+ var main = id('main');
+ if ( main ) {
+ config.fixture = main.innerHTML;
+ }
+
+ if ( window.jQuery ) {
+ config.ajaxSettings = window.jQuery.ajaxSettings;
+ }
+
+ QUnit.start();
+});
+
+function done() {
+ if ( config.doneTimer && window.clearTimeout ) {
+ window.clearTimeout( config.doneTimer );
+ config.doneTimer = null;
+ }
+
+ if ( config.queue.length ) {
+ config.doneTimer = window.setTimeout(function(){
+ if ( !config.queue.length ) {
+ done();
+ } else {
+ synchronize( done );
+ }
+ }, 13);
+
+ return;
+ }
+
+ config.autorun = true;
+
+ // Log the last module results
+ if ( config.currentModule ) {
+ QUnit.moduleDone( config.currentModule, config.moduleStats.bad, config.moduleStats.all );
+ }
+
+ var banner = id("qunit-banner"),
+ tests = id("qunit-tests"),
+ html = ['Tests completed in ',
+ +new Date - config.started, ' milliseconds.<br/>',
+ '<span class="passed">', config.stats.all - config.stats.bad, '</span> tests of <span class="total">', config.stats.all, '</span> passed, <span class="failed">', config.stats.bad,'</span> failed.'].join('');
+
+ if ( banner ) {
+ banner.className = (config.stats.bad ? "qunit-fail" : "qunit-pass");
+ }
+
+ if ( tests ) {
+ var result = id("qunit-testresult");
+
+ if ( !result ) {
+ result = document.createElement("p");
+ result.id = "qunit-testresult";
+ result.className = "result";
+ tests.parentNode.insertBefore( result, tests.nextSibling );
+ }
+
+ result.innerHTML = html;
+ }
+
+ QUnit.done( config.stats.bad, config.stats.all );
+}
+
+function validTest( name ) {
+ var i = config.filters.length,
+ run = false;
+
+ if ( !i ) {
+ return true;
+ }
+
+ while ( i-- ) {
+ var filter = config.filters[i],
+ not = filter.charAt(0) == '!';
+
+ if ( not ) {
+ filter = filter.slice(1);
+ }
+
+ if ( name.indexOf(filter) !== -1 ) {
+ return !not;
+ }
+
+ if ( not ) {
+ run = true;
+ }
+ }
+
+ return run;
+}
+
+function push(result, actual, expected, message) {
+ message = message || (result ? "okay" : "failed");
+ QUnit.ok( result, result ? message + ": " + expected : message + ", expected: " + QUnit.jsDump.parse(expected) + " result: " + QUnit.jsDump.parse(actual) );
+}
+
+function synchronize( callback ) {
+ config.queue.push( callback );
+
+ if ( config.autorun && !config.blocking ) {
+ process();
+ }
+}
+
+function process() {
+ while ( config.queue.length && !config.blocking ) {
+ config.queue.shift()();
+ }
+}
+
+function saveGlobal() {
+ config.pollution = [];
+
+ if ( config.noglobals ) {
+ for ( var key in window ) {
+ config.pollution.push( key );
+ }
+ }
+}
+
+function checkPollution( name ) {
+ var old = config.pollution;
+ saveGlobal();
+
+ var newGlobals = diff( old, config.pollution );
+ if ( newGlobals.length > 0 ) {
+ ok( false, "Introduced global variable(s): " + newGlobals.join(", ") );
+ config.expected++;
+ }
+
+ var deletedGlobals = diff( config.pollution, old );
+ if ( deletedGlobals.length > 0 ) {
+ ok( false, "Deleted global variable(s): " + deletedGlobals.join(", ") );
+ config.expected++;
+ }
+}
+
+// returns a new Array with the elements that are in a but not in b
+function diff( a, b ) {
+ var result = a.slice();
+ for ( var i = 0; i < result.length; i++ ) {
+ for ( var j = 0; j < b.length; j++ ) {
+ if ( result[i] === b[j] ) {
+ result.splice(i, 1);
+ i--;
+ break;
+ }
+ }
+ }
+ return result;
+}
+
+function fail(message, exception, callback) {
+ if ( typeof console !== "undefined" && console.error && console.warn ) {
+ console.error(message);
+ console.error(exception);
+ console.warn(callback.toString());
+
+ } else if ( window.opera && opera.postError ) {
+ opera.postError(message, exception, callback.toString);
+ }
+}
+
+function extend(a, b) {
+ for ( var prop in b ) {
+ a[prop] = b[prop];
+ }
+
+ return a;
+}
+
+function addEvent(elem, type, fn) {
+ if ( elem.addEventListener ) {
+ elem.addEventListener( type, fn, false );
+ } else if ( elem.attachEvent ) {
+ elem.attachEvent( "on" + type, fn );
+ } else {
+ fn();
+ }
+}
+
+function id(name) {
+ return !!(typeof document !== "undefined" && document && document.getElementById) &&
+ document.getElementById( name );
+}
+
+// Test for equality any JavaScript type.
+// Discussions and reference: http://philrathe.com/articles/equiv
+// Test suites: http://philrathe.com/tests/equiv
+// Author: Philippe Rathé <prathe(a)gmail.com>
+QUnit.equiv = function () {
+
+ var innerEquiv; // the real equiv function
+ var callers = []; // stack to decide between skip/abort functions
+
+
+ // Determine what is o.
+ function hoozit(o) {
+ if (QUnit.is("String", o)) {
+ return "string";
+
+ } else if (QUnit.is("Boolean", o)) {
+ return "boolean";
+
+ } else if (QUnit.is("Number", o)) {
+
+ if (isNaN(o)) {
+ return "nan";
+ } else {
+ return "number";
+ }
+
+ } else if (typeof o === "undefined") {
+ return "undefined";
+
+ // consider: typeof null === object
+ } else if (o === null) {
+ return "null";
+
+ // consider: typeof [] === object
+ } else if (QUnit.is( "Array", o)) {
+ return "array";
+
+ // consider: typeof new Date() === object
+ } else if (QUnit.is( "Date", o)) {
+ return "date";
+
+ // consider: /./ instanceof Object;
+ // /./ instanceof RegExp;
+ // typeof /./ === "function"; // => false in IE and Opera,
+ // true in FF and Safari
+ } else if (QUnit.is( "RegExp", o)) {
+ return "regexp";
+
+ } else if (typeof o === "object") {
+ return "object";
+
+ } else if (QUnit.is( "Function", o)) {
+ return "function";
+ } else {
+ return undefined;
+ }
+ }
+
+ // Call the o related callback with the given arguments.
+ function bindCallbacks(o, callbacks, args) {
+ var prop = hoozit(o);
+ if (prop) {
+ if (hoozit(callbacks[prop]) === "function") {
+ return callbacks[prop].apply(callbacks, args);
+ } else {
+ return callbacks[prop]; // or undefined
+ }
+ }
+ }
+
+ var callbacks = function () {
+
+ // for string, boolean, number and null
+ function useStrictEquality(b, a) {
+ if (b instanceof a.constructor || a instanceof b.constructor) {
+ // to catch short annotaion VS 'new' annotation of a declaration
+ // e.g. var i = 1;
+ // var j = new Number(1);
+ return a == b;
+ } else {
+ return a === b;
+ }
+ }
+
+ return {
+ "string": useStrictEquality,
+ "boolean": useStrictEquality,
+ "number": useStrictEquality,
+ "null": useStrictEquality,
+ "undefined": useStrictEquality,
+
+ "nan": function (b) {
+ return isNaN(b);
+ },
+
+ "date": function (b, a) {
+ return hoozit(b) === "date" && a.valueOf() === b.valueOf();
+ },
+
+ "regexp": function (b, a) {
+ return hoozit(b) === "regexp" &&
+ a.source === b.source && // the regex itself
+ a.global === b.global && // and its modifers (gmi) ...
+ a.ignoreCase === b.ignoreCase &&
+ a.multiline === b.multiline;
+ },
+
+ // - skip when the property is a method of an instance (OOP)
+ // - abort otherwise,
+ // initial === would have catch identical references anyway
+ "function": function () {
+ var caller = callers[callers.length - 1];
+ return caller !== Object &&
+ typeof caller !== "undefined";
+ },
+
+ "array": function (b, a) {
+ var i;
+ var len;
+
+ // b could be an object literal here
+ if ( ! (hoozit(b) === "array")) {
+ return false;
+ }
+
+ len = a.length;
+ if (len !== b.length) { // safe and faster
+ return false;
+ }
+ for (i = 0; i < len; i++) {
+ if ( ! innerEquiv(a[i], b[i])) {
+ return false;
+ }
+ }
+ return true;
+ },
+
+ "object": function (b, a) {
+ var i;
+ var eq = true; // unless we can proove it
+ var aProperties = [], bProperties = []; // collection of strings
+
+ // comparing constructors is more strict than using instanceof
+ if ( a.constructor !== b.constructor) {
+ return false;
+ }
+
+ // stack constructor before traversing properties
+ callers.push(a.constructor);
+
+ for (i in a) { // be strict: don't ensures hasOwnProperty and go deep
+
+ aProperties.push(i); // collect a's properties
+
+ if ( ! innerEquiv(a[i], b[i])) {
+ eq = false;
+ break;
+ }
+ }
+
+ callers.pop(); // unstack, we are done
+
+ for (i in b) {
+ bProperties.push(i); // collect b's properties
+ }
+
+ // Ensures identical properties name
+ return eq && innerEquiv(aProperties.sort(), bProperties.sort());
+ }
+ };
+ }();
+
+ innerEquiv = function () { // can take multiple arguments
+ var args = Array.prototype.slice.apply(arguments);
+ if (args.length < 2) {
+ return true; // end transition
+ }
+
+ return (function (a, b) {
+ if (a === b) {
+ return true; // catch the most you can
+ } else if (a === null || b === null || typeof a === "undefined" || typeof b === "undefined" || hoozit(a) !== hoozit(b)) {
+ return false; // don't lose time with error prone cases
+ } else {
+ return bindCallbacks(a, callbacks, [b, a]);
+ }
+
+ // apply transition with (1..n) arguments
+ })(args[0], args[1]) && arguments.callee.apply(this, args.splice(1, args.length -1));
+ };
+
+ return innerEquiv;
+
+}();
+
+/**
+ * jsDump
+ * Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
+ * Licensed under BSD (http://www.opensource.org/licenses/bsd-license.php)
+ * Date: 5/15/2008
+ * @projectDescription Advanced and extensible data dumping for Javascript.
+ * @version 1.0.0
+ * @author Ariel Flesler
+ * @link {http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html}
+ */
+QUnit.jsDump = (function() {
+ function quote( str ) {
+ return '"' + str.toString().replace(/"/g, '\\"') + '"';
+ };
+ function literal( o ) {
+ return o + '';
+ };
+ function join( pre, arr, post ) {
+ var s = jsDump.separator(),
+ base = jsDump.indent(),
+ inner = jsDump.indent(1);
+ if ( arr.join )
+ arr = arr.join( ',' + s + inner );
+ if ( !arr )
+ return pre + post;
+ return [ pre, inner + arr, base + post ].join(s);
+ };
+ function array( arr ) {
+ var i = arr.length, ret = Array(i);
+ this.up();
+ while ( i-- )
+ ret[i] = this.parse( arr[i] );
+ this.down();
+ return join( '[', ret, ']' );
+ };
+
+ var reName = /^function (\w+)/;
+
+ var jsDump = {
+ parse:function( obj, type ) { //type is used mostly internally, you can fix a (custom)type in advance
+ var parser = this.parsers[ type || this.typeOf(obj) ];
+ type = typeof parser;
+
+ return type == 'function' ? parser.call( this, obj ) :
+ type == 'string' ? parser :
+ this.parsers.error;
+ },
+ typeOf:function( obj ) {
+ var type;
+ if ( obj === null ) {
+ type = "null";
+ } else if (typeof obj === "undefined") {
+ type = "undefined";
+ } else if (QUnit.is("RegExp", obj)) {
+ type = "regexp";
+ } else if (QUnit.is("Date", obj)) {
+ type = "date";
+ } else if (QUnit.is("Function", obj)) {
+ type = "function";
+ } else if (QUnit.is("Array", obj)) {
+ type = "array";
+ } else if (QUnit.is("Window", obj) || QUnit.is("global", obj)) {
+ type = "window";
+ } else if (QUnit.is("HTMLDocument", obj)) {
+ type = "document";
+ } else if (QUnit.is("HTMLCollection", obj) || QUnit.is("NodeList", obj)) {
+ type = "nodelist";
+ } else if (/^\[object HTML/.test(Object.prototype.toString.call( obj ))) {
+ type = "node";
+ } else {
+ type = typeof obj;
+ }
+ return type;
+ },
+ separator:function() {
+ return this.multiline ? this.HTML ? '<br />' : '\n' : this.HTML ? ' ' : ' ';
+ },
+ indent:function( extra ) {// extra can be a number, shortcut for increasing-calling-decreasing
+ if ( !this.multiline )
+ return '';
+ var chr = this.indentChar;
+ if ( this.HTML )
+ chr = chr.replace(/\t/g,' ').replace(/ /g,' ');
+ return Array( this._depth_ + (extra||0) ).join(chr);
+ },
+ up:function( a ) {
+ this._depth_ += a || 1;
+ },
+ down:function( a ) {
+ this._depth_ -= a || 1;
+ },
+ setParser:function( name, parser ) {
+ this.parsers[name] = parser;
+ },
+ // The next 3 are exposed so you can use them
+ quote:quote,
+ literal:literal,
+ join:join,
+ //
+ _depth_: 1,
+ // This is the list of parsers, to modify them, use jsDump.setParser
+ parsers:{
+ window: '[Window]',
+ document: '[Document]',
+ error:'[ERROR]', //when no parser is found, shouldn't happen
+ unknown: '[Unknown]',
+ 'null':'null',
+ undefined:'undefined',
+ 'function':function( fn ) {
+ var ret = 'function',
+ name = 'name' in fn ? fn.name : (reName.exec(fn)||[])[1];//functions never have name in IE
+ if ( name )
+ ret += ' ' + name;
+ ret += '(';
+
+ ret = [ ret, this.parse( fn, 'functionArgs' ), '){'].join('');
+ return join( ret, this.parse(fn,'functionCode'), '}' );
+ },
+ array: array,
+ nodelist: array,
+ arguments: array,
+ object:function( map ) {
+ var ret = [ ];
+ this.up();
+ for ( var key in map )
+ ret.push( this.parse(key,'key') + ': ' + this.parse(map[key]) );
+ this.down();
+ return join( '{', ret, '}' );
+ },
+ node:function( node ) {
+ var open = this.HTML ? '<' : '<',
+ close = this.HTML ? '>' : '>';
+
+ var tag = node.nodeName.toLowerCase(),
+ ret = open + tag;
+
+ for ( var a in this.DOMAttrs ) {
+ var val = node[this.DOMAttrs[a]];
+ if ( val )
+ ret += ' ' + a + '=' + this.parse( val, 'attribute' );
+ }
+ return ret + close + open + '/' + tag + close;
+ },
+ functionArgs:function( fn ) {//function calls it internally, it's the arguments part of the function
+ var l = fn.length;
+ if ( !l ) return '';
+
+ var args = Array(l);
+ while ( l-- )
+ args[l] = String.fromCharCode(97+l);//97 is 'a'
+ return ' ' + args.join(', ') + ' ';
+ },
+ key:quote, //object calls it internally, the key part of an item in a map
+ functionCode:'[code]', //function calls it internally, it's the content of the function
+ attribute:quote, //node calls it internally, it's an html attribute value
+ string:quote,
+ date:quote,
+ regexp:literal, //regex
+ number:literal,
+ 'boolean':literal
+ },
+ DOMAttrs:{//attributes to dump from nodes, name=>realName
+ id:'id',
+ name:'name',
+ 'class':'className'
+ },
+ HTML:true,//if true, entities are escaped ( <, >, \t, space and \n )
+ indentChar:' ',//indentation unit
+ multiline:true //if true, items in a collection, are separated by a \n, else just a space.
+ };
+
+ return jsDump;
+})();
+
+})(this);
Deleted: branches/RF-7817/examples/input-demo/src/main/webapp/resources/qunit/richfaces-qunit.js
===================================================================
--- trunk/examples/input-demo/src/main/webapp/resources/qunit/richfaces-qunit.js 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/examples/input-demo/src/main/webapp/resources/qunit/richfaces-qunit.js 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,30 +0,0 @@
-window.RichFaces = window.RichFaces || {};
-RichFaces.QUnit = (function(){
- var setTestHeader = function (header) {
- var e = document.getElementById("qunit-header");
- e.innerHTML = header;
- };
-
- return {
- appendDomElements: function (parent, html) {
- var element = document.createElement("div");
- element.innerHTML = html;
- var elements = [], e;
- while (e = element.firstChild) {
- elements.push(e);
- parent.appendChild(e);
- }
- return elements;
- },
- removeDomElements: function (elements) {
- var element;
- while (elements.length>0) {
- element = elements.pop();
- element.parentNode.removeChild(element);
- }
- },
- run: function (f) {
- jQuery(document).ready(f);
- }
- };
-}());
\ No newline at end of file
Copied: branches/RF-7817/examples/input-demo/src/main/webapp/resources/qunit/richfaces-qunit.js (from rev 19674, trunk/examples/input-demo/src/main/webapp/resources/qunit/richfaces-qunit.js)
===================================================================
--- branches/RF-7817/examples/input-demo/src/main/webapp/resources/qunit/richfaces-qunit.js (rev 0)
+++ branches/RF-7817/examples/input-demo/src/main/webapp/resources/qunit/richfaces-qunit.js 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,30 @@
+window.RichFaces = window.RichFaces || {};
+RichFaces.QUnit = (function(){
+ var setTestHeader = function (header) {
+ var e = document.getElementById("qunit-header");
+ e.innerHTML = header;
+ };
+
+ return {
+ appendDomElements: function (parent, html) {
+ var element = document.createElement("div");
+ element.innerHTML = html;
+ var elements = [], e;
+ while (e = element.firstChild) {
+ elements.push(e);
+ parent.appendChild(e);
+ }
+ return elements;
+ },
+ removeDomElements: function (elements) {
+ var element;
+ while (elements.length>0) {
+ element = elements.pop();
+ element.parentNode.removeChild(element);
+ }
+ },
+ run: function (f) {
+ jQuery(document).ready(f);
+ }
+ };
+}());
\ No newline at end of file
Copied: branches/RF-7817/examples/input-demo/src/main/webapp/resources/tests (from rev 19674, trunk/examples/input-demo/src/main/webapp/resources/tests)
Deleted: branches/RF-7817/examples/input-demo/src/main/webapp/resources/tests/autocomplete-qunit.js
===================================================================
--- trunk/examples/input-demo/src/main/webapp/resources/tests/autocomplete-qunit.js 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/examples/input-demo/src/main/webapp/resources/tests/autocomplete-qunit.js 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,240 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright ${year}, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-RichFaces.QUnit.run(function() {
- module("richfaces-autocomplete");
-
- var AUTOCOMPLETE_ID = "form:autocomplete";
-
- // Constructor tests
- test("RichFaces.ui.Autocomplete constructor test", function () {
- expect(15);
- var c = RichFaces.$(AUTOCOMPLETE_ID+'Default');
-
- ok(c instanceof RichFaces.ui.AutocompleteBase, "inctance of RichFaces.ui.AutocompleteBase");
- ok(c instanceof RichFaces.ui.Autocomplete, "inctance of RichFaces.ui.Autocomplete");
- equals(c.name, "Autocomplete", "name");
- equals(c.id, AUTOCOMPLETE_ID+'Default', "id");
- // test default options
- equals(c.options.selectedItemClass, 'rf-au-sel', "options.selectedItemClass");
- equals(c.options.itemClass, 'rf-au-opt', "options.itemClass");
- equals(c.options.autofill, true, "options.autofill");
- equals(c.options.minChars, 1, "options.minChars");
- equals(c.options.selectFirst, true, "options.selectFirst");
- equals(c.options.ajaxMode, true, "options.ajaxMode");
- equals(c.options.lazyClientMode, false, "options.lazyClientMode");
- equals(c.options.isCachedAjax, true, "options.isCachedAjax");
- equals(c.options.tokens, "", "options.tokens");
- equals(c.options.attachToBody, true, "options.attachToBody");
- equals(c.options.filterFunction, undefined, "options.filterFunction");
- });
-
- // Client API tests
- test("RichFaces.ui.Autocomplete client api function's", function () {
- expect(5);
- var CLIENT_API_BASE = ['show','hide','getNamespace','getInputValue','setInputValue'];
- var CLIENT_API = [];
- var c = RichFaces.$(AUTOCOMPLETE_ID+'Default');
- var fn = "";
- for (var i=0; i<CLIENT_API_BASE.length; i++) {
- fn = CLIENT_API_BASE[i];
- ok(typeof c[fn] == "function", fn+" present in component");
- }
- });
-
- test("RichFaces.ui.Autocomplete client api: show/hide [attachToDom=true]", function () {
- expect(6);
- var c = RichFaces.$(AUTOCOMPLETE_ID+'Default');
- var e = RichFaces.getDomElement(AUTOCOMPLETE_ID+'DefaultList');
- equals(e.parentNode.tagName.toLowerCase(), "div", "before show list attached to");
- equals($(e).css("display"), "none", "list style.display");
- c.show();
- e = RichFaces.getDomElement(AUTOCOMPLETE_ID+'DefaultList');
- equals(e.parentNode.tagName.toLowerCase(), "body", "after show list attached to");
- equals(e.style.display, "block", "list style.display");
- c.hide();
- e = RichFaces.getDomElement(AUTOCOMPLETE_ID+'DefaultList');
- equals(e.parentNode.tagName.toLowerCase(), "div", "after hide list attached to");
- equals(e.style.display, "none", "list style.display");
- });
-
- test("RichFaces.ui.Autocomplete client api: getNamespace", function () {
- expect(1);
- var c = RichFaces.$(AUTOCOMPLETE_ID+'Default');
- equals(c.getNamespace(), '.'+RichFaces.Event.createNamespace(c.name, AUTOCOMPLETE_ID+'Default'), "getNamespace");
- });
-
- test("RichFaces.ui.Autocomplete client api: getInputValue / setInputValue", function () {
- expect(2);
- var c = RichFaces.$(AUTOCOMPLETE_ID+'Default');
- equals(c.getInputValue(), 'a', "getInputValue");
- c.setInputValue("b");
- equals(c.getInputValue(), 'b', "getInputValue after setInputValue");
- });
-
- //Inline user's event handlers tests
- window.checkInlineEvent = function (event, c, checkData) {
- var richContainer = event[RichFaces.RICH_CONTAINER];
- ok(richContainer, "rich container is present in event");
- ok(richContainer.component, "component is present in rich container");
- equals(richContainer.component, c, "component");
- if (checkData) {
- ok(typeof richContainer.data!="undefined", "data is present in rich container");
- equals(richContainer.data, RichFaces.getDomElement(AUTOCOMPLETE_ID+'Default2Input').value, "data");
- }
- };
-
- test("RichFaces.ui.Autocomplete inline event handlers: focus/blur", function () {
- expect(10);
- var c = RichFaces.$(AUTOCOMPLETE_ID+'Default');
-
- window.onEvent = function (event) {
- ok(event, "event is present");
- equals(event.type, "focus", "event type after focus");
- checkInlineEvent(event, c);
- };
- var input = RichFaces.getDomElement(AUTOCOMPLETE_ID+'DefaultInput');
- input.focus();
-
- window.onEvent = function (event) {
- ok(event, "event is present");
- equals(event.type, "blur", "event type after blur");
- checkInlineEvent(event, c);
- };
- input = RichFaces.getDomElement(AUTOCOMPLETE_ID+'Default2Input');
- input.focus();
- window.onEvent = function (){};
- });
-
- test("RichFaces.ui.Autocomplete inline event handlers: change", function () {
- expect(5);
- var c = RichFaces.$(AUTOCOMPLETE_ID+'Default');
-
- window.onEvent = function (event) {
- if (event.type!="change") return;
- ok(event, "event is present");
- equals(event.type, "change", "event type");
- checkInlineEvent(event, c);
- };
- var input = RichFaces.getDomElement(AUTOCOMPLETE_ID+'DefaultInput');
- input.value="";
- input.focus();
- input.value="a";
- input = RichFaces.getDomElement(AUTOCOMPLETE_ID+'Default2Input');
- input.focus();
- window.onEvent = function (){};
- });
-
- test("RichFaces.ui.Autocomplete inline event handlers: selectitem", function () {
- expect(7);
- var c = RichFaces.$(AUTOCOMPLETE_ID+'Default2');
-
- window.onEvent = function (event) {
- if (event.type!="selectitem") return;
- ok(event, "event is present");
- equals(event.type, "selectitem", "event type");
- checkInlineEvent(event, c, true);
- };
- var input = RichFaces.getDomElement(AUTOCOMPLETE_ID+'Default2Input');
- input.value="a";
- var button = RichFaces.getDomElement(AUTOCOMPLETE_ID+'Default2Button');
- RichFaces.Event.fire(button,"mousedown");
- c.__onEnter.call(c, {which:13});
- c.hide();
- input = RichFaces.getDomElement(AUTOCOMPLETE_ID+'ClientModeInput');
- input.focus();
- window.onEvent = function (){};
- });
-
- //Binded user's event handlers tests
- window.checkBindedEvent = function (event, element, c) {
- equals(element.id, c.id, "element id");
- equals(RichFaces.$(element.id), c, "component");
- };
-
- test("RichFaces.ui.Autocomplete binded event handlers: focus/blur", function () {
- expect(10);
- var c = RichFaces.$(AUTOCOMPLETE_ID+'Default');
- RichFaces.Event.bindById(AUTOCOMPLETE_ID+'Default', {"focus": function (event, element) {
- ok(event, "event is present");
- ok(element, "element is present");
- equals(event.type, "focus", "event type after focus");
- checkBindedEvent(event, element, c);
- },
- "blur": function (event, element) {
- ok(event, "event is present");
- ok(element, "element is present");
- equals(event.type, "blur", "event type after blur");
- checkBindedEvent(event, element, c);
- }
- });
- var input = RichFaces.getDomElement(AUTOCOMPLETE_ID+'DefaultInput');
- input.focus();
- input = RichFaces.getDomElement(AUTOCOMPLETE_ID+'Default2Input');
- input.focus();
- RichFaces.Event.unbindById(AUTOCOMPLETE_ID+'Default', "focus blur");
- });
-
- test("RichFaces.ui.Autocomplete binded event handlers: change", function () {
- expect(5);
- var c = RichFaces.$(AUTOCOMPLETE_ID+'Default');
- RichFaces.Event.bindById(AUTOCOMPLETE_ID+'Default', "change", function (event, element) {
- ok(event, "event is present");
- ok(element, "element is present");
- equals(event.type, "change", "event type");
- checkBindedEvent(event, element, c);
- });
- var input = RichFaces.getDomElement(AUTOCOMPLETE_ID+'DefaultInput');
- input.value="";
- input.focus();
- input.value="a"
- input = RichFaces.getDomElement(AUTOCOMPLETE_ID+'Default2Input');
- input.focus();
- RichFaces.Event.unbindById(AUTOCOMPLETE_ID+'Default', "change");
- });
-
- test("RichFaces.ui.Autocomplete binded event handlers: selectitem", function () {
- expect(7);
- var c = RichFaces.$(AUTOCOMPLETE_ID+'Default2');
-
- RichFaces.Event.bindById(AUTOCOMPLETE_ID+'Default2', "selectitem", function (event, element, data) {
- ok(event, "event is present");
- ok(element, "element is present");
- ok(data, "data is present");
- equals(data, RichFaces.getDomElement(AUTOCOMPLETE_ID+'Default2Input').value, "data");
- equals(event.type, "selectitem", "event type");
- checkBindedEvent(event, element, c);
- });
- var input = RichFaces.getDomElement(AUTOCOMPLETE_ID+'Default2Input');
- input.value="a";
- var button = RichFaces.getDomElement(AUTOCOMPLETE_ID+'Default2Button');
- RichFaces.Event.fire(button,"mousedown");
- c.__onEnter.call(c, {which:13});
- c.hide();
- input = RichFaces.getDomElement(AUTOCOMPLETE_ID+'ClientModeInput');
- input.focus();
- RichFaces.Event.unbindById(AUTOCOMPLETE_ID+'Default2', "selectitem");
- });
-
- // TODO add modes test ?? or create selenium tests for modes ??
-
-});
Copied: branches/RF-7817/examples/input-demo/src/main/webapp/resources/tests/autocomplete-qunit.js (from rev 19674, trunk/examples/input-demo/src/main/webapp/resources/tests/autocomplete-qunit.js)
===================================================================
--- branches/RF-7817/examples/input-demo/src/main/webapp/resources/tests/autocomplete-qunit.js (rev 0)
+++ branches/RF-7817/examples/input-demo/src/main/webapp/resources/tests/autocomplete-qunit.js 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,240 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+RichFaces.QUnit.run(function() {
+ module("richfaces-autocomplete");
+
+ var AUTOCOMPLETE_ID = "form:autocomplete";
+
+ // Constructor tests
+ test("RichFaces.ui.Autocomplete constructor test", function () {
+ expect(15);
+ var c = RichFaces.$(AUTOCOMPLETE_ID+'Default');
+
+ ok(c instanceof RichFaces.ui.AutocompleteBase, "inctance of RichFaces.ui.AutocompleteBase");
+ ok(c instanceof RichFaces.ui.Autocomplete, "inctance of RichFaces.ui.Autocomplete");
+ equals(c.name, "Autocomplete", "name");
+ equals(c.id, AUTOCOMPLETE_ID+'Default', "id");
+ // test default options
+ equals(c.options.selectedItemClass, 'rf-au-sel', "options.selectedItemClass");
+ equals(c.options.itemClass, 'rf-au-opt', "options.itemClass");
+ equals(c.options.autofill, true, "options.autofill");
+ equals(c.options.minChars, 1, "options.minChars");
+ equals(c.options.selectFirst, true, "options.selectFirst");
+ equals(c.options.ajaxMode, true, "options.ajaxMode");
+ equals(c.options.lazyClientMode, false, "options.lazyClientMode");
+ equals(c.options.isCachedAjax, true, "options.isCachedAjax");
+ equals(c.options.tokens, "", "options.tokens");
+ equals(c.options.attachToBody, true, "options.attachToBody");
+ equals(c.options.filterFunction, undefined, "options.filterFunction");
+ });
+
+ // Client API tests
+ test("RichFaces.ui.Autocomplete client api function's", function () {
+ expect(5);
+ var CLIENT_API_BASE = ['show','hide','getNamespace','getInputValue','setInputValue'];
+ var CLIENT_API = [];
+ var c = RichFaces.$(AUTOCOMPLETE_ID+'Default');
+ var fn = "";
+ for (var i=0; i<CLIENT_API_BASE.length; i++) {
+ fn = CLIENT_API_BASE[i];
+ ok(typeof c[fn] == "function", fn+" present in component");
+ }
+ });
+
+ test("RichFaces.ui.Autocomplete client api: show/hide [attachToDom=true]", function () {
+ expect(6);
+ var c = RichFaces.$(AUTOCOMPLETE_ID+'Default');
+ var e = RichFaces.getDomElement(AUTOCOMPLETE_ID+'DefaultList');
+ equals(e.parentNode.tagName.toLowerCase(), "div", "before show list attached to");
+ equals($(e).css("display"), "none", "list style.display");
+ c.show();
+ e = RichFaces.getDomElement(AUTOCOMPLETE_ID+'DefaultList');
+ equals(e.parentNode.tagName.toLowerCase(), "body", "after show list attached to");
+ equals(e.style.display, "block", "list style.display");
+ c.hide();
+ e = RichFaces.getDomElement(AUTOCOMPLETE_ID+'DefaultList');
+ equals(e.parentNode.tagName.toLowerCase(), "div", "after hide list attached to");
+ equals(e.style.display, "none", "list style.display");
+ });
+
+ test("RichFaces.ui.Autocomplete client api: getNamespace", function () {
+ expect(1);
+ var c = RichFaces.$(AUTOCOMPLETE_ID+'Default');
+ equals(c.getNamespace(), '.'+RichFaces.Event.createNamespace(c.name, AUTOCOMPLETE_ID+'Default'), "getNamespace");
+ });
+
+ test("RichFaces.ui.Autocomplete client api: getInputValue / setInputValue", function () {
+ expect(2);
+ var c = RichFaces.$(AUTOCOMPLETE_ID+'Default');
+ equals(c.getInputValue(), 'a', "getInputValue");
+ c.setInputValue("b");
+ equals(c.getInputValue(), 'b', "getInputValue after setInputValue");
+ });
+
+ //Inline user's event handlers tests
+ window.checkInlineEvent = function (event, c, checkData) {
+ var richContainer = event[RichFaces.RICH_CONTAINER];
+ ok(richContainer, "rich container is present in event");
+ ok(richContainer.component, "component is present in rich container");
+ equals(richContainer.component, c, "component");
+ if (checkData) {
+ ok(typeof richContainer.data!="undefined", "data is present in rich container");
+ equals(richContainer.data, RichFaces.getDomElement(AUTOCOMPLETE_ID+'Default2Input').value, "data");
+ }
+ };
+
+ test("RichFaces.ui.Autocomplete inline event handlers: focus/blur", function () {
+ expect(10);
+ var c = RichFaces.$(AUTOCOMPLETE_ID+'Default');
+
+ window.onEvent = function (event) {
+ ok(event, "event is present");
+ equals(event.type, "focus", "event type after focus");
+ checkInlineEvent(event, c);
+ };
+ var input = RichFaces.getDomElement(AUTOCOMPLETE_ID+'DefaultInput');
+ input.focus();
+
+ window.onEvent = function (event) {
+ ok(event, "event is present");
+ equals(event.type, "blur", "event type after blur");
+ checkInlineEvent(event, c);
+ };
+ input = RichFaces.getDomElement(AUTOCOMPLETE_ID+'Default2Input');
+ input.focus();
+ window.onEvent = function (){};
+ });
+
+ test("RichFaces.ui.Autocomplete inline event handlers: change", function () {
+ expect(5);
+ var c = RichFaces.$(AUTOCOMPLETE_ID+'Default');
+
+ window.onEvent = function (event) {
+ if (event.type!="change") return;
+ ok(event, "event is present");
+ equals(event.type, "change", "event type");
+ checkInlineEvent(event, c);
+ };
+ var input = RichFaces.getDomElement(AUTOCOMPLETE_ID+'DefaultInput');
+ input.value="";
+ input.focus();
+ input.value="a";
+ input = RichFaces.getDomElement(AUTOCOMPLETE_ID+'Default2Input');
+ input.focus();
+ window.onEvent = function (){};
+ });
+
+ test("RichFaces.ui.Autocomplete inline event handlers: selectitem", function () {
+ expect(7);
+ var c = RichFaces.$(AUTOCOMPLETE_ID+'Default2');
+
+ window.onEvent = function (event) {
+ if (event.type!="selectitem") return;
+ ok(event, "event is present");
+ equals(event.type, "selectitem", "event type");
+ checkInlineEvent(event, c, true);
+ };
+ var input = RichFaces.getDomElement(AUTOCOMPLETE_ID+'Default2Input');
+ input.value="a";
+ var button = RichFaces.getDomElement(AUTOCOMPLETE_ID+'Default2Button');
+ RichFaces.Event.fire(button,"mousedown");
+ c.__onEnter.call(c, {which:13});
+ c.hide();
+ input = RichFaces.getDomElement(AUTOCOMPLETE_ID+'ClientModeInput');
+ input.focus();
+ window.onEvent = function (){};
+ });
+
+ //Binded user's event handlers tests
+ window.checkBindedEvent = function (event, element, c) {
+ equals(element.id, c.id, "element id");
+ equals(RichFaces.$(element.id), c, "component");
+ };
+
+ test("RichFaces.ui.Autocomplete binded event handlers: focus/blur", function () {
+ expect(10);
+ var c = RichFaces.$(AUTOCOMPLETE_ID+'Default');
+ RichFaces.Event.bindById(AUTOCOMPLETE_ID+'Default', {"focus": function (event, element) {
+ ok(event, "event is present");
+ ok(element, "element is present");
+ equals(event.type, "focus", "event type after focus");
+ checkBindedEvent(event, element, c);
+ },
+ "blur": function (event, element) {
+ ok(event, "event is present");
+ ok(element, "element is present");
+ equals(event.type, "blur", "event type after blur");
+ checkBindedEvent(event, element, c);
+ }
+ });
+ var input = RichFaces.getDomElement(AUTOCOMPLETE_ID+'DefaultInput');
+ input.focus();
+ input = RichFaces.getDomElement(AUTOCOMPLETE_ID+'Default2Input');
+ input.focus();
+ RichFaces.Event.unbindById(AUTOCOMPLETE_ID+'Default', "focus blur");
+ });
+
+ test("RichFaces.ui.Autocomplete binded event handlers: change", function () {
+ expect(5);
+ var c = RichFaces.$(AUTOCOMPLETE_ID+'Default');
+ RichFaces.Event.bindById(AUTOCOMPLETE_ID+'Default', "change", function (event, element) {
+ ok(event, "event is present");
+ ok(element, "element is present");
+ equals(event.type, "change", "event type");
+ checkBindedEvent(event, element, c);
+ });
+ var input = RichFaces.getDomElement(AUTOCOMPLETE_ID+'DefaultInput');
+ input.value="";
+ input.focus();
+ input.value="a"
+ input = RichFaces.getDomElement(AUTOCOMPLETE_ID+'Default2Input');
+ input.focus();
+ RichFaces.Event.unbindById(AUTOCOMPLETE_ID+'Default', "change");
+ });
+
+ test("RichFaces.ui.Autocomplete binded event handlers: selectitem", function () {
+ expect(7);
+ var c = RichFaces.$(AUTOCOMPLETE_ID+'Default2');
+
+ RichFaces.Event.bindById(AUTOCOMPLETE_ID+'Default2', "selectitem", function (event, element, data) {
+ ok(event, "event is present");
+ ok(element, "element is present");
+ ok(data, "data is present");
+ equals(data, RichFaces.getDomElement(AUTOCOMPLETE_ID+'Default2Input').value, "data");
+ equals(event.type, "selectitem", "event type");
+ checkBindedEvent(event, element, c);
+ });
+ var input = RichFaces.getDomElement(AUTOCOMPLETE_ID+'Default2Input');
+ input.value="a";
+ var button = RichFaces.getDomElement(AUTOCOMPLETE_ID+'Default2Button');
+ RichFaces.Event.fire(button,"mousedown");
+ c.__onEnter.call(c, {which:13});
+ c.hide();
+ input = RichFaces.getDomElement(AUTOCOMPLETE_ID+'ClientModeInput');
+ input.focus();
+ RichFaces.Event.unbindById(AUTOCOMPLETE_ID+'Default2', "selectitem");
+ });
+
+ // TODO add modes test ?? or create selenium tests for modes ??
+
+});
Copied: branches/RF-7817/examples/input-demo/src/main/webapp/templates (from rev 19674, trunk/examples/input-demo/src/main/webapp/templates)
Deleted: branches/RF-7817/examples/input-demo/src/main/webapp/templates/template.xhtml
===================================================================
--- trunk/examples/input-demo/src/main/webapp/templates/template.xhtml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/examples/input-demo/src/main/webapp/templates/template.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,67 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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" >
-
-<h:head>
- <title>
- <ui:define name="title">Application Title</ui:define>
- </title>
-
- <meta http-equiv="content-type" content="text/xhtml; charset=UTF-8" />
-</h:head>
-
-<h:body>
-
-
- <ui:insert name="scripts" ></ui:insert>
- <table width="100%">
- <thead>
- <tr>
- <th width="20%" align="left">Content</th>
- <th width="80%" align="left">
- <ui:insert name="body_head">Example</ui:insert>
- </th>
- </tr>
- </thead>
- <tbody>
- <tr valign="top">
- <td>
- <h:form id="nav">
- <p>Input Component's Examples</p>
- <ul>
- <li><h:commandLink value="rich:inplaceInput" action="inplaceInput" /></li>
- <li><h:commandLink value="rich:inplaceSelect" action="inplaceSelect" /></li>
- <li><h:commandLink value="rich:inputNumberSlider" action="inputNumberSlider" /></li>
- <li><h:commandLink value="rich:inputNumberSpinner" action="inputNumberSpinner" /></li>
- <li><h:commandLink value="rich:autocomplete" action="autocomplete" /></li>
- </ul>
-
- <h:panelGrid columns="3">
- <h:commandButton value="Classic">
- <f:setPropertyActionListener target="#{skinBean.skin}" value="classic" />
- </h:commandButton>
- <h:commandButton value="BlueSky">
- <f:setPropertyActionListener target="#{skinBean.skin}" value="blueSky" />
- </h:commandButton>
- <h:commandButton value="DeepMarine">
- <f:setPropertyActionListener target="#{skinBean.skin}" value="deepMarine" />
- </h:commandButton>
- </h:panelGrid>
-
- <p>QUnit tests</p>
- <ul>
- <li><h:commandLink value="rich:autocomplete qunit" action="qunit/autocomplete" /></li>
- </ul>
- </h:form>
- </td>
- <td>
- <ui:insert name="body">Default content</ui:insert>
- </td>
- </tr>
- </tbody>
- </table>
-
-</h:body>
-</html>
\ No newline at end of file
Copied: branches/RF-7817/examples/input-demo/src/main/webapp/templates/template.xhtml (from rev 19674, trunk/examples/input-demo/src/main/webapp/templates/template.xhtml)
===================================================================
--- branches/RF-7817/examples/input-demo/src/main/webapp/templates/template.xhtml (rev 0)
+++ branches/RF-7817/examples/input-demo/src/main/webapp/templates/template.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,67 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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" >
+
+<h:head>
+ <title>
+ <ui:define name="title">Application Title</ui:define>
+ </title>
+
+ <meta http-equiv="content-type" content="text/xhtml; charset=UTF-8" />
+</h:head>
+
+<h:body>
+
+
+ <ui:insert name="scripts" ></ui:insert>
+ <table width="100%">
+ <thead>
+ <tr>
+ <th width="20%" align="left">Content</th>
+ <th width="80%" align="left">
+ <ui:insert name="body_head">Example</ui:insert>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr valign="top">
+ <td>
+ <h:form id="nav">
+ <p>Input Component's Examples</p>
+ <ul>
+ <li><h:commandLink value="rich:inplaceInput" action="inplaceInput" /></li>
+ <li><h:commandLink value="rich:inplaceSelect" action="inplaceSelect" /></li>
+ <li><h:commandLink value="rich:inputNumberSlider" action="inputNumberSlider" /></li>
+ <li><h:commandLink value="rich:inputNumberSpinner" action="inputNumberSpinner" /></li>
+ <li><h:commandLink value="rich:autocomplete" action="autocomplete" /></li>
+ </ul>
+
+ <h:panelGrid columns="3">
+ <h:commandButton value="Classic">
+ <f:setPropertyActionListener target="#{skinBean.skin}" value="classic" />
+ </h:commandButton>
+ <h:commandButton value="BlueSky">
+ <f:setPropertyActionListener target="#{skinBean.skin}" value="blueSky" />
+ </h:commandButton>
+ <h:commandButton value="DeepMarine">
+ <f:setPropertyActionListener target="#{skinBean.skin}" value="deepMarine" />
+ </h:commandButton>
+ </h:panelGrid>
+
+ <p>QUnit tests</p>
+ <ul>
+ <li><h:commandLink value="rich:autocomplete qunit" action="qunit/autocomplete" /></li>
+ </ul>
+ </h:form>
+ </td>
+ <td>
+ <ui:insert name="body">Default content</ui:insert>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+</h:body>
+</html>
\ No newline at end of file
Modified: branches/RF-7817/examples/iteration-demo/src/main/webapp/dataGrid.xhtml
===================================================================
--- branches/RF-7817/examples/iteration-demo/src/main/webapp/dataGrid.xhtml 2010-10-27 16:17:45 UTC (rev 19703)
+++ branches/RF-7817/examples/iteration-demo/src/main/webapp/dataGrid.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -39,15 +39,11 @@
<h:body>
<h:form id="form1">
- <it:dataGrid columns="3" var="record" elements="8" value="#{dataBean.employeeList}">
+ <it:dataGrid id="dataGrid" columns="3" var="record" elements="8" value="#{dataBean.employeeList}">
<f:facet name="header">
<h:outputText value="header"/>
</f:facet>
- <f:facet name="footer">
- <h:outputText value="footer"/>
- </f:facet>
-
<f:facet name="caption">
<h:outputText value="caption"/>
</f:facet>
Modified: branches/RF-7817/examples/output-demo/pom.xml
===================================================================
--- branches/RF-7817/examples/output-demo/pom.xml 2010-10-27 16:17:45 UTC (rev 19703)
+++ branches/RF-7817/examples/output-demo/pom.xml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -20,7 +20,7 @@
</properties>
<build>
- <finalName>${artifactId}-${project.version}</finalName>
+ <finalName>${project.artifactId}-${project.version}</finalName>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
Copied: branches/RF-7817/examples/output-demo/src/main/java/org/richfaces/ModalPanel.java (from rev 19674, trunk/examples/output-demo/src/main/java/org/richfaces/ModalPanel.java)
===================================================================
--- branches/RF-7817/examples/output-demo/src/main/java/org/richfaces/ModalPanel.java (rev 0)
+++ branches/RF-7817/examples/output-demo/src/main/java/org/richfaces/ModalPanel.java 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,196 @@
+package org.richfaces;
+
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.RequestScoped;
+@ManagedBean
+@RequestScoped
+public class ModalPanel {
+ private boolean autosized;
+ private boolean keepVisualState;
+ private String left;
+ private String top;
+ private boolean rendered;
+ private String shadowDepth;
+ private String shadowOpacity;
+ private boolean show;
+ private int zindex;
+ private int minHeight;
+ private int minWidth;
+ private int maxHeight;
+ private int maxWidth;
+ private int height;
+ private int width;
+ private boolean moveable;
+ private boolean resizeable;
+ private String inputTextTest;
+ private String domElementAttachment;
+
+
+ public String getInputTextTest() {
+ return inputTextTest;
+ }
+
+ public void setInputTextTest(String inputTextTest) {
+ this.inputTextTest = inputTextTest;
+ }
+
+ public ModalPanel() {
+ this.inputTextTest = "text";
+ this.minHeight = 100;
+ this.minWidth = 100;
+ this.height = 300;
+ this.width = 300;
+ this.maxWidth = -1;
+ this.maxHeight = -1;
+ this.moveable=true;
+ this.resizeable=true;
+ this.autosized = false;
+ this.keepVisualState = false;
+ this.left = "auto";
+ this.top = "auto";
+ this.rendered = true;
+ this.shadowDepth = "3";
+ this.shadowOpacity = "3";
+ this.show = false;
+ this.domElementAttachment = "body";
+ }
+
+ public int getHeight() {
+ return height;
+ }
+
+ public void setHeight(int height) {
+ this.height = height;
+ }
+
+ public int getMinHeight() {
+ return minHeight;
+ }
+
+ public void setMinHeight(int minHeight) {
+ this.minHeight = minHeight;
+ }
+
+ public int getMaxWidth() {
+ return maxWidth;
+ }
+
+ public void setMaxWidth(int maxWidth) {
+ this.maxWidth = minWidth;
+ }
+
+ public int getMaxHeight() {
+ return maxHeight;
+ }
+
+ public void setMaxHeight(int maxHeight) {
+ this.maxHeight = maxHeight;
+ }
+
+ public int getMinWidth() {
+ return minWidth;
+ }
+
+ public void setMinWidth(int minWidth) {
+ this.minWidth = minWidth;
+ }
+
+ public boolean isMoveable() {
+ return moveable;
+ }
+
+ public void setMoveable(boolean moveable) {
+ this.moveable = moveable;
+ }
+
+ public boolean isResizeable() {
+ return resizeable;
+ }
+
+ public void setResizeable(boolean resizeable) {
+ this.resizeable = resizeable;
+ }
+
+ public void setAutosized(boolean autosized) {
+ this.autosized = autosized;
+ }
+
+
+ public int getWidth() {
+ return width;
+ }
+
+ public void setWidth(int width) {
+ this.width = width;
+ }
+
+ public boolean isAutosized() {
+ return autosized;
+ }
+
+ public boolean isKeepVisualState() {
+ return keepVisualState;
+ }
+
+ public void setKeepVisualState(boolean keepVisualState) {
+ this.keepVisualState = keepVisualState;
+ }
+
+ public String getLeft() {
+ return left;
+ }
+
+ public void setLeft(String left) {
+ this.left = left;
+ }
+
+ public String getTop() {
+ return top;
+ }
+
+ public void setTop(String top) {
+ this.top = top;
+ }
+
+ public boolean getRendered() {
+ return rendered;
+ }
+
+ public void setRendered(boolean rendered) {
+ this.rendered = rendered;
+ }
+
+ public String getShadowDepth() {
+ return shadowDepth;
+ }
+
+ public void setShadowDepth(String shadowDepth) {
+ this.shadowDepth = shadowDepth;
+ }
+
+ public String getShadowOpacity() {
+ return shadowOpacity;
+ }
+
+ public void setShadowOpacity(String shadowOpacity) {
+ this.shadowOpacity = shadowOpacity;
+ }
+
+ public boolean isShow() {
+ return show;
+ }
+
+ public void setShow(boolean show) {
+ this.show = show;
+ }
+
+ public String getDomElementAttachment() {
+ return domElementAttachment;
+ }
+
+ public void setDomElementAttachment(String domElementAttachment) {
+ this.domElementAttachment = domElementAttachment;
+ }
+}
\ No newline at end of file
Copied: branches/RF-7817/examples/output-demo/src/main/java/org/richfaces/ProgressBarBean.java (from rev 19674, trunk/examples/output-demo/src/main/java/org/richfaces/ProgressBarBean.java)
===================================================================
--- branches/RF-7817/examples/output-demo/src/main/java/org/richfaces/ProgressBarBean.java (rev 0)
+++ branches/RF-7817/examples/output-demo/src/main/java/org/richfaces/ProgressBarBean.java 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,71 @@
+/**
+ *
+ */
+package org.richfaces;
+
+import java.util.Date;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+/**
+ * @author Ilya Shaikovsky
+ *
+ */
+@ManagedBean
+@ViewScoped
+public class ProgressBarBean {
+
+ private boolean buttonRendered = true;
+ private boolean enabled=false;
+ private Long startTime;
+
+ public String startProcess() {
+ setEnabled(true);
+ setButtonRendered(false);
+ setStartTime(new Date().getTime());
+ return null;
+ }
+
+ public Long getCurrentValue(){
+ if (isEnabled()) {
+ Long current = (new Date().getTime() - startTime)/1000;
+ if (current>100){
+ setButtonRendered(true);
+ } else if (current.equals(0)) {
+ return new Long(1);
+ }
+ return (new Date().getTime() - startTime)/1000;
+ }
+ if (startTime == null) {
+ return Long.valueOf(-1);
+ } else {
+ return Long.valueOf(101);
+ }
+
+ }
+
+ public boolean isEnabled() {
+ return enabled;
+ }
+
+ public void setEnabled(boolean enabled) {
+ this.enabled = enabled;
+ }
+
+ public Long getStartTime() {
+ return startTime;
+ }
+
+ public void setStartTime(Long startTime) {
+ this.startTime = startTime;
+ }
+
+ public boolean isButtonRendered() {
+ return buttonRendered;
+ }
+
+ public void setButtonRendered(boolean buttonRendered) {
+ this.buttonRendered = buttonRendered;
+ }
+}
\ No newline at end of file
Copied: branches/RF-7817/examples/output-demo/src/main/java/org/richfaces/SkinBean.java (from rev 19674, trunk/examples/output-demo/src/main/java/org/richfaces/SkinBean.java)
===================================================================
--- branches/RF-7817/examples/output-demo/src/main/java/org/richfaces/SkinBean.java (rev 0)
+++ branches/RF-7817/examples/output-demo/src/main/java/org/richfaces/SkinBean.java 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,61 @@
+package org.richfaces;
+
+import java.io.Serializable;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+import javax.faces.model.SelectItem;
+
+@SessionScoped
+@ManagedBean(name = "skinBean")
+public class SkinBean implements Serializable {
+
+ private static final long serialVersionUID = 2744605279708632184L;
+
+ private SelectItem[] skinSetItems = {
+ new SelectItem("blueSky"),
+ new SelectItem("classic"),
+ new SelectItem("deepMarine"),
+ new SelectItem("DEFAULT"),
+ new SelectItem("emeraldTown"),
+ new SelectItem("japanCherry"),
+ new SelectItem("NULL"),
+ new SelectItem("plain"),
+ new SelectItem("ruby"),
+ new SelectItem("wine")
+ };
+
+ private String skin = "classic";
+
+ private boolean enableElementsSkinning = true;
+
+ private boolean enableClassesSkinning = false;
+
+ public String getSkin() {
+ return skin;
+ }
+
+ public void setSkin(String skin) {
+ this.skin = skin;
+ }
+
+ public boolean isEnableElementsSkinning() {
+ return enableElementsSkinning;
+ }
+
+ public void setEnableElementsSkinning(boolean enableElementsSkinning) {
+ this.enableElementsSkinning = enableElementsSkinning;
+ }
+
+ public boolean isEnableClassesSkinning() {
+ return enableClassesSkinning;
+ }
+
+ public void setEnableClassesSkinning(boolean enableClassesSkinning) {
+ this.enableClassesSkinning = enableClassesSkinning;
+ }
+
+ public SelectItem[] getSkinSetItems() {
+ return skinSetItems;
+ }
+}
Modified: branches/RF-7817/examples/output-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- branches/RF-7817/examples/output-demo/src/main/webapp/WEB-INF/faces-config.xml 2010-10-27 16:17:45 UTC (rev 19703)
+++ branches/RF-7817/examples/output-demo/src/main/webapp/WEB-INF/faces-config.xml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -38,6 +38,22 @@
<from-outcome>collapsiblePanel</from-outcome>
<to-view-id>/examples/collapsiblePanel.xhtml</to-view-id>
</navigation-case>
+ <navigation-case>
+ <from-outcome>tabPanel</from-outcome>
+ <to-view-id>/examples/tabPanel.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>panel</from-outcome>
+ <to-view-id>/examples/panel.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>popup</from-outcome>
+ <to-view-id>/examples/popupPanel.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>progressbar</from-outcome>
+ <to-view-id>/examples/progressbar.xhtml</to-view-id>
+ </navigation-case>
<!-- QUnit -->
<navigation-case>
@@ -60,5 +76,9 @@
<from-outcome>qunit/collapsiblePanel</from-outcome>
<to-view-id>/qunit/collapsiblePanel.xhtml</to-view-id>
</navigation-case>
+ <navigation-case>
+ <from-outcome>qunit/tabPanel</from-outcome>
+ <to-view-id>/qunit/tabPanel.xhtml</to-view-id>
+ </navigation-case>
</navigation-rule>
</faces-config>
Modified: branches/RF-7817/examples/output-demo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/RF-7817/examples/output-demo/src/main/webapp/WEB-INF/web.xml 2010-10-27 16:17:45 UTC (rev 19703)
+++ branches/RF-7817/examples/output-demo/src/main/webapp/WEB-INF/web.xml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -5,7 +5,22 @@
version="2.5">
<display-name>Sample RichFaces 4 Application</display-name>
+
<context-param>
+ <param-name>org.richfaces.skin</param-name>
+ <param-value>#{skinBean.skin}</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.enableControlSkinning</param-name>
+ <param-value>#{skinBean.enableElementsSkinning}</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.enableControlSkinningClasses</param-name>
+ <param-value>#{skinBean.enableClassesSkinning}</param-value>
+ </context-param>
+
+
+ <context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
Copied: branches/RF-7817/examples/output-demo/src/main/webapp/examples/panel.xhtml (from rev 19674, trunk/examples/output-demo/src/main/webapp/examples/panel.xhtml)
===================================================================
--- branches/RF-7817/examples/output-demo/src/main/webapp/examples/panel.xhtml (rev 0)
+++ branches/RF-7817/examples/output-demo/src/main/webapp/examples/panel.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,44 @@
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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"
+ xmlns:pn="http://richfaces.org/output">
+
+<body>
+<ui:composition template="/templates/template.xhtml">
+<ui:define name="body">
+ <pn:panel>
+ <f:facet name="header">
+ Test
+ </f:facet>
+ <pn:panel>
+ <f:facet name="header">
+ Test
+ </f:facet>
+ <pn:panel>
+ <f:facet name="header">
+ Test
+ </f:facet>
+ Body text
+ </pn:panel>
+ </pn:panel>
+ </pn:panel>
+ <br/>
+ <pn:panel>
+ <f:facet name="header">
+ Test<br/>
+ Test<br/>
+ Test<br/>
+ Test<br/>
+ Test<br/>
+ </f:facet>
+ <h:form>
+ <h:outputText value="inside the form"/>
+ </h:form>
+ </pn:panel>
+ </ui:define>
+</ui:composition>
+</body>
+</html>
\ No newline at end of file
Copied: branches/RF-7817/examples/output-demo/src/main/webapp/examples/popupPanel.xhtml (from rev 19674, trunk/examples/output-demo/src/main/webapp/examples/popupPanel.xhtml)
===================================================================
--- branches/RF-7817/examples/output-demo/src/main/webapp/examples/popupPanel.xhtml (rev 0)
+++ branches/RF-7817/examples/output-demo/src/main/webapp/examples/popupPanel.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,75 @@
+<ui:composition 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"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/output" template="/templates/template.xhtml">
+
+ <ui:define name="body">
+
+<h:form id="form">
+<h:outputLink value="#"
+ onclick="RichFaces.$('form:popup').show(); return false;">
+ Open popup
+ </h:outputLink>
+<rich:popupPanel id="popup" left="#{modalPanel.left}"
+ top="#{modalPanel.top}" height="#{modalPanel.height}"
+ width="#{modalPanel.width}"
+ minHeight="#{modalPanel.minHeight}"
+ minWidth="#{modalPanel.minWidth}"
+ maxHeight="#{modalPanel.maxHeight}"
+ maxWidth="#{modalPanel.maxWidth}"
+ moveable="#{modalPanel.moveable}"
+ resizeable="#{modalPanel.resizeable}"
+ keepVisualState="#{modalPanel.keepVisualState}"
+ rendered="#{modalPanel.rendered}"
+ autosized="#{modalPanel.autosized}"
+ shadowDepth="#{modalPanel.shadowDepth}"
+ shadowOpacity="#{modalPanel.shadowOpacity}"
+ show="#{modalPanel.show}"
+ domElementAttachment="#{modalPanel.domElementAttachment}"
+ >
+ <f:facet name="header">
+ <h:outputText value="HEADER for popup" />
+ </f:facet>
+ <f:facet name="controls">
+ <h:outputLink value="#"
+ onclick="RichFaces.$('form:popup').hide(); return false;">
+ X
+ </h:outputLink>
+ </f:facet>
+ <p>Any content might be inside the panel.</p>
+ <p>Consider inclusion of the form elements into the popup or
+ redefinition of <b>domElementAttachment</b> attribute.</p>
+ <p>The popup panel is open and closed from the javascript function
+ of component client side object. The following code <a href="#"
+ onclick="RichFaces.$('form:popup').hide()">hide this panel</a>: <f:verbatim>#</f:verbatim>RichFaces.$('form:popup').hide()</p>
+
+ <h:inputText value="#{modalPanel.inputTextTest}" />
+
+ </rich:popupPanel>
+
+ <h:panelGrid columns="2">
+ <h:outputText value="Left: "/><h:inputText value="#{modalPanel.left}"/>
+ <h:outputText value="Top: "/><h:inputText value="#{modalPanel.top}"/>
+ <h:outputText value="Height: "/><h:inputText value="#{modalPanel.height}"/>
+ <h:outputText value="Width: "/><h:inputText value="#{modalPanel.width}"/>
+ <h:outputText value="MinHeight: "/><h:inputText value="#{modalPanel.minHeight}"/>
+ <h:outputText value="MinWidth: "/><h:inputText value="#{modalPanel.minWidth}"/>
+ <h:outputText value="MaxHeight: "/><h:inputText value="#{modalPanel.maxHeight}"/>
+ <h:outputText value="MaxWidth: "/><h:inputText value="#{modalPanel.maxWidth}"/>
+ <h:outputText value="Shadow depth: "/><h:inputText value="#{modalPanel.shadowDepth}"/>
+ <h:outputText value="Shadow opacity: "/><h:inputText value="#{modalPanel.shadowOpacity}"/>
+ <h:outputText value="Rendered: "/><h:selectBooleanCheckbox value="#{modalPanel.rendered}"/>
+ <h:outputText value="Moveable: "/><h:selectBooleanCheckbox value="#{modalPanel.moveable}"/>
+ <h:outputText value="Resizeable: "/><h:selectBooleanCheckbox value="#{modalPanel.resizeable}"/>
+ <h:outputText value="Autosized: "/><h:selectBooleanCheckbox value="#{modalPanel.autosized}"/>
+ <h:outputText value="Show: "/><h:selectBooleanCheckbox value="#{modalPanel.show}"/>
+ <h:outputText value="keepVisualState: "/><h:selectBooleanCheckbox value="#{modalPanel.keepVisualState}"/>
+ </h:panelGrid>
+ <h:commandButton value="Apply changes"/>
+</h:form>
+</ui:define>
+</ui:composition>
+
+
Copied: branches/RF-7817/examples/output-demo/src/main/webapp/examples/progressbar.xhtml (from rev 19674, trunk/examples/output-demo/src/main/webapp/examples/progressbar.xhtml)
===================================================================
--- branches/RF-7817/examples/output-demo/src/main/webapp/examples/progressbar.xhtml (rev 0)
+++ branches/RF-7817/examples/output-demo/src/main/webapp/examples/progressbar.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,79 @@
+<ui:composition 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"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/output" template="/templates/template.xhtml">
+
+ <ui:define name="body">
+ <script>
+//<![CDATA[
+ var counter = 1;
+ var intervalID;
+ function updateProgress(i) {
+ RichFaces.$('form2:progressBar').setValue(counter*5);
+ if ((counter++)>20){
+ clearInterval(intervalID);
+ document.getElementById('button').disabled=false;
+ }
+ }
+
+ function startProgress(){
+ counter=1;
+ document.getElementById('button').disabled=true;
+ RichFaces.$('form2:progressBar').enable();
+ RichFaces.$('form2:progressBar').setValue(1);
+ intervalID = setInterval(updateProgress,5000);
+ }
+//]]>
+ </script>
+ <h:form id="form">
+ Ajax mode:
+ <rich:progressBar mode="ajax" value="#{progressBarBean.currentValue}"
+ interval="2000"
+ enabled="#{progressBarBean.enabled}" minValue="-1" maxValue="100"
+ reRenderAfterComplete="progressPanel">
+ <f:facet name="initial">
+ <br />
+ <h:outputText value="Process doesn't started yet" />
+ <a4j:commandButton action="#{progressBarBean.startProcess}"
+ value="Start Process"
+ render="form"
+ style="margin: 9px 0px 5px;" />
+ </f:facet>
+ <f:facet name="complete">
+ <br />
+ <h:outputText value="Process Done" />
+ <a4j:commandButton action="#{progressBarBean.startProcess}"
+ value="Restart Process" execute="@form"
+ rendered="#{progressBarBean.buttonRendered}"
+ style="margin: 9px 0px 5px;" />
+ </f:facet>
+ <h:outputText value="#{progressBarBean.currentValue} %"/>
+ </rich:progressBar>
+ <h:panelGroup id="progressPanel">
+ <h:outputText value="#{progressBarBean.currentValue}"/>
+ </h:panelGroup>
+ </h:form>
+
+
+
+ Client mode:
+
+
+ <h:form id="form2">
+ <rich:progressBar mode="client" id="progressBar">
+ <f:facet name="initial">
+ <h:outputText value="Process doesn't started yet"/>
+ </f:facet>
+ <f:facet name="complete">
+ <h:outputText value="Process Done"/>
+ </f:facet>
+ </rich:progressBar>
+ <button type="button" onclick="startProgress();" style="margin: 9px 0px 5px;" id="button">Start Progress</button>
+ </h:form>
+ </ui:define>
+</ui:composition>
+
+
+
Copied: branches/RF-7817/examples/output-demo/src/main/webapp/examples/tabPanel.xhtml (from rev 19674, trunk/examples/output-demo/src/main/webapp/examples/tabPanel.xhtml)
===================================================================
--- branches/RF-7817/examples/output-demo/src/main/webapp/examples/tabPanel.xhtml (rev 0)
+++ branches/RF-7817/examples/output-demo/src/main/webapp/examples/tabPanel.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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"
+ xmlns:pn="http://richfaces.org/output">
+
+<body>
+<ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="title">Tab Panel Example</ui:define>
+ <ui:define name="body_head">Tab Panel Example</ui:define>
+
+ <ui:define name="body">
+ <p>Page</p>
+
+ <h:form id="f">
+ <pn:tabPanel id="panel" switchType="ajax" tabHeaderClassDisabled="myClass_01">
+ <pn:tab header="tab1 header" headerClassDisabled="myClass_02">
+ Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here.
+ </pn:tab>
+ <pn:tab header="tab2 header">
+ He he
+ </pn:tab>
+ </pn:tabPanel>
+ </h:form>
+ </ui:define>
+</ui:composition>
+</body>
+</html>
+
Copied: branches/RF-7817/examples/output-demo/src/main/webapp/qunit/tab.xhtml (from rev 19674, trunk/examples/output-demo/src/main/webapp/qunit/tab.xhtml)
===================================================================
--- branches/RF-7817/examples/output-demo/src/main/webapp/qunit/tab.xhtml (rev 0)
+++ branches/RF-7817/examples/output-demo/src/main/webapp/qunit/tab.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,259 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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"
+ xmlns:pn="http://richfaces.org/output">
+
+<body>
+<ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="scripts">
+ <h:outputScript name="qunit/qunit.js" />
+ <h:outputScript name="qunit/richfaces-qunit.js" />
+
+ <h:outputScript name="Tab.js" />
+ <h:outputScript name="TabPanel.js" />
+
+ <h:outputStylesheet name="qunit/qunit.css" />
+ </ui:define>
+
+ <ui:define name="title">Tab Example</ui:define>
+ <ui:define name="body_head">Tab Example</ui:define>
+
+ <ui:define name="body">
+ <p>Page</p>
+
+ <h:form id="f" style="border:blue solid thin;">
+ <pn:accordion >
+ <pn:accordionItem></pn:accordionItem>
+ </pn:accordion>
+
+ <div id="f:panel" style="width: 100%;">
+ <input type="hidden" name="f:panel-value" id="f:panel-value" value="name1" />
+ <script type="text/javascript">
+ new RichFaces.ui.TabPanel(
+ "f:panel",
+ {
+ "onbeforeitemchange":function(event){RichFaces.ajax("f:panel",event,{"incId":"1"} )},
+ "onitemchange":function(event){RichFaces.ajax("f:panel",event,{"incId":"1"} )},
+ "activeItem":"name1",
+ "ajax":{"incId":"1"} ,
+ "cycledSwitching":false,
+ "isKeepHeight":true
+ }
+ )
+
+ </script>
+
+ <div id="f:panel:header" class="rftp_toptab_tabline_vis">
+ <div class="rftp_toptab_tabs">
+ <div style="display: table-row;">
+ <div style="padding-left: 5px;" class="rftp_toptab_spacer" ></div>
+
+ <div id="f:name1:header">
+ <div id="f:name1:header:active" class="rftp_toptab rftp_active_top">
+ <div style="display: table;">
+ <div style="display: table-row;">
+ <div class="rftp_icon">
+ <img width="16" height="16" src="ico.gif" alt=""/>
+ </div>
+ <div class="rftp_label">Tab name 1 Active</div>
+ <div class="rftp_close">
+ <img width="16" height="16" src="close.gif" alt=""/>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="f:name1:header:inactive" style="display:none" class="rftp_toptab rftp_active_top">
+ <div style="display: table;">
+ <div style="display: table-row;">
+ <div class="rftp_icon">
+ <img width="16" height="16" src="ico.gif" alt=""/>
+ </div>
+ <div class="rftp_label">Tab name 1 Inactive</div>
+ <div class="rftp_close">
+ <img width="16" height="16" src="close.gif" alt=""/>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="f:name1:header:disabled" style="display:none" class="rftp_toptab rftp_active_top">
+ <div style="display: table;">
+ <div style="display: table-row;">
+ <div class="rftp_icon">
+ <img width="16" height="16" src="ico.gif" alt=""/>
+ </div>
+ <div class="rftp_label">Tab name 1 Disabled</div>
+ <div class="rftp_close">
+ <img width="16" height="16" src="close.gif" alt=""/>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="rftp_toptab_spacer rftp_horizonttab_tabspacer_width"></div>
+
+ <div id="f:name2:header">
+ <div id="f:name2:header:active" style="display:none" class="rftp_toptab">
+ <div style="display: table;">
+ <div style="display: table-row;">
+ <div class="rftp_icon">
+ <img width="16" height="16" src="ico.gif" alt="" />
+ </div>
+ <div class="rftp_label">Tab name 2 Active</div>
+ <div class="rftp_close">
+ <img width="16" height="16" src="close_act.gif" alt="" />
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="f:name2:header:inactive" class="rftp_toptab">
+ <div style="display: table;">
+ <div style="display: table-row;">
+ <div class="rftp_icon">
+ <img width="16" height="16" src="ico.gif" alt="" />
+ </div>
+ <div class="rftp_label">Tab name 2 Inactive</div>
+ <div class="rftp_close">
+ <img width="16" height="16" src="close_act.gif" alt="" />
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="f:name2:header:disabled" style="display:none" class="rftp_toptab">
+ <div style="display: table;">
+ <div style="display: table-row;">
+ <div class="rftp_icon">
+ <img width="16" height="16" src="ico.gif" alt="" />
+ </div>
+ <div class="rftp_label">Tab name 2 Disabled</div>
+ <div class="rftp_close">
+ <img width="16" height="16" src="close_act.gif" alt="" />
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="rftp_toptab_spacer rftp_horizonttab_tabspacer_width"></div>
+
+ <div id="f:name3:header">
+ <div id="f:name3:header:active" style="display:none" class="rftp_toptab">
+ <div style="display: table;">
+ <div style="display: table-row;">
+ <div class="rftp_icon">
+ <img width="16" height="16" src="ico.gif" alt="" />
+ </div>
+ <div class="rftp_label">Tab name 3 Active</div>
+ <div class="rftp_close">
+ <img width="16" height="16" src="close_act.gif" alt="" />
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="f:name3:header:inactive" class="rftp_toptab">
+ <div style="display: table;">
+ <div style="display: table-row;">
+ <div class="rftp_icon">
+ <img width="16" height="16" src="ico.gif" alt="" />
+ </div>
+ <div class="rftp_label">Tab name 3 Inactive</div>
+ <div class="rftp_close">
+ <img width="16" height="16" src="close_act.gif" alt="" />
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="f:name3:header:disabled" style="display:none" class="rftp_toptab">
+ <div style="display: table;">
+ <div style="display: table-row;">
+ <div class="rftp_icon">
+ <img width="16" height="16" src="ico.gif" alt="" />
+ </div>
+ <div class="rftp_label">Tab name 3 Disabled</div>
+ <div class="rftp_close">
+ <img width="16" height="16" src="close_act.gif" alt="" />
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="rftp_toptab_spacer rftp_horizonttab_tabspacer_width"></div>
+
+ <div style="padding-right: 5px; width: 100%;" class="rftp_toptab_spacer"></div>
+ </div>
+ </div>
+
+ <div class="rftp_toptab_scroll_left rftp_hidden">«</div>
+ <div class="rftp_toptab_tabslist rftp_hidden">↓</div>
+ <div class="rftp_toptab_scroll_right rftp_hidden">»</div>
+ </div>
+
+ <div class="rftp_toptab_border"></div>
+
+ <div id="f:panel:content" >
+ <div id="f:name1" class="rftp_toptab_content" >
+ <script type="text/javascript">
+ new RichFaces.ui.Tab(
+ "f:name1",
+ {
+ "onleave":function(event){RichFaces.ajax("f:name1",event,{"incId":"1"} )},
+ "onenter":function(event){RichFaces.ajax("f:name1",event,{"incId":"1"} )},
+ "index":0,
+ "togglePanelId":"f:panel",
+ "switchMode":"client",
+ "name":"name1"
+ }
+ )
+ </script>
+ Content 01 will be here.
+ </div>
+ <div id="f:name2" class="rftp_toptab_content" style="display:none;">
+ <script type="text/javascript">
+ new RichFaces.ui.Tab(
+ "f:name2",
+ {
+ "onleave":function(event){RichFaces.ajax("f:name2",event,{"incId":"1"} )},
+ "onenter":function(event){RichFaces.ajax("f:name2",event,{"incId":"1"} )},
+ "index":1,
+ "togglePanelId":"f:panel",
+ "switchMode":"client",
+ "name":"name2"
+ }
+ )
+ </script>
+ Content 02 will be here.
+ </div>
+ <div id="f:name3" class="rftp_toptab_content" style="display:none;">
+ <script type="text/javascript">
+ new RichFaces.ui.Tab(
+ "f:name3",
+ {
+ "onleave":function(event){RichFaces.ajax("f:name3",event,{"incId":"1"} )},
+ "onenter":function(event){RichFaces.ajax("f:name3",event,{"incId":"1"} )},
+ "index":2,
+ "togglePanelId":"f:panel",
+ "switchMode":"client",
+ "name":"name3"
+ }
+ )
+ </script>
+ Content 03 will be here.
+ </div>
+ </div>
+ </div>
+
+ </h:form>
+
+ <p>Result</p>
+ <div>
+ <ol id="qunit-tests"></ol>
+
+ <div id="testDiv" style="margin-top:10px; border:1px solid #a0a0a0">Main Test Div</div>
+ </div>
+ <h:outputScript name="tests/richfaces-tab-qunit.js" />
+ </ui:define>
+</ui:composition>
+</body>
+</html>
+
Copied: branches/RF-7817/examples/output-demo/src/main/webapp/qunit/tabPanel.xhtml (from rev 19674, trunk/examples/output-demo/src/main/webapp/qunit/tabPanel.xhtml)
===================================================================
--- branches/RF-7817/examples/output-demo/src/main/webapp/qunit/tabPanel.xhtml (rev 0)
+++ branches/RF-7817/examples/output-demo/src/main/webapp/qunit/tabPanel.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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"
+ xmlns:pn="http://richfaces.org/output">
+
+<body>
+<ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="scripts">
+ <h:outputScript name="qunit/qunit.js" />
+ <h:outputScript name="qunit/richfaces-qunit.js" />
+
+ <h:outputStylesheet name="qunit/qunit.css" />
+ </ui:define>
+
+ <ui:define name="title">Tab Panel Example</ui:define>
+ <ui:define name="body_head">Tab Panel Example</ui:define>
+
+ <ui:define name="body">
+ <p>Page</p>
+
+ <h:form id="f">
+ <pn:tabPanel id="panel" switchType="ajax">
+ <pn:tab header="tab1 header">
+ Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here.
+ </pn:tab>
+ <pn:tab header="tab2 header">
+ He he
+ </pn:tab>
+ </pn:tabPanel>
+ </h:form>
+
+ <p>Result</p>
+ <div>
+ <ol id="qunit-tests"></ol>
+
+ <div id="testDiv" style="margin-top:10px; border:1px solid #a0a0a0">Main Test Div</div>
+
+ </div>
+ <h:outputScript name="tests/richfaces-tab-panel-qunit.js" />
+ </ui:define>
+</ui:composition>
+</body>
+</html>
+
Copied: branches/RF-7817/examples/output-demo/src/main/webapp/resources/tests/richfaces-accordion-item-qunit.js (from rev 19674, trunk/examples/output-demo/src/main/webapp/resources/tests/richfaces-accordion-item-qunit.js)
===================================================================
--- branches/RF-7817/examples/output-demo/src/main/webapp/resources/tests/richfaces-accordion-item-qunit.js (rev 0)
+++ branches/RF-7817/examples/output-demo/src/main/webapp/resources/tests/richfaces-accordion-item-qunit.js 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+RichFaces.QUnit.run(function() {
+ module("richfaces-accordion-item");
+
+ var ACCORDION_ITEM_ID = "f:panel";
+
+ test("RichFaces.ui.AccordionItem test constructor", function () {
+ var c = RichFaces.$(ACCORDION_ITEM_ID);
+
+ ok(c instanceof RichFaces.ui.AccordionItem, "inctance of RichFaces.ui.AccordionItem");
+ equals(c.id, ACCORDION_ITEM_ID, "id");
+ // TODO other params
+
+ });
+
+ test("RichFaces.ui.AccordionItem test public api", function () {
+ var c = RichFaces.$(ACCORDION_ITEM_ID);
+
+ var PUBLIC_API = [/* ... */];
+
+ for (i in PUBLIC_API) {
+ var funcName = PUBLIC_API[i];
+ ok(c.[funcName], funcName + "present in component")
+ // TODO check other functions + check is it function
+ }
+ });
+
+ test("RichFaces.ui.AccordionItem test events", function () {
+ var componentId = ACCORDION_ITEM_ID;
+ var c = RichFaces.$(componentId);
+
+ expect(5);
+ var beforeitemchngeHandler = function (event, comp, data) {
+ ok(true, "beforeitemchnge handler invouked");
+
+ same(data.id, componentId, "component id");
+ same(data.oldItem.getName(), c.items[0].getName(), "old item");
+ same(data.newItem.getName(), c.items[1].getName(), "new item");
+
+ return true;
+ };
+
+ var beforeitemchngeHandlerWrapper = RichFaces.Event.bindById(componentId, "beforeitemchange", beforeitemchngeHandler);
+
+ var itemchangeHandler = handler("itemchnge handler invouked", undefined);
+ var itemchangeHandlerWrapper = RichFaces.Event.bindById(componentId, "itemchange", itemchangeHandler);
+
+ c.switchToItem("name2");
+
+ RichFaces.Event.unbindById(componentId, "beforeitemchange", beforeitemchngeHandlerWrapper);
+ RichFaces.Event.unbindById(componentId, "itemchange", itemchangeHandlerWrapper);
+
+ c.switchToItem("name1");
+ });
+});
Copied: branches/RF-7817/examples/output-demo/src/main/webapp/resources/tests/richfaces-tab-panel-qunit.js (from rev 19674, trunk/examples/output-demo/src/main/webapp/resources/tests/richfaces-tab-panel-qunit.js)
===================================================================
--- branches/RF-7817/examples/output-demo/src/main/webapp/resources/tests/richfaces-tab-panel-qunit.js (rev 0)
+++ branches/RF-7817/examples/output-demo/src/main/webapp/resources/tests/richfaces-tab-panel-qunit.js 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,84 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+RichFaces.QUnit.run(function() {
+ module("richfaces-tab-panel");
+
+ var TAB_PANEL_ID = "f:panel";
+
+ function handler (msg, returnValue) {
+ return function () {
+ ok(true, msg);
+
+ if (returnValue != undefined) {
+ return returnValue;
+ }
+ };
+ }
+
+ test("RichFaces.ui.TabPanel test constructor", function () {
+ var c = RichFaces.$(TAB_PANEL_ID);
+
+ ok(c instanceof RichFaces.ui.TabPanel, "inctance of RichFaces.ui.TabPanel");
+ equals(c.id, TAB_PANEL_ID, "id");
+ });
+
+ test("RichFaces.ui.TabPanel test public api", function () {
+ var c = RichFaces.$(TAB_PANEL_ID);
+
+ var PUBLIC_API = [/* ... */];
+
+ for (var i in PUBLIC_API) {
+ var funcName = PUBLIC_API[i];
+ ok(c[funcName], funcName + "present in component");
+ // TODO check other functions + check is it function
+ }
+ });
+
+ test("RichFaces.ui.TabPanel test events", function () {
+ var componentId = TAB_PANEL_ID;
+ var c = RichFaces.$(componentId);
+
+ expect(5);
+ var beforeitemchngeHandler = function (event, comp, data) {
+ ok(true, "beforeitemchnge handler invouked");
+
+ same(data.id, componentId, "component id");
+ same(data.oldItem.getName(), c.items[0].getName(), "old item");
+ same(data.newItem.getName(), c.items[1].getName(), "new item");
+
+ return true;
+ };
+
+ var beforeitemchngeHandlerWrapper = RichFaces.Event.bindById(componentId, "beforeitemchange", beforeitemchngeHandler);
+
+ var itemchangeHandler = handler("itemchnge handler invouked", undefined);
+ var itemchangeHandlerWrapper = RichFaces.Event.bindById(componentId, "itemchange", itemchangeHandler);
+
+ c.switchToItem("name2");
+
+ RichFaces.Event.unbindById(componentId, "beforeitemchange", beforeitemchngeHandlerWrapper);
+ RichFaces.Event.unbindById(componentId, "itemchange", itemchangeHandlerWrapper);
+
+ c.switchToItem("name1");
+ });
+});
Copied: branches/RF-7817/examples/output-demo/src/main/webapp/resources/tests/richfaces-tab-qunit.js (from rev 19674, trunk/examples/output-demo/src/main/webapp/resources/tests/richfaces-tab-qunit.js)
===================================================================
--- branches/RF-7817/examples/output-demo/src/main/webapp/resources/tests/richfaces-tab-qunit.js (rev 0)
+++ branches/RF-7817/examples/output-demo/src/main/webapp/resources/tests/richfaces-tab-qunit.js 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+RichFaces.QUnit.run(function() {
+ module("richfaces-tab");
+
+ var TAB_ID = "f:panel";
+
+ test("RichFaces.ui.Tab test constructor", function () {
+ var c = RichFaces.$(TAB_ID);
+
+ ok(c instanceof RichFaces.ui.Tab, "inctance of RichFaces.ui.Tab");
+ equals(c.id, TAB_ID, "id");
+ // TODO other params
+
+ });
+
+ test("RichFaces.ui.Tab test public api", function () {
+ var c = RichFaces.$(TAB_ID);
+
+ var PUBLIC_API = [/* ... */];
+
+ for (var i in PUBLIC_API) {
+ var funcName = PUBLIC_API[i];
+ ok(c.[funcName], funcName + "present in component");
+ // TODO check other functions + check is it function
+ }
+ });
+
+ test("RichFaces.ui.Tab test events", function () {
+ var componentId = TAB_ID;
+ var c = RichFaces.$(componentId);
+
+ expect(5);
+ var beforeitemchngeHandler = function (event, comp, data) {
+ ok(true, "beforeitemchnge handler invouked");
+
+ same(data.id, componentId, "component id");
+ same(data.oldItem.getName(), c.items[0].getName(), "old item");
+ same(data.newItem.getName(), c.items[1].getName(), "new item");
+
+ return true;
+ };
+
+ var beforeitemchngeHandlerWrapper = RichFaces.Event.bindById(componentId, "beforeitemchange", beforeitemchngeHandler);
+
+ var itemchangeHandler = handler("itemchnge handler invouked", undefined);
+ var itemchangeHandlerWrapper = RichFaces.Event.bindById(componentId, "itemchange", itemchangeHandler);
+
+ c.switchToItem("name2");
+
+ RichFaces.Event.unbindById(componentId, "beforeitemchange", beforeitemchngeHandlerWrapper);
+ RichFaces.Event.unbindById(componentId, "itemchange", itemchangeHandlerWrapper);
+
+ c.switchToItem("name1");
+ });
+});
Modified: branches/RF-7817/examples/output-demo/src/main/webapp/templates/template.xhtml
===================================================================
--- branches/RF-7817/examples/output-demo/src/main/webapp/templates/template.xhtml 2010-10-27 16:17:45 UTC (rev 19703)
+++ branches/RF-7817/examples/output-demo/src/main/webapp/templates/template.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -10,157 +10,6 @@
</title>
<meta http-equiv="content-type" content="text/xhtml; charset=UTF-8" />
-
- <style type="text/css">
- * {
- font-family: verdana
- }
-
- .rftp_toptab {
- display: table-cell;
- border: 1px solid #A6A6A6;
- padding: 0px 0px 3px 0px;
- vertical-align: bottom;
- background: url(tab_bg.gif) top repeat-x #DAE7F5;
- }
-
- .rftp_active_top {
- border-bottom: 0px;
- font-weight: bold;
- padding: 3px 0px 0px 0px;
- vertical-align: top;
- background: url(acttab_bg.gif) top repeat-x #C9DBEF;
- }
-
- .rftp_active2_top {
- border-bottom: 0px;
- font-weight: bold;
- padding: 3px 0px 0px 0px;
- vertical-align: top;
- background: url(acttab2_bg.gif) top repeat-x #FFFFFF;
- }
-
- .rftp_toptab_tabline_vis {
- border: 1px solid #a6a6a6;
- background: url(tabline_bg.gif) top repeat-x #EEF4FB;
- border-bottom: 0px;
- padding-top: 2px;
- overflow: hidden;
- height: 23px;
- white-space: nowrap;
- position: relative;
- }
-
- .rftp_toptab_tabline_dis {
- border-bottom: 0px;
- padding-top: 2px;
- overflow: hidden;
- height: 25px;
- white-space: nowrap;
- position: relative;
- }
-
- .rftp_toptab_tabs {
- display: table;
- border: 0px;
- width: 100%;
- height: 100%;
- }
-
- .rftp_toptab_spacer {
- display: table-cell;
- border-bottom: 1px solid #A6A6A6;
- }
-
- .rftp_horizonttab_tabspacer_width {
- padding-left: 1px;
- }
-
- .rftp_icon {
- display: table-cell;
- vertical-align: middle;
- padding: 0px 5px 0px 5px;
- }
-
- .rftp_close {
- display: table-cell;
- vertical-align: middle;
- padding: 0px 3px 0px 15px;
- }
-
- .rftp_label {
- display: table-cell;
- vertical-align: middle;
- font-family: verdana;
- font-size: 11px;
- }
-
- .rftp_toptab_scroll_left {
- background: url(acttab_bg.gif) top repeat-x #C9DBEF;
- position: absolute;
- top: 1px;
- left: 1px;
- width: 15px;
- height: 250px;
- border: 1px solid #a6a6a6;
- font-weight: bold;
- text-align: center;
- font-family: verdana;
- font-size: 11px;
- padding-top: 6px;
- }
-
- .rftp_toptab_scroll_right {
- background: url(acttab_bg.gif) top repeat-x #C9DBEF;
- position: absolute;
- top: 1px;
- right: 17px;
- width: 15px;
- height: 250px;
- border: 1px solid #a6a6a6;
- font-weight: bold;
- text-align: center;
- font-family: verdana;
- font-size: 11px;
- padding-top: 6px;
- }
-
- .rftp_toptab_tabslist {
- background: url(acttab_bg.gif) top repeat-x #C9DBEF;
- position: absolute;
- top: 1px;
- right: 1px;
- width: 15px;
- height: 250px;
- border: 1px solid #a6a6a6;
- font-weight: bold;
- text-align: center;
- font-family: verdana;
- font-size: 14px;
- padding-top: 2px;
- }
-
- .rftp_toptab_border {
- border: 1px solid #A6A6A6;
- border-top: 0px;
- height: 2px;
- background: #C9DBEF;
- }
-
- .rftp_toptab_content {
- border: 1px solid #A6A6A6;
- border-top: 0px;
- font-family: verdana;
- font-size: 11px;
- padding: 10px;
- background: #ffffff;
- }
-
- .rftp_hidden {
- display: none
- }
- </style>
-
</h:head>
<h:body>
@@ -198,12 +47,36 @@
<li><h:commandLink value="accordion" action="accordion" /></li>
</ul>
</li>
+ <li>
+ <p>Panel</p>
+ <ul>
+ <li><h:commandLink value="panel" action="panel" /></li>
+ </ul>
+ </li>
+ <li>
+ <p>Popup panel</p>
+ <ul>
+ <li><h:commandLink value="popup" action="popup" /></li>
+ </ul>
+ </li>
+ <li>
+ <p>ProgressBar</p>
+ <ul>
+ <li><h:commandLink value="progressbar" action="progressbar" /></li>
+ </ul>
+ </li>
<li>
<p>Collapsible Panel</p>
<ul>
<li><h:commandLink value="Collapsible Panel" action="collapsiblePanel" /></li>
</ul>
</li>
+ <li>
+ <p>Tab Panel</p>
+ <ul>
+ <li><h:commandLink value="Tab Panel" action="tabPanel" /></li>
+ </ul>
+ </li>
</ul>
<p>QUnit</p>
<ul>
@@ -212,6 +85,7 @@
<li><h:commandLink value="accordion" action="qunit/accordion" /></li>
<li><h:commandLink value="accordionHeaders" action="qunit/accordionHeaders" /></li>
<li><h:commandLink value="collapsiblePanel" action="qunit/collapsiblePanel" /></li>
+ <li><h:commandLink value="tabPanel" action="qunit/tabPanel" /></li>
</ul>
</h:form>
</td>
Modified: branches/RF-7817/examples/parent/pom.xml
===================================================================
--- branches/RF-7817/examples/parent/pom.xml 2010-10-27 16:17:45 UTC (rev 19703)
+++ branches/RF-7817/examples/parent/pom.xml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -100,10 +100,11 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
- <version>2.3</version>
+ <version>2.5</version>
<configuration>
- <configLocation>richfaces-checkstyle/richfaces-checkstyle.xml
- </configLocation>
+ <configLocation>richfaces-checkstyle/richfaces-checkstyle.xml</configLocation>
+ <logViolationsToConsole>true</logViolationsToConsole>
+ <violationSeverity>error</violationSeverity>
</configuration>
<executions>
<execution>
Modified: branches/RF-7817/examples/richfaces-showcase/pom.xml
===================================================================
--- branches/RF-7817/examples/richfaces-showcase/pom.xml 2010-10-27 16:17:45 UTC (rev 19703)
+++ branches/RF-7817/examples/richfaces-showcase/pom.xml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -145,6 +145,14 @@
</dependency>
</dependencies>
<build>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ </resource>
+ <resource>
+ <directory>src/main/resources-gae</directory>
+ </resource>
+ </resources>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Modified: branches/RF-7817/examples/richfaces-showcase/readme.txt
===================================================================
--- branches/RF-7817/examples/richfaces-showcase/readme.txt 2010-10-27 16:17:45 UTC (rev 19703)
+++ branches/RF-7817/examples/richfaces-showcase/readme.txt 2010-10-27 16:28:07 UTC (rev 19704)
@@ -46,7 +46,8 @@
* mvn clean package -Pgae -Denforcer.skip=true
(enforcer skipped as resource plugin using snapshot plugin)
-And now you're ready to publish the application to GAE. just use appcfg as for any other one like described at google documentation.
+And now you're ready to publish the application to GAE. just use appcfg as for any other one like described at google documentation. Do not forget to register your
+own application name and rename the demo application accordingly.
more details about the resource plugin(it could be highly usefull not only in case of GAE usage but for general cases like serving resources at separate content systems) -
will be published at our wiki and announced at RichFaces usage space.
Copied: branches/RF-7817/examples/richfaces-showcase/src/main/java/org/richfaces/demo/progressBar (from rev 19674, trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/progressBar)
Deleted: branches/RF-7817/examples/richfaces-showcase/src/main/java/org/richfaces/demo/progressBar/ProgressBarBean.java
===================================================================
--- trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/progressBar/ProgressBarBean.java 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/java/org/richfaces/demo/progressBar/ProgressBarBean.java 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,74 +0,0 @@
-/**
- *
- */
-package org.richfaces.demo.progressBar;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
-/**
- * @author Ilya Shaikovsky
- *
- */
-@ManagedBean
-@ViewScoped
-public class ProgressBarBean implements Serializable {
-
- private static final long serialVersionUID = -314414475508376585L;
-
- private boolean buttonRendered = true;
- private boolean enabled=false;
- private Long startTime;
-
- public String startProcess() {
- setEnabled(true);
- setButtonRendered(false);
- setStartTime(new Date().getTime());
- return null;
- }
-
- public Long getCurrentValue(){
- if (isEnabled()) {
- Long current = (new Date().getTime() - startTime)/1000;
- if (current>100){
- setButtonRendered(true);
- } else if (current.equals(0)) {
- return new Long(1);
- }
- return (new Date().getTime() - startTime)/1000;
- }
- if (startTime == null) {
- return Long.valueOf(-1);
- } else {
- return Long.valueOf(101);
- }
-
- }
-
- public boolean isEnabled() {
- return enabled;
- }
-
- public void setEnabled(boolean enabled) {
- this.enabled = enabled;
- }
-
- public Long getStartTime() {
- return startTime;
- }
-
- public void setStartTime(Long startTime) {
- this.startTime = startTime;
- }
-
- public boolean isButtonRendered() {
- return buttonRendered;
- }
-
- public void setButtonRendered(boolean buttonRendered) {
- this.buttonRendered = buttonRendered;
- }
-}
Copied: branches/RF-7817/examples/richfaces-showcase/src/main/java/org/richfaces/demo/progressBar/ProgressBarBean.java (from rev 19674, trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/progressBar/ProgressBarBean.java)
===================================================================
--- branches/RF-7817/examples/richfaces-showcase/src/main/java/org/richfaces/demo/progressBar/ProgressBarBean.java (rev 0)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/java/org/richfaces/demo/progressBar/ProgressBarBean.java 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,74 @@
+/**
+ *
+ */
+package org.richfaces.demo.progressBar;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+/**
+ * @author Ilya Shaikovsky
+ *
+ */
+@ManagedBean
+@ViewScoped
+public class ProgressBarBean implements Serializable {
+
+ private static final long serialVersionUID = -314414475508376585L;
+
+ private boolean buttonRendered = true;
+ private boolean enabled=false;
+ private Long startTime;
+
+ public String startProcess() {
+ setEnabled(true);
+ setButtonRendered(false);
+ setStartTime(new Date().getTime());
+ return null;
+ }
+
+ public Long getCurrentValue(){
+ if (isEnabled()) {
+ Long current = (new Date().getTime() - startTime)/1000;
+ if (current>100){
+ setButtonRendered(true);
+ } else if (current.equals(0)) {
+ return new Long(1);
+ }
+ return (new Date().getTime() - startTime)/1000;
+ }
+ if (startTime == null) {
+ return Long.valueOf(-1);
+ } else {
+ return Long.valueOf(101);
+ }
+
+ }
+
+ public boolean isEnabled() {
+ return enabled;
+ }
+
+ public void setEnabled(boolean enabled) {
+ this.enabled = enabled;
+ }
+
+ public Long getStartTime() {
+ return startTime;
+ }
+
+ public void setStartTime(Long startTime) {
+ this.startTime = startTime;
+ }
+
+ public boolean isButtonRendered() {
+ return buttonRendered;
+ }
+
+ public void setButtonRendered(boolean buttonRendered) {
+ this.buttonRendered = buttonRendered;
+ }
+}
Deleted: branches/RF-7817/examples/richfaces-showcase/src/main/resources/META-INF/jdoconfig.xml
===================================================================
--- branches/RF-7817/examples/richfaces-showcase/src/main/resources/META-INF/jdoconfig.xml 2010-10-27 16:17:45 UTC (rev 19703)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/resources/META-INF/jdoconfig.xml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig">
-
- <persistence-manager-factory name="transactions-optional">
- <property name="javax.jdo.PersistenceManagerFactoryClass"
- value="org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManagerFactory"/>
- <property name="javax.jdo.option.ConnectionURL" value="appengine"/>
- <property name="javax.jdo.option.NontransactionalRead" value="true"/>
- <property name="javax.jdo.option.NontransactionalWrite" value="true"/>
- <property name="javax.jdo.option.RetainValues" value="true"/>
- <property name="datanucleus.appengine.autoCreateDatastoreTxns" value="true"/>
- </persistence-manager-factory>
-</jdoconfig>
Deleted: branches/RF-7817/examples/richfaces-showcase/src/main/resources/META-INF/persistence.xml
===================================================================
--- branches/RF-7817/examples/richfaces-showcase/src/main/resources/META-INF/persistence.xml 2010-10-27 16:17:45 UTC (rev 19703)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/resources/META-INF/persistence.xml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
- version="1.0">
- <persistence-unit name="transactions-optional">
- <provider>org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider</provider>
- <properties>
- <property name="datanucleus.NontransactionalRead" value="true"/>
- <property name="datanucleus.NontransactionalWrite" value="true"/>
- <property name="datanucleus.ConnectionURL" value="appengine"/>
- </properties>
- </persistence-unit>
-
-</persistence>
\ No newline at end of file
Modified: branches/RF-7817/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml
===================================================================
--- branches/RF-7817/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2010-10-27 16:17:45 UTC (rev 19703)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -162,7 +162,7 @@
</sample>
</samples>
</demo>
- <demo new="true">
+ <demo>
<id>mediaOutput</id>
<name>a4j:mediaOutput</name>
<samples>
@@ -230,7 +230,7 @@
</sample>
</samples>
</demo>
- <demo new="true">
+ <demo>
<id>extendedDataTable</id>
<name>rich:extendedDataTable</name>
<samples>
@@ -238,7 +238,7 @@
<id>simpleTable</id>
<name>ExtendedData Table Basic Usage</name>
</sample>
- <sample new="true">
+ <sample>
<id>exTableSelection</id>
<name>ExtendedData Table Selection usage</name>
</sample>
@@ -268,7 +268,7 @@
</sample>
</samples>
</demo>
- <demo new="true">
+ <demo>
<id>list</id>
<name>rich:list</name>
<samples>
@@ -278,7 +278,7 @@
</sample>
</samples>
</demo>
- <demo new="true">
+ <demo>
<id>dataGrid</id>
<name>rich:dataGrid</name>
<samples>
@@ -290,7 +290,7 @@
</demo>
</demos>
</group>
- <group new="true">
+ <group>
<name>Output/Panels</name>
<demos>
<demo>
@@ -317,6 +317,37 @@
</sample>
</samples>
</demo>
+ <demo new="true">
+ <id>tabPanel</id>
+ <name>rich:tabPanel</name>
+ <samples>
+ <sample>
+ <id>simple</id>
+ <description>Simple Tab Panels</description>
+ <name>Simple Tab Panels</name>
+ </sample>
+ <!-- sample>
+ <id>headerCustomization</id>
+ <description>Headers Customization</description>
+ <name>Headers Customization</name>
+ </sample-->
+ <sample>
+ <id>valueManagement</id>
+ <description>Selected Tab Management</description>
+ <name>Selected Tab Management</name>
+ </sample>
+ </samples>
+ </demo>
+ <demo new="true">
+ <id>collapsiblePanel</id>
+ <name>rich:collapsiblePanel</name>
+ <samples>
+ <sample>
+ <id>simple</id>
+ <name>Simple Collapsible Panel</name>
+ </sample>
+ </samples>
+ </demo>
<demo>
<id>accordion</id>
<name>rich:accordion</name>
@@ -341,9 +372,23 @@
</sample>
</samples>
</demo>
+ <demo>
+ <id>progressBar</id>
+ <name>rich:progressBar</name>
+ <samples>
+ <sample>
+ <id>ajaxProgressBar</id>
+ <name>ProgressBar in ajax mode</name>
+ </sample>
+ <sample>
+ <id>clientProgressBar</id>
+ <name>ProgressBar in client mode</name>
+ </sample>
+ </samples>
+ </demo>
</demos>
</group>
- <group new="true">
+ <group>
<name>Inputs and Selects</name>
<demos>
<demo>
@@ -367,6 +412,16 @@
</samples>
</demo>
<demo>
+ <id>inputNumberSpinner</id>
+ <name>rich:inputNumberSpinner</name>
+ <samples>
+ <sample>
+ <id>spinners</id>
+ <name>Different Spinners samples</name>
+ </sample>
+ </samples>
+ </demo>
+ <demo>
<id>inplaceInput</id>
<name>rich:inplaceInput</name>
<samples>
@@ -411,7 +466,7 @@
</sample>
</samples>
</demo>
- <demo new="true">
+ <demo>
<id>jquery</id>
<name>rich:jQuery</name>
<samples>
Copied: branches/RF-7817/examples/richfaces-showcase/src/main/resources-gae (from rev 19674, trunk/examples/richfaces-showcase/src/main/resources-gae)
Copied: branches/RF-7817/examples/richfaces-showcase/src/main/resources-gae/META-INF (from rev 19674, trunk/examples/richfaces-showcase/src/main/resources-gae/META-INF)
Deleted: branches/RF-7817/examples/richfaces-showcase/src/main/resources-gae/META-INF/jdoconfig.xml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/resources-gae/META-INF/jdoconfig.xml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/resources-gae/META-INF/jdoconfig.xml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig">
-
- <persistence-manager-factory name="transactions-optional">
- <property name="javax.jdo.PersistenceManagerFactoryClass"
- value="org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManagerFactory"/>
- <property name="javax.jdo.option.ConnectionURL" value="appengine"/>
- <property name="javax.jdo.option.NontransactionalRead" value="true"/>
- <property name="javax.jdo.option.NontransactionalWrite" value="true"/>
- <property name="javax.jdo.option.RetainValues" value="true"/>
- <property name="datanucleus.appengine.autoCreateDatastoreTxns" value="true"/>
- </persistence-manager-factory>
-</jdoconfig>
Copied: branches/RF-7817/examples/richfaces-showcase/src/main/resources-gae/META-INF/jdoconfig.xml (from rev 19674, trunk/examples/richfaces-showcase/src/main/resources-gae/META-INF/jdoconfig.xml)
===================================================================
--- branches/RF-7817/examples/richfaces-showcase/src/main/resources-gae/META-INF/jdoconfig.xml (rev 0)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/resources-gae/META-INF/jdoconfig.xml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig">
+
+ <persistence-manager-factory name="transactions-optional">
+ <property name="javax.jdo.PersistenceManagerFactoryClass"
+ value="org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManagerFactory"/>
+ <property name="javax.jdo.option.ConnectionURL" value="appengine"/>
+ <property name="javax.jdo.option.NontransactionalRead" value="true"/>
+ <property name="javax.jdo.option.NontransactionalWrite" value="true"/>
+ <property name="javax.jdo.option.RetainValues" value="true"/>
+ <property name="datanucleus.appengine.autoCreateDatastoreTxns" value="true"/>
+ </persistence-manager-factory>
+</jdoconfig>
Deleted: branches/RF-7817/examples/richfaces-showcase/src/main/resources-gae/META-INF/persistence.xml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/resources-gae/META-INF/persistence.xml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/resources-gae/META-INF/persistence.xml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
- version="1.0">
- <persistence-unit name="transactions-optional">
- <provider>org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider</provider>
- <properties>
- <property name="datanucleus.NontransactionalRead" value="true"/>
- <property name="datanucleus.NontransactionalWrite" value="true"/>
- <property name="datanucleus.ConnectionURL" value="appengine"/>
- </properties>
- </persistence-unit>
-
-</persistence>
\ No newline at end of file
Copied: branches/RF-7817/examples/richfaces-showcase/src/main/resources-gae/META-INF/persistence.xml (from rev 19674, trunk/examples/richfaces-showcase/src/main/resources-gae/META-INF/persistence.xml)
===================================================================
--- branches/RF-7817/examples/richfaces-showcase/src/main/resources-gae/META-INF/persistence.xml (rev 0)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/resources-gae/META-INF/persistence.xml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
+ version="1.0">
+ <persistence-unit name="transactions-optional">
+ <provider>org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider</provider>
+ <properties>
+ <property name="datanucleus.NontransactionalRead" value="true"/>
+ <property name="datanucleus.NontransactionalWrite" value="true"/>
+ <property name="datanucleus.ConnectionURL" value="appengine"/>
+ </properties>
+ </persistence-unit>
+
+</persistence>
\ No newline at end of file
Copied: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/collapsiblePanel (from rev 19674, trunk/examples/richfaces-showcase/src/main/webapp/richfaces/collapsiblePanel)
Copied: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/collapsiblePanel/samples (from rev 19674, trunk/examples/richfaces-showcase/src/main/webapp/richfaces/collapsiblePanel/samples)
Deleted: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/collapsiblePanel/samples/simple-sample.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/collapsiblePanel/samples/simple-sample.xhtml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/collapsiblePanel/samples/simple-sample.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,51 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<ui:composition 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"
- xmlns:a4j="http://richfaces.org/a4j"
- xmlns:rich="http://richfaces.org/rich">
- <h:form>
- <p><b>Here is simple panel in client mode:</b></p>
-
- <rich:collapsiblePanel header="Overview" switchType="client">
- <h:graphicImage value="/images/icons/common/rf.png"
- style="float:right" />
- RichFaces is a component library for JSF and an advanced framework for
- easily integrating AJAX capabilities into business applications.
- <ul>
- <li>100+ AJAX enabled components in two libraries</li>
- <li>a4j: page centric AJAX controls</li>
- <li>rich: self contained, ready to use components</li>
- <li>Whole set of JSF benefits while working with AJAX</li>
- <li>Skinnability mechanism</li>
- <li>Component Development Kit (CDK)</li>
- <li>Dynamic resources handling</li>
- <li>Testing facilities for components, actions, listeners, and
- pages</li>
- <li>Broad cross-browser support</li>
- <li>Large and active community</li>
- </ul>
- </rich:collapsiblePanel>
-
- <p><b>And that panel switched by ajax and closed by default:</b></p>
-
- <rich:collapsiblePanel header="JSF 2 and RichFaces 4" expanded="false"
- switchType="ajax">
- <p>We are working hard on RichFaces 4.0 which will have full JSF
- 2 integration. That is not all though, here is a summary of updates
- and features:</p>
- <ul>
- <li>Redesigned modular repository and build system.</li>
- <li>Simplified Component Development Kit with annotations,
- faces-config extensions, advanced templates support and more..</li>
- <li>Ajax framework improvements extending the JSF 2
- specification.</li>
- <li>Component review for consistency, usability, and redesign
- following semantic HTML principles where possible.</li>
- <li>Both server-side and client-side performance optimization.</li>
- <li>Strict code clean-up and review.</li>
- </ul>
- </rich:collapsiblePanel>
- </h:form>
-</ui:composition>
\ No newline at end of file
Copied: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/collapsiblePanel/samples/simple-sample.xhtml (from rev 19674, trunk/examples/richfaces-showcase/src/main/webapp/richfaces/collapsiblePanel/samples/simple-sample.xhtml)
===================================================================
--- branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/collapsiblePanel/samples/simple-sample.xhtml (rev 0)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/collapsiblePanel/samples/simple-sample.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,51 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition 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"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+ <h:form>
+ <p><b>Here is simple panel in client mode:</b></p>
+
+ <rich:collapsiblePanel header="Overview" switchType="client">
+ <h:graphicImage value="/images/icons/common/rf.png"
+ style="float:right" />
+ RichFaces is a component library for JSF and an advanced framework for
+ easily integrating AJAX capabilities into business applications.
+ <ul>
+ <li>100+ AJAX enabled components in two libraries</li>
+ <li>a4j: page centric AJAX controls</li>
+ <li>rich: self contained, ready to use components</li>
+ <li>Whole set of JSF benefits while working with AJAX</li>
+ <li>Skinnability mechanism</li>
+ <li>Component Development Kit (CDK)</li>
+ <li>Dynamic resources handling</li>
+ <li>Testing facilities for components, actions, listeners, and
+ pages</li>
+ <li>Broad cross-browser support</li>
+ <li>Large and active community</li>
+ </ul>
+ </rich:collapsiblePanel>
+
+ <p><b>And that panel switched by ajax and closed by default:</b></p>
+
+ <rich:collapsiblePanel header="JSF 2 and RichFaces 4" expanded="false"
+ switchType="ajax">
+ <p>We are working hard on RichFaces 4.0 which will have full JSF
+ 2 integration. That is not all though, here is a summary of updates
+ and features:</p>
+ <ul>
+ <li>Redesigned modular repository and build system.</li>
+ <li>Simplified Component Development Kit with annotations,
+ faces-config extensions, advanced templates support and more..</li>
+ <li>Ajax framework improvements extending the JSF 2
+ specification.</li>
+ <li>Component review for consistency, usability, and redesign
+ following semantic HTML principles where possible.</li>
+ <li>Both server-side and client-side performance optimization.</li>
+ <li>Strict code clean-up and review.</li>
+ </ul>
+ </rich:collapsiblePanel>
+ </h:form>
+</ui:composition>
\ No newline at end of file
Deleted: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/collapsiblePanel/simple.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/collapsiblePanel/simple.xhtml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/collapsiblePanel/simple.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,25 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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">
-
-<ui:composition>
- <p><b>collapsiblePanel</b> representation is fully analogous to simple
- <b>rich:panel</b> component. Additionally that component could be toggled
- between two representations. In collapsed state only header shown and
- in expanded state there is complete panel.</p>
- <p>As most of switchable components it has three <b>switch types</b> for
- switching between states - <b>ajax</b>, <b>server</b> and <b>client</b>
- </p>
- <ui:include src="#{demoNavigator.sampleIncludeURI}" />
- <ui:include src="/templates/includes/source-view.xhtml">
- <ui:param name="src" value="#{demoNavigator.sampleIncludeURI}" />
- <ui:param name="sourceType" value="xhtml" />
- <ui:param name="openLabel" value="View Source" />
- <ui:param name="hideLabel" value="Hide Source" />
- </ui:include>
- <p>In ajax and server mode <b>PanelToggleEvent</b> queued and could be handled
- using <b>Listener</b> defined via <b>toggleListener</b> attribute</p>
-</ui:composition>
-</html>
\ No newline at end of file
Copied: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/collapsiblePanel/simple.xhtml (from rev 19674, trunk/examples/richfaces-showcase/src/main/webapp/richfaces/collapsiblePanel/simple.xhtml)
===================================================================
--- branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/collapsiblePanel/simple.xhtml (rev 0)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/collapsiblePanel/simple.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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">
+
+<ui:composition>
+ <p><b>collapsiblePanel</b> representation is fully analogous to simple
+ <b>rich:panel</b> component. Additionally that component could be toggled
+ between two representations. In collapsed state only header shown and
+ in expanded state there is complete panel.</p>
+ <p>As most of switchable components it has three <b>switch types</b> for
+ switching between states - <b>ajax</b>, <b>server</b> and <b>client</b>
+ </p>
+ <ui:include src="#{demoNavigator.sampleIncludeURI}" />
+ <ui:include src="/templates/includes/source-view.xhtml">
+ <ui:param name="src" value="#{demoNavigator.sampleIncludeURI}" />
+ <ui:param name="sourceType" value="xhtml" />
+ <ui:param name="openLabel" value="View Source" />
+ <ui:param name="hideLabel" value="Hide Source" />
+ </ui:include>
+ <p>In ajax and server mode <b>PanelToggleEvent</b> queued and could be handled
+ using <b>Listener</b> defined via <b>toggleListener</b> attribute</p>
+</ui:composition>
+</html>
\ No newline at end of file
Copied: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/inputNumberSpinner (from rev 19674, trunk/examples/richfaces-showcase/src/main/webapp/richfaces/inputNumberSpinner)
Copied: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/inputNumberSpinner/samples (from rev 19674, trunk/examples/richfaces-showcase/src/main/webapp/richfaces/inputNumberSpinner/samples)
Deleted: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/inputNumberSpinner/samples/spinners-sample.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/inputNumberSpinner/samples/spinners-sample.xhtml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/inputNumberSpinner/samples/spinners-sample.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,17 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<ui:composition 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"
- xmlns:a4j="http://richfaces.org/a4j"
- xmlns:rich="http://richfaces.org/rich">
-
- <p>Here is an example of default inputNumberSpinner:</p>
-
- <rich:inputNumberSpinner value="50"/>
-
- <p>Here is one more inputNumberSpinner:</p>
-
- <rich:inputNumberSpinner value="50" step="10"/>
-
-</ui:composition>
\ No newline at end of file
Copied: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/inputNumberSpinner/samples/spinners-sample.xhtml (from rev 19674, trunk/examples/richfaces-showcase/src/main/webapp/richfaces/inputNumberSpinner/samples/spinners-sample.xhtml)
===================================================================
--- branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/inputNumberSpinner/samples/spinners-sample.xhtml (rev 0)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/inputNumberSpinner/samples/spinners-sample.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition 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"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+ <p>Here is an example of default inputNumberSpinner:</p>
+
+ <rich:inputNumberSpinner value="50"/>
+
+ <p>Here is one more inputNumberSpinner:</p>
+
+ <rich:inputNumberSpinner value="50" step="10"/>
+
+</ui:composition>
\ No newline at end of file
Deleted: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/inputNumberSpinner/spinners.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/inputNumberSpinner/spinners.xhtml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/inputNumberSpinner/spinners.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,20 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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">
-
-<ui:composition>
- <p>InputNumberSpinner is a highly customizable component that is used to define a numeric
- input in a given range. A user can use a spinner control or just type some text into an input field.</p>
-
- <ui:include src="#{demoNavigator.sampleIncludeURI}" />
- <ui:include src="/templates/includes/source-view.xhtml">
- <ui:param name="src" value="#{demoNavigator.sampleIncludeURI}" />
- <ui:param name="sourceType" value="xhtml" />
- <ui:param name="openLabel" value="View Source" />
- <ui:param name="hideLabel" value="Hide Source" />
- </ui:include>
-</ui:composition>
-
-</html>
\ No newline at end of file
Copied: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/inputNumberSpinner/spinners.xhtml (from rev 19674, trunk/examples/richfaces-showcase/src/main/webapp/richfaces/inputNumberSpinner/spinners.xhtml)
===================================================================
--- branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/inputNumberSpinner/spinners.xhtml (rev 0)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/inputNumberSpinner/spinners.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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">
+
+<ui:composition>
+ <p>InputNumberSpinner is a highly customizable component that is used to define a numeric
+ input in a given range. A user can use a spinner control or just type some text into an input field.</p>
+
+ <ui:include src="#{demoNavigator.sampleIncludeURI}" />
+ <ui:include src="/templates/includes/source-view.xhtml">
+ <ui:param name="src" value="#{demoNavigator.sampleIncludeURI}" />
+ <ui:param name="sourceType" value="xhtml" />
+ <ui:param name="openLabel" value="View Source" />
+ <ui:param name="hideLabel" value="Hide Source" />
+ </ui:include>
+</ui:composition>
+
+</html>
\ No newline at end of file
Copied: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar (from rev 19674, trunk/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar)
Deleted: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/ajaxProgressBar.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/ajaxProgressBar.xhtml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/ajaxProgressBar.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,25 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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">
-
-<ui:composition>
- <p>ProgressBar worked in "ajax" mode </p>
- <br/>
- <ui:include src="#{demoNavigator.sampleIncludeURI}" />
- <ui:include src="/templates/includes/source-view.xhtml">
- <ui:param name="src" value="#{demoNavigator.sampleIncludeURI}" />
- <ui:param name="sourceType" value="xhtml" />
- <ui:param name="openLabel" value="View Source" />
- <ui:param name="hideLabel" value="Hide Source" />
- </ui:include>
- <ui:include src="/templates/includes/source-view.xhtml">
- <ui:param name="src" value="/WEB-INF/src/org/richfaces/demo/progressBar/ProgressBarBean.java" />
- <ui:param name="sourceType" value="java" />
- <ui:param name="openLabel" value="View Bean Source" />
- <ui:param name="hideLabel" value="Hide Bean Source" />
- </ui:include>
-</ui:composition>
-
-</html>
\ No newline at end of file
Copied: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/ajaxProgressBar.xhtml (from rev 19674, trunk/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/ajaxProgressBar.xhtml)
===================================================================
--- branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/ajaxProgressBar.xhtml (rev 0)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/ajaxProgressBar.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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">
+
+<ui:composition>
+ <p>ProgressBar worked in "ajax" mode </p>
+ <br/>
+ <ui:include src="#{demoNavigator.sampleIncludeURI}" />
+ <ui:include src="/templates/includes/source-view.xhtml">
+ <ui:param name="src" value="#{demoNavigator.sampleIncludeURI}" />
+ <ui:param name="sourceType" value="xhtml" />
+ <ui:param name="openLabel" value="View Source" />
+ <ui:param name="hideLabel" value="Hide Source" />
+ </ui:include>
+ <ui:include src="/templates/includes/source-view.xhtml">
+ <ui:param name="src" value="/WEB-INF/src/org/richfaces/demo/progressBar/ProgressBarBean.java" />
+ <ui:param name="sourceType" value="java" />
+ <ui:param name="openLabel" value="View Bean Source" />
+ <ui:param name="hideLabel" value="Hide Bean Source" />
+ </ui:include>
+</ui:composition>
+
+</html>
\ No newline at end of file
Deleted: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/clientProgressBar.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/clientProgressBar.xhtml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/clientProgressBar.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,22 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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">
-
-<ui:composition>
- <p>ProgressBar worked in "client" mode </p>
- <br/>
-
- <ui:include src="#{demoNavigator.sampleIncludeURI}" />
- <ui:include src="/templates/includes/source-view.xhtml">
- <ui:param name="src" value="#{demoNavigator.sampleIncludeURI}" />
- <ui:param name="sourceType" value="xhtml" />
- <ui:param name="openLabel" value="View Source" />
- <ui:param name="hideLabel" value="Hide Source" />
- </ui:include>
-
-
-</ui:composition>
-
-</html>
\ No newline at end of file
Copied: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/clientProgressBar.xhtml (from rev 19674, trunk/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/clientProgressBar.xhtml)
===================================================================
--- branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/clientProgressBar.xhtml (rev 0)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/clientProgressBar.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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">
+
+<ui:composition>
+ <p>ProgressBar worked in "client" mode </p>
+ <br/>
+
+ <ui:include src="#{demoNavigator.sampleIncludeURI}" />
+ <ui:include src="/templates/includes/source-view.xhtml">
+ <ui:param name="src" value="#{demoNavigator.sampleIncludeURI}" />
+ <ui:param name="sourceType" value="xhtml" />
+ <ui:param name="openLabel" value="View Source" />
+ <ui:param name="hideLabel" value="Hide Source" />
+ </ui:include>
+
+
+</ui:composition>
+
+</html>
\ No newline at end of file
Copied: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples (from rev 19674, trunk/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples)
Deleted: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples/ajaxProgressBar-sample.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples/ajaxProgressBar-sample.xhtml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples/ajaxProgressBar-sample.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,32 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<ui:composition 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"
- xmlns:a4j="http://richfaces.org/a4j"
- xmlns:rich="http://richfaces.org/rich">
- <h:form id="form">
- <rich:progressBar mode="ajax" value="#{progressBarBean.currentValue}"
- interval="2000"
- enabled="#{progressBarBean.enabled}" minValue="-1" maxValue="100"
- reRenderAfterComplete="progressPanel">
- <f:facet name="initial">
- <br />
- <h:outputText value="Process doesn't started yet" />
- <a4j:commandButton action="#{progressBarBean.startProcess}"
- value="Start Process" execute="@form"
- rendered="#{progressBarBean.buttonRendered}"
- style="margin: 9px 0px 5px;" />
- </f:facet>
- <f:facet name="complete">
- <br />
- <h:outputText value="Process Done" />
- <a4j:commandButton action="#{progressBarBean.startProcess}"
- value="Restart Process" execute="@form"
- rendered="#{progressBarBean.buttonRendered}"
- style="margin: 9px 0px 5px;" />
- </f:facet>
- <h:outputText value="#{progressBarBean.currentValue} %"/>
- </rich:progressBar>
- </h:form>
-</ui:composition>
\ No newline at end of file
Copied: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples/ajaxProgressBar-sample.xhtml (from rev 19674, trunk/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples/ajaxProgressBar-sample.xhtml)
===================================================================
--- branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples/ajaxProgressBar-sample.xhtml (rev 0)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples/ajaxProgressBar-sample.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition 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"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+ <h:form id="form">
+ <rich:progressBar mode="ajax" value="#{progressBarBean.currentValue}"
+ interval="2000"
+ enabled="#{progressBarBean.enabled}" minValue="-1" maxValue="100"
+ reRenderAfterComplete="progressPanel">
+ <f:facet name="initial">
+ <br />
+ <h:outputText value="Process doesn't started yet" />
+ <a4j:commandButton action="#{progressBarBean.startProcess}"
+ value="Start Process" execute="@form"
+ rendered="#{progressBarBean.buttonRendered}"
+ style="margin: 9px 0px 5px;" />
+ </f:facet>
+ <f:facet name="complete">
+ <br />
+ <h:outputText value="Process Done" />
+ <a4j:commandButton action="#{progressBarBean.startProcess}"
+ value="Restart Process" execute="@form"
+ rendered="#{progressBarBean.buttonRendered}"
+ style="margin: 9px 0px 5px;" />
+ </f:facet>
+ <h:outputText value="#{progressBarBean.currentValue} %"/>
+ </rich:progressBar>
+ </h:form>
+</ui:composition>
\ No newline at end of file
Deleted: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples/clientProgressBar-sample.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples/clientProgressBar-sample.xhtml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples/clientProgressBar-sample.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,40 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<ui:composition 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"
- xmlns:a4j="http://richfaces.org/a4j"
- xmlns:rich="http://richfaces.org/rich">
- <script>
-//<![CDATA[
- var counter = 1;
- var intervalID;
- function updateProgress(i) {
- RichFaces.$('form2:progressBar').setValue(counter*5);
- if ((counter++)>20){
- clearInterval(intervalID);
- document.getElementById('button').disabled=false;
- }
- }
-
- function startProgress(){
- counter=1;
- document.getElementById('button').disabled=true;
- RichFaces.$('form2:progressBar').enable();
- RichFaces.$('form2:progressBar').setValue(1);
- intervalID = setInterval(updateProgress,5000);
- }
-//]]>
- </script>
- <h:form id="form2">
- <rich:progressBar mode="client" id="progressBar">
- <f:facet name="initial">
- <h:outputText value="Process doesn't started yet"/>
- </f:facet>
- <f:facet name="complete">
- <h:outputText value="Process Done"/>
- </f:facet>
- </rich:progressBar>
- <button type="button" onclick="startProgress();" style="margin: 9px 0px 5px;" id="button">Start Progress</button>
- </h:form>
-</ui:composition>
\ No newline at end of file
Copied: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples/clientProgressBar-sample.xhtml (from rev 19674, trunk/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples/clientProgressBar-sample.xhtml)
===================================================================
--- branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples/clientProgressBar-sample.xhtml (rev 0)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples/clientProgressBar-sample.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,40 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition 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"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+ <script>
+//<![CDATA[
+ var counter = 1;
+ var intervalID;
+ function updateProgress(i) {
+ RichFaces.$('form2:progressBar').setValue(counter*5);
+ if ((counter++)>20){
+ clearInterval(intervalID);
+ document.getElementById('button').disabled=false;
+ }
+ }
+
+ function startProgress(){
+ counter=1;
+ document.getElementById('button').disabled=true;
+ RichFaces.$('form2:progressBar').enable();
+ RichFaces.$('form2:progressBar').setValue(1);
+ intervalID = setInterval(updateProgress,5000);
+ }
+//]]>
+ </script>
+ <h:form id="form2">
+ <rich:progressBar mode="client" id="progressBar">
+ <f:facet name="initial">
+ <h:outputText value="Process doesn't started yet"/>
+ </f:facet>
+ <f:facet name="complete">
+ <h:outputText value="Process Done"/>
+ </f:facet>
+ </rich:progressBar>
+ <button type="button" onclick="startProgress();" style="margin: 9px 0px 5px;" id="button">Start Progress</button>
+ </h:form>
+</ui:composition>
\ No newline at end of file
Copied: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel (from rev 19674, trunk/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel)
Deleted: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/headerCustomization.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/headerCustomization.xhtml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/headerCustomization.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,23 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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">
-
-<ui:composition>
- <p>Tab panel is used to create "tabbed" pages.
- RichFaces tab panel can be switched in 3 ways: using "normal" server-side
- update, using "ajax" style update, when only tab panel area is updated
- on the page, and using "client" type, without any interaction with the
- server. Note, that in case of a "client" switch type, all tabs are
- rendered at the same time. </p>
- <ui:include src="#{demoNavigator.sampleIncludeURI}" />
- <ui:include src="/templates/includes/source-view.xhtml">
- <ui:param name="src" value="#{demoNavigator.sampleIncludeURI}" />
- <ui:param name="sourceType" value="xhtml" />
- <ui:param name="openLabel" value="View Source" />
- <ui:param name="hideLabel" value="Hide Source" />
- </ui:include>
-
-</ui:composition>
-</html>
\ No newline at end of file
Copied: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/headerCustomization.xhtml (from rev 19674, trunk/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/headerCustomization.xhtml)
===================================================================
--- branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/headerCustomization.xhtml (rev 0)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/headerCustomization.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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">
+
+<ui:composition>
+ <p>Tab panel is used to create "tabbed" pages.
+ RichFaces tab panel can be switched in 3 ways: using "normal" server-side
+ update, using "ajax" style update, when only tab panel area is updated
+ on the page, and using "client" type, without any interaction with the
+ server. Note, that in case of a "client" switch type, all tabs are
+ rendered at the same time. </p>
+ <ui:include src="#{demoNavigator.sampleIncludeURI}" />
+ <ui:include src="/templates/includes/source-view.xhtml">
+ <ui:param name="src" value="#{demoNavigator.sampleIncludeURI}" />
+ <ui:param name="sourceType" value="xhtml" />
+ <ui:param name="openLabel" value="View Source" />
+ <ui:param name="hideLabel" value="Hide Source" />
+ </ui:include>
+
+</ui:composition>
+</html>
\ No newline at end of file
Copied: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/samples (from rev 19674, trunk/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/samples)
Deleted: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/samples/headerCustomization-sample.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/samples/headerCustomization-sample.xhtml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/samples/headerCustomization-sample.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,44 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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"
- xmlns:a4j="http://richfaces.org/a4j"
- xmlns:rich="http://richfaces.org/rich">
-
-<ui:composition>
- <strong>Tab Panel with headers attached to top or bottom side</strong>
- <br />
- <br />
- <h:form>
- <h:panelGrid columns="2">
- <h:outputLabel value="Header Position:" for="position" />
- <h:selectOneRadio id="position">
- <f:selectItem itemLabel="Top" itemValue="top" />
- <f:selectItem itemLabel="Bottom" itemValue="bottom" />
- <a4j:ajax event="change" render="tp" />
- </h:selectOneRadio>
- <h:outputLabel value="Header Location:" for="location" />
- <h:selectOneRadio id="location">
- <f:selectItem itemLabel="Left" itemValue="left" />
- <f:selectItem itemLabel="Right" itemValue="right" />
- <f:selectItem itemLabel="Center" itemValue="center" />
- <a4j:ajax event="change" render="tp" />
- </h:selectOneRadio>
- </h:panelGrid>
- <rich:tabPanel switchType="ajax" id="tp"
- headerPosition="top"
- headerLocation="center">
- <rich:tab header="First">
- Here is tab #1
- </rich:tab>
- <rich:tab header="Second">
- Here is tab #2
- </rich:tab>
- <rich:tab header="Third">
- Here is tab #3
- </rich:tab>
- </rich:tabPanel>
- </h:form>
-</ui:composition>
-</html>
\ No newline at end of file
Copied: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/samples/headerCustomization-sample.xhtml (from rev 19674, trunk/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/samples/headerCustomization-sample.xhtml)
===================================================================
--- branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/samples/headerCustomization-sample.xhtml (rev 0)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/samples/headerCustomization-sample.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+<ui:composition>
+ <strong>Tab Panel with headers attached to top or bottom side</strong>
+ <br />
+ <br />
+ <h:form>
+ <h:panelGrid columns="2">
+ <h:outputLabel value="Header Position:" for="position" />
+ <h:selectOneRadio id="position">
+ <f:selectItem itemLabel="Top" itemValue="top" />
+ <f:selectItem itemLabel="Bottom" itemValue="bottom" />
+ <a4j:ajax event="change" render="tp" />
+ </h:selectOneRadio>
+ <h:outputLabel value="Header Location:" for="location" />
+ <h:selectOneRadio id="location">
+ <f:selectItem itemLabel="Left" itemValue="left" />
+ <f:selectItem itemLabel="Right" itemValue="right" />
+ <f:selectItem itemLabel="Center" itemValue="center" />
+ <a4j:ajax event="change" render="tp" />
+ </h:selectOneRadio>
+ </h:panelGrid>
+ <rich:tabPanel switchType="ajax" id="tp"
+ headerPosition="top"
+ headerLocation="center">
+ <rich:tab header="First">
+ Here is tab #1
+ </rich:tab>
+ <rich:tab header="Second">
+ Here is tab #2
+ </rich:tab>
+ <rich:tab header="Third">
+ Here is tab #3
+ </rich:tab>
+ </rich:tabPanel>
+ </h:form>
+</ui:composition>
+</html>
\ No newline at end of file
Deleted: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/samples/simple-sample.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/samples/simple-sample.xhtml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/samples/simple-sample.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,49 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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"
- xmlns:a4j="http://richfaces.org/a4j"
- xmlns:rich="http://richfaces.org/rich">
-
-<ui:composition>
- <rich:tabPanel switchType="client">
- <rich:tab header="Overview">
- <h:graphicImage value="/images/icons/common/rf.png"
- style="float:right" />
- RichFaces is a component library for JSF and an advanced framework for
- easily integrating AJAX capabilities into business applications.
- <ul>
- <li>100+ AJAX enabled components in two libraries</li>
- <li>a4j: page centric AJAX controls</li>
- <li>rich: self contained, ready to use components</li>
- <li>Whole set of JSF benefits while working with AJAX</li>
- <li>Skinnability mechanism</li>
- <li>Component Development Kit (CDK)</li>
- <li>Dynamic resources handling</li>
- <li>Testing facilities for components, actions, listeners, and
- pages</li>
- <li>Broad cross-browser support</li>
- <li>Large and active community</li>
- </ul>
- </rich:tab>
- <rich:tab header="JSF 2 and RichFaces 4">
- <p>We are working hard on RichFaces 4.0 which will have full JSF
- 2 integration. That is not all though, here is a summary of updates
- and features:</p>
- <ul>
- <li>Redesigned modular repository and build system.</li>
- <li>Simplified Component Development Kit with annotations,
- faces-config extensions, advanced templates support and more..</li>
- <li>Ajax framework improvements extending the JSF 2
- specification.</li>
- <li>Component review for consistency, usability, and redesign
- following semantic HTML principles where possible.</li>
- <li>Both server-side and client-side performance optimization.</li>
- <li>Strict code clean-up and review.</li>
- </ul>
- </rich:tab>
- </rich:tabPanel>
-
-</ui:composition>
-</html>
\ No newline at end of file
Copied: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/samples/simple-sample.xhtml (from rev 19674, trunk/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/samples/simple-sample.xhtml)
===================================================================
--- branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/samples/simple-sample.xhtml (rev 0)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/samples/simple-sample.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,49 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+<ui:composition>
+ <rich:tabPanel switchType="client">
+ <rich:tab header="Overview">
+ <h:graphicImage value="/images/icons/common/rf.png"
+ style="float:right" />
+ RichFaces is a component library for JSF and an advanced framework for
+ easily integrating AJAX capabilities into business applications.
+ <ul>
+ <li>100+ AJAX enabled components in two libraries</li>
+ <li>a4j: page centric AJAX controls</li>
+ <li>rich: self contained, ready to use components</li>
+ <li>Whole set of JSF benefits while working with AJAX</li>
+ <li>Skinnability mechanism</li>
+ <li>Component Development Kit (CDK)</li>
+ <li>Dynamic resources handling</li>
+ <li>Testing facilities for components, actions, listeners, and
+ pages</li>
+ <li>Broad cross-browser support</li>
+ <li>Large and active community</li>
+ </ul>
+ </rich:tab>
+ <rich:tab header="JSF 2 and RichFaces 4">
+ <p>We are working hard on RichFaces 4.0 which will have full JSF
+ 2 integration. That is not all though, here is a summary of updates
+ and features:</p>
+ <ul>
+ <li>Redesigned modular repository and build system.</li>
+ <li>Simplified Component Development Kit with annotations,
+ faces-config extensions, advanced templates support and more..</li>
+ <li>Ajax framework improvements extending the JSF 2
+ specification.</li>
+ <li>Component review for consistency, usability, and redesign
+ following semantic HTML principles where possible.</li>
+ <li>Both server-side and client-side performance optimization.</li>
+ <li>Strict code clean-up and review.</li>
+ </ul>
+ </rich:tab>
+ </rich:tabPanel>
+
+</ui:composition>
+</html>
\ No newline at end of file
Deleted: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/samples/valueManagement-sample.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/samples/valueManagement-sample.xhtml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/samples/valueManagement-sample.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,37 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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"
- xmlns:a4j="http://richfaces.org/a4j"
- xmlns:rich="http://richfaces.org/rich">
-
-<ui:composition>
- <h:form>
- <strong>External controls for switching the panel:</strong>
- <br />
- <h:commandLink value="Previous tab">
- <rich:toggleControl targetPanel="tp" targetItem="@prev" />
- </h:commandLink>
- <h:outputText value=" | " />
- <h:commandLink value="Next tab">
- <rich:toggleControl targetPanel="tp" targetItem="@next" />
- </h:commandLink>
- <br />
- <br />
- <rich:tabPanel switchType="ajax" id="tp" headerPosition="top"
- headerLocation="center">
- <rich:tab header="First">
- Here is tab #1
- </rich:tab>
- <rich:tab header="Second">
- Here is tab #2
- </rich:tab>
- <rich:tab header="Third">
- Here is tab #3
- </rich:tab>
- </rich:tabPanel>
-
- </h:form>
-</ui:composition>
-</html>
\ No newline at end of file
Copied: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/samples/valueManagement-sample.xhtml (from rev 19674, trunk/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/samples/valueManagement-sample.xhtml)
===================================================================
--- branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/samples/valueManagement-sample.xhtml (rev 0)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/samples/valueManagement-sample.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+<ui:composition>
+ <h:form>
+ <strong>External controls for switching the panel:</strong>
+ <br />
+ <h:commandLink value="Previous tab">
+ <rich:toggleControl targetPanel="tp" targetItem="@prev" />
+ </h:commandLink>
+ <h:outputText value=" | " />
+ <h:commandLink value="Next tab">
+ <rich:toggleControl targetPanel="tp" targetItem="@next" />
+ </h:commandLink>
+ <br />
+ <br />
+ <rich:tabPanel switchType="ajax" id="tp" headerPosition="top"
+ headerLocation="center">
+ <rich:tab header="First">
+ Here is tab #1
+ </rich:tab>
+ <rich:tab header="Second">
+ Here is tab #2
+ </rich:tab>
+ <rich:tab header="Third">
+ Here is tab #3
+ </rich:tab>
+ </rich:tabPanel>
+
+ </h:form>
+</ui:composition>
+</html>
\ No newline at end of file
Deleted: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/simple.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/simple.xhtml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/simple.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,23 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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">
-
-<ui:composition>
- <p>Tab panel is used to create "tabbed" pages.
- RichFaces tab panel can be switched in 3 ways: using "normal" server-side
- update, using "ajax" style update, when only tab panel area is updated
- on the page, and using "client" type, without any interaction with the
- server. Note, that in case of a "client" switch type, all tabs are
- rendered at the same time. </p>
- <ui:include src="#{demoNavigator.sampleIncludeURI}" />
- <ui:include src="/templates/includes/source-view.xhtml">
- <ui:param name="src" value="#{demoNavigator.sampleIncludeURI}" />
- <ui:param name="sourceType" value="xhtml" />
- <ui:param name="openLabel" value="View Source" />
- <ui:param name="hideLabel" value="Hide Source" />
- </ui:include>
-
-</ui:composition>
-</html>
\ No newline at end of file
Copied: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/simple.xhtml (from rev 19674, trunk/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/simple.xhtml)
===================================================================
--- branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/simple.xhtml (rev 0)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/simple.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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">
+
+<ui:composition>
+ <p>Tab panel is used to create "tabbed" pages.
+ RichFaces tab panel can be switched in 3 ways: using "normal" server-side
+ update, using "ajax" style update, when only tab panel area is updated
+ on the page, and using "client" type, without any interaction with the
+ server. Note, that in case of a "client" switch type, all tabs are
+ rendered at the same time. </p>
+ <ui:include src="#{demoNavigator.sampleIncludeURI}" />
+ <ui:include src="/templates/includes/source-view.xhtml">
+ <ui:param name="src" value="#{demoNavigator.sampleIncludeURI}" />
+ <ui:param name="sourceType" value="xhtml" />
+ <ui:param name="openLabel" value="View Source" />
+ <ui:param name="hideLabel" value="Hide Source" />
+ </ui:include>
+
+</ui:composition>
+</html>
\ No newline at end of file
Deleted: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/valueManagement.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/valueManagement.xhtml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/valueManagement.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -1,31 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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">
-
-<ui:composition>
- <p>That sample shows how to use external controls for switching the
- panel</p>
- <p><b>toggleControl</b> behavior used as for any other switchable
- panel (<i>togglePanel, accordion</i>)</p>
- <p><b>targetItem</b> could be <b>defined with tab name</b> and
- additionally tabPanel supports next <b>predefined shortcuts</b>:</p>
- <ul>
- <li>@next</li>
- <li>@prev</li>
- <li>@first</li>
- <li>@last</li>
- </ul>
- <ui:include src="#{demoNavigator.sampleIncludeURI}" />
- <ui:include src="/templates/includes/source-view.xhtml">
- <ui:param name="src" value="#{demoNavigator.sampleIncludeURI}" />
- <ui:param name="sourceType" value="xhtml" />
- <ui:param name="openLabel" value="View Source" />
- <ui:param name="hideLabel" value="Hide Source" />
- </ui:include>
- <p>Additionally you could manage the current tab at server side
- using <b>activeItem</b> attribute at tabPanel <b>bound to some Bean
- property</b> which holds current tab name.</p>
-</ui:composition>
-</html>
\ No newline at end of file
Copied: branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/valueManagement.xhtml (from rev 19674, trunk/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/valueManagement.xhtml)
===================================================================
--- branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/valueManagement.xhtml (rev 0)
+++ branches/RF-7817/examples/richfaces-showcase/src/main/webapp/richfaces/tabPanel/valueManagement.xhtml 2010-10-27 16:28:07 UTC (rev 19704)
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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">
+
+<ui:composition>
+ <p>That sample shows how to use external controls for switching the
+ panel</p>
+ <p><b>toggleControl</b> behavior used as for any other switchable
+ panel (<i>togglePanel, accordion</i>)</p>
+ <p><b>targetItem</b> could be <b>defined with tab name</b> and
+ additionally tabPanel supports next <b>predefined shortcuts</b>:</p>
+ <ul>
+ <li>@next</li>
+ <li>@prev</li>
+ <li>@first</li>
+ <li>@last</li>
+ </ul>
+ <ui:include src="#{demoNavigator.sampleIncludeURI}" />
+ <ui:include src="/templates/includes/source-view.xhtml">
+ <ui:param name="src" value="#{demoNavigator.sampleIncludeURI}" />
+ <ui:param name="sourceType" value="xhtml" />
+ <ui:param name="openLabel" value="View Source" />
+ <ui:param name="hideLabel" value="Hide Source" />
+ </ui:include>
+ <p>Additionally you could manage the current tab at server side
+ using <b>activeItem</b> attribute at tabPanel <b>bound to some Bean
+ property</b> which holds current tab name.</p>
+</ui:composition>
+</html>
\ No newline at end of file
14 years, 3 months
JBoss Rich Faces SVN: r19703 - in branches/RF-7817/archetypes: rf-gae-sample and 25 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-10-27 12:17:45 -0400 (Wed, 27 Oct 2010)
New Revision: 19703
Added:
branches/RF-7817/archetypes/rf-gae-sample/
branches/RF-7817/archetypes/rf-gae-sample/assembler.xml
branches/RF-7817/archetypes/rf-gae-sample/pom.xml
branches/RF-7817/archetypes/rf-gae-sample/readme.txt
branches/RF-7817/archetypes/rf-gae-sample/src/
branches/RF-7817/archetypes/rf-gae-sample/src/main/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/META-INF/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/META-INF/maven/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/META-INF/maven/archetype-metadata.xml
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/pom.xml
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/readme.txt
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java-gae-jsf-ri/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java-gae-jsf-ri/com/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java-gae-jsf-ri/com/sun/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java-gae-jsf-ri/com/sun/faces/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java-gae-jsf-ri/com/sun/faces/config/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java-gae-jsf-ri/com/sun/faces/config/WebConfiguration.java
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java/RichBean.java
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/resources/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/resources/logging.properties
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp-gae/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp-gae/WEB-INF/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp-gae/WEB-INF/appengine-web.xml
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp-gae/WEB-INF/web.xml
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jboss-scanning.xml
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/index.jsp
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/index.xhtml
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/templates/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/templates/template.xhtml
branches/RF-7817/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/java/RichBean.java
Removed:
branches/RF-7817/archetypes/rf-gae-sample/assembler.xml
branches/RF-7817/archetypes/rf-gae-sample/pom.xml
branches/RF-7817/archetypes/rf-gae-sample/readme.txt
branches/RF-7817/archetypes/rf-gae-sample/src/
branches/RF-7817/archetypes/rf-gae-sample/src/main/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/META-INF/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/META-INF/maven/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/META-INF/maven/archetype-metadata.xml
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/pom.xml
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/readme.txt
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java-gae-jsf-ri/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java-gae-jsf-ri/com/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java-gae-jsf-ri/com/sun/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java-gae-jsf-ri/com/sun/faces/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java-gae-jsf-ri/com/sun/faces/config/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java-gae-jsf-ri/com/sun/faces/config/WebConfiguration.java
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java/RichBean.java
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/resources/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/resources/logging.properties
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp-gae/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp-gae/WEB-INF/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp-gae/WEB-INF/appengine-web.xml
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp-gae/WEB-INF/web.xml
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jboss-scanning.xml
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/index.jsp
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/index.xhtml
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/templates/
branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/templates/template.xhtml
branches/RF-7817/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/java/org/
Modified:
branches/RF-7817/archetypes/pom.xml
branches/RF-7817/archetypes/richfaces-archetype-simpleapp/pom.xml
branches/RF-7817/archetypes/richfaces-archetype-simpleapp/src/main/resources/META-INF/maven/archetype-metadata.xml
branches/RF-7817/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/pom.xml
branches/RF-7817/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml
Log:
Merged revisions 19156-19157,19159-19160,19176,19186-19187,19190,19194,19196,19199,19203-19204,19231-19234,19248-19249,19255-19256,19258-19262,19276,19279-19281,19283,19285,19291-19299,19307,19312,19315,19318-19319,19325,19341-19342,19345-19351,19353-19355,19358-19359,19364,19367-19369,19371,19374-19377,19379-19385,19387,19393-19394,19400,19402-19404,19418-19422,19426,19430-19431,19434-19441,19443-19444,19446,19468,19470,19477,19491,19498-19499,19501,19504,19506-19507,19517-19519,19525,19542-19543,19548,19550,19555,19557,19560-19561,19565-19566,19571-19573,19582-19585,19592-19593,19599,19601-19602,19613,19646,19657-19659,19665,19671-19674 via svnmerge from
https://svn.jboss.org/repos/richfaces/trunk
Modified: branches/RF-7817/archetypes/pom.xml
===================================================================
--- branches/RF-7817/archetypes/pom.xml 2010-10-27 16:03:48 UTC (rev 19702)
+++ branches/RF-7817/archetypes/pom.xml 2010-10-27 16:17:45 UTC (rev 19703)
@@ -39,6 +39,7 @@
<module>richfaces-component</module>
<module>richfaces-component-short</module>
<module>richfaces-components-aggregator</module>
+ <module>rf-gae-sample</module>
</modules>
<properties>
Copied: branches/RF-7817/archetypes/rf-gae-sample (from rev 19674, trunk/archetypes/rf-gae-sample)
Property changes on: branches/RF-7817/archetypes/rf-gae-sample
___________________________________________________________________
Name: svn:ignore
+ target
Deleted: branches/RF-7817/archetypes/rf-gae-sample/assembler.xml
===================================================================
--- trunk/archetypes/rf-gae-sample/assembler.xml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/archetypes/rf-gae-sample/assembler.xml 2010-10-27 16:17:45 UTC (rev 19703)
@@ -1,22 +0,0 @@
-<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
- <formats>
- <format>dir</format>
- </formats>
-
- <files>
- <file>
- <source>pom.xml</source>
- </file>
- <file>
- <source>readme.txt</source>
- </file>
- </files>
-
- <fileSets>
- <fileSet>
- <directory>src</directory>
- </fileSet>
- </fileSets>
-</assembly>
\ No newline at end of file
Copied: branches/RF-7817/archetypes/rf-gae-sample/assembler.xml (from rev 19674, trunk/archetypes/rf-gae-sample/assembler.xml)
===================================================================
--- branches/RF-7817/archetypes/rf-gae-sample/assembler.xml (rev 0)
+++ branches/RF-7817/archetypes/rf-gae-sample/assembler.xml 2010-10-27 16:17:45 UTC (rev 19703)
@@ -0,0 +1,22 @@
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <formats>
+ <format>dir</format>
+ </formats>
+
+ <files>
+ <file>
+ <source>pom.xml</source>
+ </file>
+ <file>
+ <source>readme.txt</source>
+ </file>
+ </files>
+
+ <fileSets>
+ <fileSet>
+ <directory>src</directory>
+ </fileSet>
+ </fileSets>
+</assembly>
\ No newline at end of file
Deleted: branches/RF-7817/archetypes/rf-gae-sample/pom.xml
===================================================================
--- trunk/archetypes/rf-gae-sample/pom.xml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/archetypes/rf-gae-sample/pom.xml 2010-10-27 16:17:45 UTC (rev 19703)
@@ -1,100 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
- <parent>
- <groupId>org.richfaces</groupId>
- <artifactId>richfaces-parent</artifactId>
- <version>10</version>
- <relativePath>../../build/parent/pom.xml</relativePath>
- </parent>
-
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces.archetypes</groupId>
- <artifactId>richfaces-archetype-gae</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- <packaging>maven-archetype</packaging>
- <name>RichFaces Archetypes: GAE Application</name>
-
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- </properties>
-
- <build>
- <extensions>
- <extension>
- <groupId>org.apache.maven.archetype</groupId>
- <artifactId>archetype-packaging</artifactId>
- <version>2.0-alpha-4</version>
- </extension>
- </extensions>
- <plugins>
- <plugin>
- <artifactId>maven-archetype-plugin</artifactId>
- <version>2.0-alpha-4</version>
- <extensions>true</extensions>
- </plugin>
- </plugins>
- <resources>
- <!-- Selectively trigger filtering on resource directory
- The second element turns on filtering only for META-INF directory
- -->
- <resource>
- <directory>src/main/resources/</directory>
- <filtering>false</filtering>
- </resource>
- <resource>
- <directory>src/main/resources/META-INF/maven</directory>
- <filtering>true</filtering>
- <targetPath>META-INF/maven</targetPath>
- </resource>
- </resources>
- </build>
-
- <profiles>
- <profile>
- <id>release</id>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <executions>
- <execution>
- <id>group-sources</id>
- <goals>
- <goal>single</goal>
- </goals>
- <phase>package</phase>
- <configuration>
- <finalName>sources</finalName>
- <descriptor>assembler.xml</descriptor>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-jar-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>jar</goal>
- </goals>
- <phase>package</phase>
- <configuration>
- <classesDirectory>${basedir}/target/sources/sources</classesDirectory>
- <classifier>sources</classifier>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/trunk/archetypes/richfac...</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/trunk/archetypes/richfaces-...</developerConnection>
- <url>http://fisheye.jboss.org/browse/richfaces/</url>
- </scm>
-</project>
-
Copied: branches/RF-7817/archetypes/rf-gae-sample/pom.xml (from rev 19674, trunk/archetypes/rf-gae-sample/pom.xml)
===================================================================
--- branches/RF-7817/archetypes/rf-gae-sample/pom.xml (rev 0)
+++ branches/RF-7817/archetypes/rf-gae-sample/pom.xml 2010-10-27 16:17:45 UTC (rev 19703)
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <parent>
+ <groupId>org.richfaces</groupId>
+ <artifactId>richfaces-parent</artifactId>
+ <version>10</version>
+ <relativePath>../../build/parent/pom.xml</relativePath>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces.archetypes</groupId>
+ <artifactId>richfaces-archetype-gae</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <packaging>maven-archetype</packaging>
+ <name>RichFaces Archetypes: GAE Application</name>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+ <build>
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.archetype</groupId>
+ <artifactId>archetype-packaging</artifactId>
+ <version>2.0-alpha-4</version>
+ </extension>
+ </extensions>
+ <plugins>
+ <plugin>
+ <artifactId>maven-archetype-plugin</artifactId>
+ <version>2.0-alpha-4</version>
+ <extensions>true</extensions>
+ </plugin>
+ </plugins>
+ <resources>
+ <!-- Selectively trigger filtering on resource directory
+ The second element turns on filtering only for META-INF directory
+ -->
+ <resource>
+ <directory>src/main/resources/</directory>
+ <filtering>false</filtering>
+ </resource>
+ <resource>
+ <directory>src/main/resources/META-INF/maven</directory>
+ <filtering>true</filtering>
+ <targetPath>META-INF/maven</targetPath>
+ </resource>
+ </resources>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>release</id>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>group-sources</id>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <finalName>sources</finalName>
+ <descriptor>assembler.xml</descriptor>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <classesDirectory>${basedir}/target/sources/sources</classesDirectory>
+ <classifier>sources</classifier>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/trunk/archetypes/richfac...</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/trunk/archetypes/richfaces-...</developerConnection>
+ <url>http://fisheye.jboss.org/browse/richfaces/</url>
+ </scm>
+</project>
+
Deleted: branches/RF-7817/archetypes/rf-gae-sample/readme.txt
===================================================================
--- trunk/archetypes/rf-gae-sample/readme.txt 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/archetypes/rf-gae-sample/readme.txt 2010-10-27 16:17:45 UTC (rev 19703)
@@ -1,46 +0,0 @@
-RichFaces 4 Archetype
-
-GENERATING THE PROJECT
-
-This archetype creates a simple RichFaces 4 application with all the settings and custom artifacts you need to perform deploy to GAE cloud.
-
-1) To generate a project from the archetype, run
-
- mvn archetype:generate -DarchetypeGroupId=org.richfaces.archetypes -DarchetypeArtifactId=richfaces-archetype-gae -DarchetypeVersion=<richfaces-version>
- -DgroupId=<yourGroupId> -DartifactId=<yourArtifactId> -Dversion=1.0-SNAPSHOT
-
-2) Navigate into the new project directory and build by running:
- mvn clean install
-
-*BEFORE NEXT STEP:
- -- You should setup your GAE account at http://appspot.com
- -- Register your new application there. By default the applications name is "rf-${artifactId}"
- -- Download and install the GAE SDK for deployment and local server tools
-
-3) Execute appcfg from GAE SDK to publish to your account:
- appcfg update <PATH: "generated-application-target-folder/output application folder">
-
-4) Once uploaded, visit your application using http://<application-name>.appspot.com
-4.1) check all the information about deployed application at https://appengine.google.com/dashboard?&app_id=<your-application-id>
-
-NOTE:
-During build the "org.richfaces.cdk:maven-resource-plugin" executed and generated static resources(web-app\static-resources\) for all skins in order to
-solve the compatibility problem with GAE and java2D API.
-
-NOTE: about additional artifacts in webapp folder:
-1) java-gae-jsf-ri - contains modified WebConfiguration.java class which will be put to Web-inf\classes when building with GAE profile. It solves compatibilities
-issues exist in GAE for JSF applications.
-
-2) Webapp-gae folder contains GAE descriptor(appengine-web.xml) and modified application web.xml. They will be placed in the WEB-INF folder. The web.xml
-is different in order to use static resources generated by plugin instead of dynamic resources. And also restricts threading with
-com.sun.faces.enableThreading context parameter as GAE not allows threads.
-
-============================================================================================================
-
-LOCAL DEPLOYMENTS
-To test your application on your local machine you can use GAE SDK development server.
-1) Build archetype as above
-2) Navigate GAE SDK /bin
-3) Execute"
- ./dev_appserver.sh <PATH: "generated-application-target-folder/output application folder">
-4) Once loaded, access your application at http:\\localhost:8080\
\ No newline at end of file
Copied: branches/RF-7817/archetypes/rf-gae-sample/readme.txt (from rev 19674, trunk/archetypes/rf-gae-sample/readme.txt)
===================================================================
--- branches/RF-7817/archetypes/rf-gae-sample/readme.txt (rev 0)
+++ branches/RF-7817/archetypes/rf-gae-sample/readme.txt 2010-10-27 16:17:45 UTC (rev 19703)
@@ -0,0 +1,46 @@
+RichFaces 4 Archetype
+
+GENERATING THE PROJECT
+
+This archetype creates a simple RichFaces 4 application with all the settings and custom artifacts you need to perform deploy to GAE cloud.
+
+1) To generate a project from the archetype, run
+
+ mvn archetype:generate -DarchetypeGroupId=org.richfaces.archetypes -DarchetypeArtifactId=richfaces-archetype-gae -DarchetypeVersion=<richfaces-version>
+ -DgroupId=<yourGroupId> -DartifactId=<yourArtifactId> -Dversion=1.0-SNAPSHOT
+
+2) Navigate into the new project directory and build by running:
+ mvn clean install
+
+*BEFORE NEXT STEP:
+ -- You should setup your GAE account at http://appspot.com
+ -- Register your new application there. By default the applications name is "rf-${artifactId}"
+ -- Download and install the GAE SDK for deployment and local server tools
+
+3) Execute appcfg from GAE SDK to publish to your account:
+ appcfg update <PATH: "generated-application-target-folder/output application folder">
+
+4) Once uploaded, visit your application using http://<application-name>.appspot.com
+4.1) check all the information about deployed application at https://appengine.google.com/dashboard?&app_id=<your-application-id>
+
+NOTE:
+During build the "org.richfaces.cdk:maven-resource-plugin" executed and generated static resources(web-app\static-resources\) for all skins in order to
+solve the compatibility problem with GAE and java2D API.
+
+NOTE: about additional artifacts in webapp folder:
+1) java-gae-jsf-ri - contains modified WebConfiguration.java class which will be put to Web-inf\classes when building with GAE profile. It solves compatibilities
+issues exist in GAE for JSF applications.
+
+2) Webapp-gae folder contains GAE descriptor(appengine-web.xml) and modified application web.xml. They will be placed in the WEB-INF folder. The web.xml
+is different in order to use static resources generated by plugin instead of dynamic resources. And also restricts threading with
+com.sun.faces.enableThreading context parameter as GAE not allows threads.
+
+============================================================================================================
+
+LOCAL DEPLOYMENTS
+To test your application on your local machine you can use GAE SDK development server.
+1) Build archetype as above
+2) Navigate GAE SDK /bin
+3) Execute"
+ ./dev_appserver.sh <PATH: "generated-application-target-folder/output application folder">
+4) Once loaded, access your application at http:\\localhost:8080\
\ No newline at end of file
Copied: branches/RF-7817/archetypes/rf-gae-sample/src (from rev 19674, trunk/archetypes/rf-gae-sample/src)
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main (from rev 19674, trunk/archetypes/rf-gae-sample/src/main)
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources (from rev 19674, trunk/archetypes/rf-gae-sample/src/main/resources)
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/META-INF (from rev 19674, trunk/archetypes/rf-gae-sample/src/main/resources/META-INF)
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/META-INF/maven (from rev 19674, trunk/archetypes/rf-gae-sample/src/main/resources/META-INF/maven)
Deleted: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/META-INF/maven/archetype-metadata.xml
===================================================================
--- trunk/archetypes/rf-gae-sample/src/main/resources/META-INF/maven/archetype-metadata.xml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/META-INF/maven/archetype-metadata.xml 2010-10-27 16:17:45 UTC (rev 19703)
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<archetype-descriptor xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descript... http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" name="gae-sample"
- xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descript..."
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <requiredProperties>
- <requiredProperty key="richfaces-version">
- <defaultValue>${project.version}</defaultValue>
- </requiredProperty>
- </requiredProperties>
- <fileSets>
- <fileSet filtered="true" packaged="true" encoding="UTF-8">
- <directory>src/main/java</directory>
- <includes>
- <include>**/*.java</include>
- </includes>
- </fileSet>
- <fileSet filtered="true" encoding="UTF-8">
- <directory>src/main/webapp</directory>
- <includes>
- <include>**/*.jsp</include>
- <include>**/*.xhtml</include>
- <include>**/*.xml</include>
- </includes>
- </fileSet>
- <fileSet filtered="true" encoding="UTF-8">
- <directory>src/main/java-gae-jsf-ri</directory>
- <includes>
- <include>**/*.java</include>
- </includes>
- </fileSet>
- <fileSet filtered="true" encoding="UTF-8">
- <directory>src/main/resources</directory>
- <includes>
- <include>**/*.properties</include>
- </includes>
- </fileSet>
- <fileSet filtered="true" encoding="UTF-8">
- <directory>src/main/webapp-gae</directory>
- <includes>
- <include>**/*.xml</include>
- </includes>
- </fileSet>
- <fileSet encoding="UTF-8">
- <directory>src/main/webapp</directory>
- <includes>
- <include>**/*.jsfdia</include>
- </includes>
- </fileSet>
- <fileSet filtered="true" encoding="UTF-8">
- <directory>.settings</directory>
- <includes>
- <include>**/*.xml</include>
- </includes>
- </fileSet>
- <fileSet encoding="UTF-8">
- <directory>.settings</directory>
- <includes>
- <include>**/*.prefs</include>
- <include>**/*.component</include>
- </includes>
- </fileSet>
- <fileSet filtered="true" encoding="UTF-8">
- <directory></directory>
- <includes>
- <include>.classpath</include>
- <include>.project</include>
- <include>readme.txt</include>
- </includes>
- </fileSet>
- </fileSets>
-</archetype-descriptor>
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/META-INF/maven/archetype-metadata.xml (from rev 19674, trunk/archetypes/rf-gae-sample/src/main/resources/META-INF/maven/archetype-metadata.xml)
===================================================================
--- branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/META-INF/maven/archetype-metadata.xml (rev 0)
+++ branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/META-INF/maven/archetype-metadata.xml 2010-10-27 16:17:45 UTC (rev 19703)
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archetype-descriptor xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descript... http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" name="gae-sample"
+ xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descript..."
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <requiredProperties>
+ <requiredProperty key="richfaces-version">
+ <defaultValue>${project.version}</defaultValue>
+ </requiredProperty>
+ </requiredProperties>
+ <fileSets>
+ <fileSet filtered="true" packaged="true" encoding="UTF-8">
+ <directory>src/main/java</directory>
+ <includes>
+ <include>**/*.java</include>
+ </includes>
+ </fileSet>
+ <fileSet filtered="true" encoding="UTF-8">
+ <directory>src/main/webapp</directory>
+ <includes>
+ <include>**/*.jsp</include>
+ <include>**/*.xhtml</include>
+ <include>**/*.xml</include>
+ </includes>
+ </fileSet>
+ <fileSet filtered="true" encoding="UTF-8">
+ <directory>src/main/java-gae-jsf-ri</directory>
+ <includes>
+ <include>**/*.java</include>
+ </includes>
+ </fileSet>
+ <fileSet filtered="true" encoding="UTF-8">
+ <directory>src/main/resources</directory>
+ <includes>
+ <include>**/*.properties</include>
+ </includes>
+ </fileSet>
+ <fileSet filtered="true" encoding="UTF-8">
+ <directory>src/main/webapp-gae</directory>
+ <includes>
+ <include>**/*.xml</include>
+ </includes>
+ </fileSet>
+ <fileSet encoding="UTF-8">
+ <directory>src/main/webapp</directory>
+ <includes>
+ <include>**/*.jsfdia</include>
+ </includes>
+ </fileSet>
+ <fileSet filtered="true" encoding="UTF-8">
+ <directory>.settings</directory>
+ <includes>
+ <include>**/*.xml</include>
+ </includes>
+ </fileSet>
+ <fileSet encoding="UTF-8">
+ <directory>.settings</directory>
+ <includes>
+ <include>**/*.prefs</include>
+ <include>**/*.component</include>
+ </includes>
+ </fileSet>
+ <fileSet filtered="true" encoding="UTF-8">
+ <directory></directory>
+ <includes>
+ <include>.classpath</include>
+ <include>.project</include>
+ <include>readme.txt</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+</archetype-descriptor>
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources (from rev 19674, trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources)
Deleted: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/pom.xml
===================================================================
--- trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/pom.xml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/pom.xml 2010-10-27 16:17:45 UTC (rev 19703)
@@ -1,224 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>${groupId}</groupId>
- <artifactId>${artifactId}</artifactId>
- <name>${artifactId}</name>
- <version>${version}</version>
- <packaging>war</packaging>
-
- <url>http://jboss.org/richfaces</url>
-
- <repositories>
- <repository>
- <id>jboss-public-repository-group</id>
- <name>Jboss Repository for Maven</name>
- <url>https://repository.jboss.org/nexus/content/groups/public/</url>
- </repository>
- <repository>
- <id>java-net</id>
- <name>Java.net Maven Repository</name>
- <url>http://download.java.net/maven/2</url>
- </repository>
- </repositories>
-
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <!-- Setting this property using archetype-metadata.xml requiredPorperty
- so that generated project uses correct version of richfaces.
- -->
- <org.richfaces.bom.version>${richfaces-version}</org.richfaces.bom.version>
- </properties>
-
- <build>
- <finalName>${artifactId}</finalName>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>add-source</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>src/main/java-gae-jsf-ri</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-war-plugin</artifactId>
- <configuration>
- <webResources>
- <resource>
- <directory>src/main/webapp-gae</directory>
- </resource>
- <resource>
- <directory>src/main/webapp</directory>
- </resource>
- <resource>
- <directory>${project.build.directory}/generated-resources</directory>
- <targetPath>static-resources</targetPath>
- </resource>
- <resource>
- <directory>${basedir}/src/main/java</directory>
- <targetPath>/WEB-INF/src</targetPath>
- </resource>
- </webResources>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.richfaces.cdk</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <version>${org.richfaces.bom.version}</version>
- <configuration></configuration>
- <executions>
- <execution>
- <id>process</id>
- <goals>
- <goal>process</goal>
- </goals>
- <configuration>
- <outputDir>generated-resources</outputDir>
- <skins>
- <skin>blueSky</skin>
- <skin>classic</skin>
- <skin>deepMarine</skin>
- <skin>emeraldTown</skin>
- <skin>japanCherry</skin>
- <skin>ruby</skin>
- <skin>wine</skin>
- </skins>
- <includedContentTypes>
- <include>application/javascript</include>
- <include>text/css</include>
- <include>image/.+</include>
- </includedContentTypes>
- <fileNameMappings>
- <property>
- <name>^\Qorg.richfaces.renderkit.html\E</name>
- <value>org.richfaces/images</value>
- </property>
- <property>
- <name>^\Qorg.richfaces.renderkit.html.images\E</name>
- <value>org.richfaces/images</value>
- </property>
- <property>
- <name>^css/</name>
- <value>org.richfaces/css/</value>
- </property>
- </fileNameMappings>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>richfaces-bom</artifactId>
- <version>${org.richfaces.bom.version}</version>
- <scope>import</scope>
- <type>pom</type>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
- <dependency>
- <groupId>org.richfaces.ui</groupId>
- <artifactId>richfaces-components-ui</artifactId>
- </dependency>
-
- <dependency>
- <groupId>com.sun.faces</groupId>
- <artifactId>jsf-api</artifactId>
- </dependency>
- <dependency>
- <groupId>com.sun.faces</groupId>
- <artifactId>jsf-impl</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet.jsp</groupId>
- <artifactId>jsp-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jstl</artifactId>
- </dependency>
-
- <dependency>
- <groupId>net.sf.ehcache</groupId>
- <artifactId>ehcache</artifactId>
- </dependency>
-
- <!-- Tests -->
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <version>5.10</version>
- <classifier>jdk15</classifier>
- <scope>test</scope>
- </dependency>
-
- <!-- GAE PROFILE DEPENDENCIES -->
- <dependency>
- <groupId>org.glassfish.web</groupId>
- <artifactId>el-impl</artifactId>
- <version>2.2</version>
- </dependency>
- <dependency>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- <version>2.2</version>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jta_1.1_spec</artifactId>
- <version>1.1.1</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jpa_3.0_spec</artifactId>
- <version>1.1.1</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>xalan</groupId>
- <artifactId>xalan</artifactId>
- <version>2.7.1</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>xerces</groupId>
- <artifactId>xercesImpl</artifactId>
- <version>2.9.1</version>
- <scope>runtime</scope>
- </dependency>
- </dependencies>
-</project>
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/pom.xml (from rev 19674, trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/pom.xml)
===================================================================
--- branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/pom.xml (rev 0)
+++ branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/pom.xml 2010-10-27 16:17:45 UTC (rev 19703)
@@ -0,0 +1,224 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>${groupId}</groupId>
+ <artifactId>${artifactId}</artifactId>
+ <name>${artifactId}</name>
+ <version>${version}</version>
+ <packaging>war</packaging>
+
+ <url>http://jboss.org/richfaces</url>
+
+ <repositories>
+ <repository>
+ <id>jboss-public-repository-group</id>
+ <name>Jboss Repository for Maven</name>
+ <url>https://repository.jboss.org/nexus/content/groups/public/</url>
+ </repository>
+ <repository>
+ <id>java-net</id>
+ <name>Java.net Maven Repository</name>
+ <url>http://download.java.net/maven/2</url>
+ </repository>
+ </repositories>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <!-- Setting this property using archetype-metadata.xml requiredPorperty
+ so that generated project uses correct version of richfaces.
+ -->
+ <org.richfaces.bom.version>${richfaces-version}</org.richfaces.bom.version>
+ </properties>
+
+ <build>
+ <finalName>${artifactId}</finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>add-source</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>src/main/java-gae-jsf-ri</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <webResources>
+ <resource>
+ <directory>src/main/webapp-gae</directory>
+ </resource>
+ <resource>
+ <directory>src/main/webapp</directory>
+ </resource>
+ <resource>
+ <directory>${project.build.directory}/generated-resources</directory>
+ <targetPath>static-resources</targetPath>
+ </resource>
+ <resource>
+ <directory>${basedir}/src/main/java</directory>
+ <targetPath>/WEB-INF/src</targetPath>
+ </resource>
+ </webResources>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>${org.richfaces.bom.version}</version>
+ <configuration></configuration>
+ <executions>
+ <execution>
+ <id>process</id>
+ <goals>
+ <goal>process</goal>
+ </goals>
+ <configuration>
+ <outputDir>generated-resources</outputDir>
+ <skins>
+ <skin>blueSky</skin>
+ <skin>classic</skin>
+ <skin>deepMarine</skin>
+ <skin>emeraldTown</skin>
+ <skin>japanCherry</skin>
+ <skin>ruby</skin>
+ <skin>wine</skin>
+ </skins>
+ <includedContentTypes>
+ <include>application/javascript</include>
+ <include>text/css</include>
+ <include>image/.+</include>
+ </includedContentTypes>
+ <fileNameMappings>
+ <property>
+ <name>^\Qorg.richfaces.renderkit.html\E</name>
+ <value>org.richfaces/images</value>
+ </property>
+ <property>
+ <name>^\Qorg.richfaces.renderkit.html.images\E</name>
+ <value>org.richfaces/images</value>
+ </property>
+ <property>
+ <name>^css/</name>
+ <value>org.richfaces/css/</value>
+ </property>
+ </fileNameMappings>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces</groupId>
+ <artifactId>richfaces-bom</artifactId>
+ <version>${org.richfaces.bom.version}</version>
+ <scope>import</scope>
+ <type>pom</type>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>richfaces-components-ui</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>net.sf.ehcache</groupId>
+ <artifactId>ehcache</artifactId>
+ </dependency>
+
+ <!-- Tests -->
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>5.10</version>
+ <classifier>jdk15</classifier>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- GAE PROFILE DEPENDENCIES -->
+ <dependency>
+ <groupId>org.glassfish.web</groupId>
+ <artifactId>el-impl</artifactId>
+ <version>2.2</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <version>2.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jta_1.1_spec</artifactId>
+ <version>1.1.1</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jpa_3.0_spec</artifactId>
+ <version>1.1.1</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>xalan</groupId>
+ <artifactId>xalan</artifactId>
+ <version>2.7.1</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>2.9.1</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+</project>
Deleted: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/readme.txt
===================================================================
--- trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/readme.txt 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/readme.txt 2010-10-27 16:17:45 UTC (rev 19703)
@@ -1,37 +0,0 @@
-RichFaces 4 Archetype
-
-1) Build by running:
- mvn clean install
-
-*BEFORE NEXT STEP:
- -- You should setup your GAE account at http://appspot.com
- -- Register your new application there. By default the applications name is "rf-${artifactId}"
- -- Download and install the GAE SDK for deployment and local server tools
-
-3) Execute appcfg from GAE SDK to publish to your account:
- appcfg update <PATH: "generated-application-target-folder/output application folder">
-
-4) Once uploaded, visit your application using http://<application-name>.appspot.com
-4.1) check all the information about deployed application at https://appengine.google.com/dashboard?&app_id=<your-application-id>
-
-NOTE:
-During build the "org.richfaces.cdk:maven-resource-plugin" executed and generated static resources(web-app\static-resources\) for all skins in order to
-solve the compatibility problem with GAE and java2D API.
-
-NOTE: about additional artifacts in webapp folder:
-1) java-gae-jsf-ri - contains modified WebConfiguration.java class which will be put to Web-inf\classes when building with GAE profile. It solves compatibilities
-issues exist in GAE for JSF applications.
-
-2) Webapp-gae folder contains GAE descriptor(appengine-web.xml) and modified application web.xml. They will be placed in the WEB-INF folder. The web.xml
-is different in order to use static resources generated by plugin instead of dynamic resources. And also restricts threading with
-com.sun.faces.enableThreading context parameter as GAE not allows threads.
-
-============================================================================================================
-
-LOCAL DEPLOYMENTS
-To test your application on your local machine you can use GAE SDK development server.
-1) Build archetype as above
-2) Navigate GAE SDK /bin
-3) Execute"
- ./dev_appserver.sh <PATH: "generated-application-target-folder/output application folder">
-4) Once loaded, access your application at http:\\localhost:8080\
\ No newline at end of file
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/readme.txt (from rev 19674, trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/readme.txt)
===================================================================
--- branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/readme.txt (rev 0)
+++ branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/readme.txt 2010-10-27 16:17:45 UTC (rev 19703)
@@ -0,0 +1,37 @@
+RichFaces 4 Archetype
+
+1) Build by running:
+ mvn clean install
+
+*BEFORE NEXT STEP:
+ -- You should setup your GAE account at http://appspot.com
+ -- Register your new application there. By default the applications name is "rf-${artifactId}"
+ -- Download and install the GAE SDK for deployment and local server tools
+
+3) Execute appcfg from GAE SDK to publish to your account:
+ appcfg update <PATH: "generated-application-target-folder/output application folder">
+
+4) Once uploaded, visit your application using http://<application-name>.appspot.com
+4.1) check all the information about deployed application at https://appengine.google.com/dashboard?&app_id=<your-application-id>
+
+NOTE:
+During build the "org.richfaces.cdk:maven-resource-plugin" executed and generated static resources(web-app\static-resources\) for all skins in order to
+solve the compatibility problem with GAE and java2D API.
+
+NOTE: about additional artifacts in webapp folder:
+1) java-gae-jsf-ri - contains modified WebConfiguration.java class which will be put to Web-inf\classes when building with GAE profile. It solves compatibilities
+issues exist in GAE for JSF applications.
+
+2) Webapp-gae folder contains GAE descriptor(appengine-web.xml) and modified application web.xml. They will be placed in the WEB-INF folder. The web.xml
+is different in order to use static resources generated by plugin instead of dynamic resources. And also restricts threading with
+com.sun.faces.enableThreading context parameter as GAE not allows threads.
+
+============================================================================================================
+
+LOCAL DEPLOYMENTS
+To test your application on your local machine you can use GAE SDK development server.
+1) Build archetype as above
+2) Navigate GAE SDK /bin
+3) Execute"
+ ./dev_appserver.sh <PATH: "generated-application-target-folder/output application folder">
+4) Once loaded, access your application at http:\\localhost:8080\
\ No newline at end of file
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src (from rev 19674, trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src)
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main (from rev 19674, trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main)
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java (from rev 19674, trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java)
Deleted: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java/RichBean.java
===================================================================
--- trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java/RichBean.java 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java/RichBean.java 2010-10-27 16:17:45 UTC (rev 19703)
@@ -1,25 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package};
-
-import java.io.Serializable;
-
-public class RichBean implements Serializable {
-
- private static final long serialVersionUID = -2403138958014741653L;
- private String name;
-
- public RichBean() {
- System.out.println("post construct: initialize");
- name = "John";
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-}
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java/RichBean.java (from rev 19674, trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java/RichBean.java)
===================================================================
--- branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java/RichBean.java (rev 0)
+++ branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java/RichBean.java 2010-10-27 16:17:45 UTC (rev 19703)
@@ -0,0 +1,25 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package};
+
+import java.io.Serializable;
+
+public class RichBean implements Serializable {
+
+ private static final long serialVersionUID = -2403138958014741653L;
+ private String name;
+
+ public RichBean() {
+ System.out.println("post construct: initialize");
+ name = "John";
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+}
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java-gae-jsf-ri (from rev 19674, trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java-gae-jsf-ri)
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java-gae-jsf-ri/com (from rev 19674, trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java-gae-jsf-ri/com)
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java-gae-jsf-ri/com/sun (from rev 19674, trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java-gae-jsf-ri/com/sun)
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java-gae-jsf-ri/com/sun/faces (from rev 19674, trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java-gae-jsf-ri/com/sun/faces)
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java-gae-jsf-ri/com/sun/faces/config (from rev 19674, trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java-gae-jsf-ri/com/sun/faces/config)
Deleted: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java-gae-jsf-ri/com/sun/faces/config/WebConfiguration.java
===================================================================
--- trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java-gae-jsf-ri/com/sun/faces/config/WebConfiguration.java 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java-gae-jsf-ri/com/sun/faces/config/WebConfiguration.java 2010-10-27 16:17:45 UTC (rev 19703)
@@ -1,1112 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
- *
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common Development
- * and Distribution License("CDDL") (collectively, the "License"). You
- * may not use this file except in compliance with the License. You can obtain
- * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
- * or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
- * language governing permissions and limitations under the License.
- *
- * When distributing the software, include this License Header Notice in each
- * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
- * Sun designates this particular file as subject to the "Classpath" exception
- * as provided by Sun in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License
- * Header, with the fields enclosed by brackets [] replaced by your own
- * identifying information: "Portions Copyrighted [year]
- * [name of copyright owner]"
- *
- * Contributor(s):
- *
- * If you wish your version of this file to be governed by only the CDDL or
- * only the GPL Version 2, indicate your decision by adding "[Contributor]
- * elects to include this software in this distribution under the [CDDL or GPL
- * Version 2] license." If you don't indicate a single choice of license, a
- * recipient has the option to distribute your version of this file under
- * either the CDDL, the GPL Version 2 or to extend the choice of license to
- * its licensees as provided above. However, if you add GPL Version 2 code
- * and therefore, elected the GPL Version 2 license, then the option applies
- * only if the new code is made subject to such option by the copyright
- * holder.
- */
-
-package com.sun.faces.config;
-
-import java.util.ArrayList;
-import java.util.EnumMap;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import java.util.regex.Pattern;
-
-import javax.faces.application.ResourceHandler;
-import javax.faces.application.StateManager;
-import javax.faces.application.ViewHandler;
-import javax.faces.component.UIInput;
-import javax.faces.context.ExternalContext;
-import javax.faces.context.FacesContext;
-import javax.faces.validator.BeanValidator;
-import javax.faces.view.facelets.ResourceResolver;
-import javax.servlet.ServletContext;
-
-import com.sun.faces.util.FacesLogger;
-import com.sun.faces.util.Util;
-
-/** Class Documentation */
-public class WebConfiguration
-{
-
- // Log instance for this class
- private static final Logger LOGGER = FacesLogger.CONFIG.getLogger();
-
- // A Simple regular expression of allowable boolean values
- private static final Pattern ALLOWABLE_BOOLEANS = Pattern
- .compile("true|false");
-
- // Key under which we store our WebConfiguration instance.
- private static final String WEB_CONFIG_KEY = "com.sun.faces.config.WebConfiguration";
-
- // Logging level. Defaults to FINE
- private Level loggingLevel = Level.FINE;
-
- private Map<BooleanWebContextInitParameter, Boolean> booleanContextParameters = new EnumMap<BooleanWebContextInitParameter, Boolean>(
- BooleanWebContextInitParameter.class);
-
- private Map<WebContextInitParameter, String> contextParameters = new EnumMap<WebContextInitParameter, String>(
- WebContextInitParameter.class);
-
- private Map<WebEnvironmentEntry, String> envEntries = new EnumMap<WebEnvironmentEntry, String>(
- WebEnvironmentEntry.class);
-
- private Map<WebContextInitParameter, String[]> cachedListParams;
-
- private List<String> setParams = new ArrayList<String>();
-
- private ServletContext servletContext;
-
- // ------------------------------------------------------------ Constructors
-
- private WebConfiguration(ServletContext servletContext)
- {
-
- this.servletContext = servletContext;
-
- String contextName = getServletContextName();
-
- initSetList(servletContext);
- processBooleanParameters(servletContext, contextName);
- processInitParameters(servletContext, contextName);
- if (canProcessJndiEntries())
- {
- processJndiEntries(contextName);
- }
-
- // build the cache of list type params
- cachedListParams = new HashMap<WebContextInitParameter, String[]>(3);
- getOptionValue(WebContextInitParameter.ResourceExcludes, " ");
- getOptionValue(WebContextInitParameter.DefaultSuffix, " ");
- getOptionValue(WebContextInitParameter.FaceletsViewMappings, ";");
-
- }
-
- // ---------------------------------------------------------- Public Methods
-
- /**
- * Return the WebConfiguration instance for this application passing the
- * result of FacesContext.getCurrentInstance().getExternalContext() to
- * {@link ${symbol_pound}getInstance(javax.faces.context.ExternalContext)}.
- *
- * @return the WebConfiguration for this application or <code>null</code> if
- * no FacesContext is available.
- */
- public static WebConfiguration getInstance()
- {
-
- FacesContext facesContext = FacesContext.getCurrentInstance();
- return getInstance(facesContext.getExternalContext());
-
- }
-
- /**
- * Return the WebConfiguration instance for this application.
- *
- * @param extContext
- * the ExternalContext for this request
- * @return the WebConfiguration for this application
- */
- public static WebConfiguration getInstance(ExternalContext extContext)
- {
-
- WebConfiguration config = (WebConfiguration) extContext
- .getApplicationMap().get(WEB_CONFIG_KEY);
- if (config == null)
- {
- return getInstance((ServletContext) extContext.getContext());
- }
- else
- {
- return config;
- }
-
- }
-
- /**
- * Return the WebConfiguration instance for this application.
- *
- * @param servletContext
- * the ServletContext
- * @return the WebConfiguration for this application or <code>null</code> if
- * no WebConfiguration could be located
- */
- public static WebConfiguration getInstance(ServletContext servletContext)
- {
-
- WebConfiguration webConfig = (WebConfiguration) servletContext
- .getAttribute(WEB_CONFIG_KEY);
-
- if (webConfig == null)
- {
- webConfig = new WebConfiguration(servletContext);
- servletContext.setAttribute(WEB_CONFIG_KEY, webConfig);
- }
- return webConfig;
-
- }
-
- /**
- * @return The <code>ServletContext</code> originally used to construct this
- * WebConfiguration instance
- */
- public ServletContext getServletContext()
- {
-
- return servletContext;
-
- }
-
- /**
- * Obtain the value of the specified boolean parameter
- *
- * @param param
- * the parameter of interest
- * @return the value of the specified boolean parameter
- */
- public boolean isOptionEnabled(BooleanWebContextInitParameter param)
- {
-
- if (booleanContextParameters.get(param) != null)
- {
- return booleanContextParameters.get(param);
- }
- else
- {
- return param.getDefaultValue();
- }
-
- }
-
- /**
- * Obtain the value of the specified parameter
- *
- * @param param
- * the parameter of interest
- * @return the value of the specified parameter
- */
- public String getOptionValue(WebContextInitParameter param)
- {
- String result = contextParameters.get(param);
-
- if (null == result)
- {
- WebContextInitParameter alternate = param.getAlternate();
- if (null != alternate)
- {
- result = contextParameters.get(alternate);
- }
- }
-
- return result;
-
- }
-
- public String[] getOptionValue(WebContextInitParameter param, String sep)
- {
- String[] result;
-
- assert (null != cachedListParams);
- if (null == (result = cachedListParams.get(param)))
- {
- String value = getOptionValue(param);
- if (null == value)
- {
- result = new String[0];
- }
- else
- {
- result = Util.split(value, sep);
- }
- cachedListParams.put(param, result);
- }
-
- return result;
- }
-
- /**
- * Obtain the value of the specified env-entry
- *
- * @param entry
- * the env-entry of interest
- * @return the value of the specified env-entry
- */
- public String getEnvironmentEntry(WebEnvironmentEntry entry)
- {
-
- return envEntries.get(entry);
-
- }
-
- /**
- * @param param
- * the init parameter of interest
- * @return <code>true</code> if the parameter was explicitly set, otherwise,
- * <code>false</code>
- */
- public boolean isSet(WebContextInitParameter param)
- {
-
- return isSet(param.getQualifiedName());
-
- }
-
- /**
- * @param param
- * the init parameter of interest
- * @return <code>true</code> if the parameter was explicitly set, otherwise,
- * <code>false</code>
- */
- public boolean isSet(BooleanWebContextInitParameter param)
- {
-
- return isSet(param.getQualifiedName());
-
- }
-
- /**
- * @return the name of this application
- */
- public String getServletContextName()
- {
-
- if (servletContext.getMajorVersion() == 2
- && servletContext.getMinorVersion() <= 4)
- {
- return servletContext.getServletContextName();
- }
- else
- {
- return servletContext.getContextPath();
- }
-
- }
-
- public void overrideContextInitParameter(
- BooleanWebContextInitParameter param, boolean value)
- {
-
- if (param == null) { return; }
- boolean oldVal = booleanContextParameters.put(param, value);
- if (LOGGER.isLoggable(Level.FINE) && oldVal != value)
- {
- LOGGER
- .log(
- Level.FINE,
- "Overriding init parameter {0}. Changing from {1} to {2}.",
- new Object[]
- {
- param.getQualifiedName(), oldVal, value
- });
- }
-
- }
-
- public void overrideContextInitParameter(WebContextInitParameter param,
- String value)
- {
-
- if (param == null || value == null || value.length() == 0) { return; }
- value = value.trim();
- String oldVal = contextParameters.put(param, value);
- cachedListParams.remove(param);
- if (oldVal != null)
- {
- if (LOGGER.isLoggable(Level.FINE) && !(oldVal.equals(value)))
- {
- LOGGER
- .log(
- Level.FINE,
- "Overriding init parameter {0}. Changing from {1} to {2}.",
- new Object[]
- {
- param.getQualifiedName(), oldVal, value
- });
- }
- }
-
- }
-
- // ------------------------------------------------- Package Private Methods
-
- static void clear(ServletContext servletContext)
- {
-
- servletContext.removeAttribute(WEB_CONFIG_KEY);
-
- }
-
- // --------------------------------------------------------- Private Methods
-
- /**
- * <p>
- * Is the configured value valid against the default boolean pattern.
- * </p>
- *
- * @param param
- * the boolean parameter
- * @param value
- * the configured value
- * @return <code>true</code> if the value is valid, otherwise
- * <code>false</code>
- */
- private boolean isValueValid(BooleanWebContextInitParameter param,
- String value)
- {
-
- if (!ALLOWABLE_BOOLEANS.matcher(value).matches())
- {
- if (LOGGER.isLoggable(Level.WARNING))
- {
- LOGGER.log(Level.WARNING,
- "jsf.config.webconfig.boolconfig.invalidvalue",
- new Object[]
- {
- value, param.getQualifiedName(), "true|false"
- });
- }
- return false;
- }
-
- return true;
-
- }
-
- /**
- * <p>
- * Process all boolean context initialization parameters.
- * </p>
- *
- * @param servletContext
- * the ServletContext of interest
- * @param contextName
- * the context name
- */
- private void processBooleanParameters(ServletContext servletContext,
- String contextName)
- {
-
- // process boolean contxt parameters
- for (BooleanWebContextInitParameter param : BooleanWebContextInitParameter
- .values())
- {
- String strValue = servletContext.getInitParameter(param
- .getQualifiedName());
- boolean value;
-
- if (strValue != null && strValue.length() > 0
- && param.isDeprecated())
- {
- BooleanWebContextInitParameter alternate = param.getAlternate();
- if (LOGGER.isLoggable(Level.WARNING))
- {
- if (alternate != null)
- {
- LOGGER.log(Level.WARNING,
- "jsf.config.webconfig.param.deprecated",
- new Object[]
- {
- contextName, param.getQualifiedName(),
- alternate.getQualifiedName()
- });
- }
- else
- {
- LOGGER
- .log(
- Level.WARNING,
- "jsf.config.webconfig.param.deprecated.no_replacement",
- new Object[]
- {
- contextName,
- param.getQualifiedName()
- });
- }
- }
-
- if (alternate != null)
- {
- if (isValueValid(param, strValue))
- {
- value = Boolean.valueOf(strValue);
- }
- else
- {
- value = param.getDefaultValue();
- }
-
- if (LOGGER.isLoggable(Level.INFO) && alternate != null)
- {
- LOGGER
- .log(
- Level.INFO,
- ((value) ? "jsf.config.webconfig.configinfo.reset.enabled"
- : "jsf.config.webconfig.configinfo.reset.disabled"),
- new Object[]
- {
- contextName,
- alternate.getQualifiedName()
- });
- }
-
- booleanContextParameters.put(alternate, value);
- }
- continue;
- }
-
- if (!param.isDeprecated())
- {
- if (strValue == null)
- {
- value = param.getDefaultValue();
- }
- else
- {
- if (isValueValid(param, strValue))
- {
- value = Boolean.valueOf(strValue);
- }
- else
- {
- value = param.getDefaultValue();
- }
- }
-
- // first param processed should be
- // com.sun.faces.displayConfiguration
- if (BooleanWebContextInitParameter.DisplayConfiguration
- .equals(param)
- && value)
- {
- loggingLevel = Level.INFO;
- }
-
- if (LOGGER.isLoggable(loggingLevel))
- {
- LOGGER
- .log(
- loggingLevel,
- ((value) ? "jsf.config.webconfig.boolconfiginfo.enabled"
- : "jsf.config.webconfig.boolconfiginfo.disabled"),
- new Object[]
- {
- contextName,
- param.getQualifiedName()
- });
- }
-
- booleanContextParameters.put(param, value);
- }
-
- }
-
- }
-
- /**
- * Adds all com.sun.faces init parameter names to a list. This allows
- * callers to determine if a parameter was explicitly set.
- *
- * @param servletContext
- * the ServletContext of interest
- */
- private void initSetList(ServletContext servletContext)
- {
-
- for (Enumeration e = servletContext.getInitParameterNames(); e
- .hasMoreElements();)
- {
- String name = e.nextElement().toString();
- if (name.startsWith("com.sun.faces"))
- {
- setParams.add(name);
- }
- }
-
- }
-
- /**
- * @param name
- * the param name
- * @return <code>true</code> if the name was explicitly specified
- */
- private boolean isSet(String name)
- {
-
- return setParams.contains(name);
-
- }
-
- /**
- * <p>
- * Process all non-boolean context initialization parameters.
- * </p>
- *
- * @param servletContext
- * the ServletContext of interest
- * @param contextName
- * the context name
- */
- private void processInitParameters(ServletContext servletContext,
- String contextName)
- {
-
- for (WebContextInitParameter param : WebContextInitParameter.values())
- {
- String value = servletContext.getInitParameter(param
- .getQualifiedName());
-
- if (value != null && value.length() > 0 && param.isDeprecated())
- {
- WebContextInitParameter alternate = param.getAlternate();
- if (LOGGER.isLoggable(Level.WARNING))
- {
- if (alternate != null)
- {
- LOGGER.log(Level.WARNING,
- "jsf.config.webconfig.param.deprecated",
- new Object[]
- {
- contextName, param.getQualifiedName(),
- alternate.getQualifiedName()
- });
- }
- else
- {
- LOGGER
- .log(
- Level.WARNING,
- "jsf.config.webconfig.param.deprecated.no_replacement",
- new Object[]
- {
- contextName,
- param.getQualifiedName()
- });
- }
- }
-
- if (alternate != null)
- {
- if (LOGGER.isLoggable(Level.INFO))
- {
- LOGGER.log(Level.INFO,
- "jsf.config.webconfig.configinfo.reset",
- new Object[]
- {
- contextName,
- alternate.getQualifiedName(), value
- });
- }
-
- contextParameters.put(alternate, value);
- }
- continue;
- }
-
- if ((value == null || value.length() == 0) && !param.isDeprecated())
- {
- value = param.getDefaultValue();
- }
- if (value == null || value.length() == 0)
- {
- continue;
- }
-
- if (value.length() > 0)
- {
- if (LOGGER.isLoggable(loggingLevel))
- {
- LOGGER.log(loggingLevel, "jsf.config.webconfig.configinfo",
- new Object[]
- {
- contextName, param.getQualifiedName(),
- value
- });
-
- }
- contextParameters.put(param, value);
- }
- else
- {
- if (LOGGER.isLoggable(loggingLevel))
- {
- LOGGER.log(loggingLevel,
- "jsf.config.webconfig.option.notconfigured",
- new Object[]
- {
- contextName, param.getQualifiedName()
- });
- }
- }
-
- }
-
- }
-
- /**
- * <p>
- * Process all JNDI entries.
- * </p>
- *
- * @param contextName
- * the context name
- */
- private void processJndiEntries(String contextName)
- {
-/*
- * This section has been disabled due to incompatibilities with Google App Engine 1.2.6.
- Context initialContext = null;
- try
- {
- initialContext = new InitialContext();
- }
- catch (NamingException ne)
- {
- if (LOGGER.isLoggable(Level.WARNING))
- {
- LOGGER.log(Level.WARNING, ne.toString(), ne);
- }
- }
-
- if (initialContext != null)
- {
- // process environment entries
- for (WebEnvironmentEntry entry : WebEnvironmentEntry.values())
- {
- String entryName = entry.getQualifiedName();
- String value = null;
-
- try
- {
- value = (String) initialContext.lookup(entryName);
- }
- catch (NamingException root)
- {
- if (LOGGER.isLoggable(Level.FINE))
- {
- LOGGER.fine(root.toString());
- }
- }
-
- if (value != null)
- {
- if (LOGGER.isLoggable(Level.INFO))
- {
- // special logic for ClientStateSavingPassword
- if (!entry
- .equals(WebEnvironmentEntry.ClientStateSavingPassword))
- {
- if (LOGGER.isLoggable(loggingLevel))
- {
- LOGGER.log(loggingLevel,
- "jsf.config.webconfig.enventryinfo",
- new Object[]
- {
- contextName, entryName, value
- });
- }
- }
- else
- {
- if (LOGGER.isLoggable(loggingLevel))
- {
- LOGGER
- .log(
- loggingLevel,
- "jsf.config.webconfig.enventry.clientencrypt",
- contextName);
- }
- }
- }
- envEntries.put(entry, value);
- }
- }
- }
-*/
- }
-
- private boolean canProcessJndiEntries()
- {
-
- /*
- * This section has been disabled due to incompatibilities with Google App Engine 1.2.6
- try
- {
- Util.getCurrentLoader(this)
- .loadClass("javax.naming.InitialContext");
- }
- catch (Exception e)
- {
- */
- if (LOGGER.isLoggable(Level.FINE))
- {
- LOGGER
- .fine("javax.naming is forced unavailable. JNDI entries related to Mojarra configuration will not be processed.");
- }
- return false;
- /*
- }
- return true;
- */
-
- }
-
- // ------------------------------------------------------------------- Enums
-
- /**
- * <p>
- * An <code>enum</code> of all non-boolean context initalization parameters
- * recognized by the implementation.
- * </p>
- */
- public enum WebContextInitParameter
- {
-
- // implementation note:
- // if a parameter is to be deprecated,
- // then the <name>Deprecated enum element
- // *must* appear after the one that is taking
- // its place. The reporting logic depends on this
-
- ManagedBeanFactoryDecorator(
- "com.sun.faces.managedBeanFactoryDecoratorClass", ""), StateSavingMethod(
- "javax.faces.STATE_SAVING_METHOD", "server"), FaceletsSuffix(
- ViewHandler.FACELETS_SUFFIX_PARAM_NAME,
- ViewHandler.DEFAULT_FACELETS_SUFFIX), DefaultSuffix(
- ViewHandler.DEFAULT_SUFFIX_PARAM_NAME,
- ViewHandler.DEFAULT_SUFFIX), JavaxFacesConfigFiles(
- "javax.faces.CONFIG_FILES", ""), JavaxFacesProjectStage(
- "javax.faces.PROJECT_STAGE", "Production"), AlternateLifecycleId(
- "javax.faces.LIFECYCLE_ID", ""), ResourceExcludes(
- ResourceHandler.RESOURCE_EXCLUDES_PARAM_NAME,
- ResourceHandler.RESOURCE_EXCLUDES_DEFAULT_VALUE + " .groovy"), NumberOfViews(
- "com.sun.faces.numberOfViewsInSession", "15"), NumberOfViewsDeprecated(
- "com.sun.faces.NUMBER_OF_VIEWS_IN_SESSION", "15", true,
- NumberOfViews), NumberOfLogicalViews(
- "com.sun.faces.numberOfLogicalViews", "15"), NumberOfLogicalViewsDeprecated(
- "com.sun.faces.NUMBER_OF_VIEWS_IN_LOGICAL_VIEW_IN_SESSION",
- "15", true, NumberOfLogicalViews), NumberOfConcurrentFlashUsers(
- "com.sun.faces.numberOfConcerrentFlashUsers", "5000"), NumberOfFlashesBetweenFlashReapings(
- "com.sun.faces.numberOfFlashesBetweenFlashReapings", "5000"), InjectionProviderClass(
- "com.sun.faces.injectionProvider", ""), SerializationProviderClass(
- "com.sun.faces.serializationProvider", ""), ResponseBufferSize(
- "com.sun.faces.responseBufferSize", "1024"), FaceletsBufferSize(
- "javax.faces.FACELETS_BUFFER_SIZE", "1024", true,
- ResponseBufferSize), FaceletsBufferSizeDeprecated(
- "facelets.BUFFER_SIZE", "1024", true, FaceletsBufferSize), ClientStateWriteBufferSize(
- "com.sun.faces.clientStateWriteBufferSize", "8192"), ResourceBufferSize(
- "com.sun.faces.resourceBufferSize", "2048"), ExpressionFactory(
- "com.sun.faces.expressionFactory",
- "com.sun.el.ExpressionFactoryImpl"), ClientStateTimeout(
- "com.sun.faces.clientStateTimeout", ""), DefaultResourceMaxAge(
- "com.sun.faces.defaultResourceMaxAge", "604800"), ResourceUpdateCheckPeriod(
- "com.sun.faces.resourceUpdateCheckPeriod", "5" // in minutes
- ), CompressableMimeTypes("com.sun.faces.compressableMimeTypes", ""), DisableUnicodeEscaping(
- "com.sun.faces.disableUnicodeEscaping", "auto"), FaceletsDefaultRefreshPeriod(
- "javax.faces.FACELETS_REFRESH_PERIOD", "2"), FaceletsDefaultRefreshPeriodDeprecated(
- "facelets.REFRESH_PERIOD", "2", true,
- FaceletsDefaultRefreshPeriod), FaceletsResourceResolver(
- ResourceResolver.FACELETS_RESOURCE_RESOLVER_PARAM_NAME, ""), FaceletsResourceResolverDeprecated(
- "facelets.RESOURCE_RESOLVER", "", true,
- FaceletsResourceResolver), FaceletsViewMappings(
- ViewHandler.FACELETS_VIEW_MAPPINGS_PARAM_NAME, ""), FaceletsViewMappingsDeprecated(
- "facelets.VIEW_MAPPINGS", "", true, FaceletsViewMappings), FaceletsLibraries(
- "javax.faces.FACELETS_LIBRARIES", ""), FaceletsLibrariesDeprecated(
- "facelets.LIBRARIES", "", true, FaceletsLibraries), FaceletsDecorators(
- "javax.faces.FACELETS_DECORATORS", ""), FaceletsDecoratorsDeprecated(
- "facelets.DECORATORS", "", true, FaceletsDecorators), DuplicateJARPattern(
- "com.sun.faces.duplicateJARPattern", ""), ValidateEmptyFields(
- UIInput.VALIDATE_EMPTY_FIELDS_PARAM_NAME, "auto"), FullStateSavingViewIds(
- StateManager.FULL_STATE_SAVING_VIEW_IDS_PARAM_NAME, ""), AnnotationScanPackages(
- "com.sun.faces.annotationScanPackages", ""), FaceletFactory(
- "com.sun.faces.faceletFactory", "");
-
- private String defaultValue;
- private String qualifiedName;
- private WebContextInitParameter alternate;
- private boolean deprecated;
-
- // ---------------------------------------------------------- Public
- // Methods
-
- public String getDefaultValue()
- {
-
- return defaultValue;
-
- }
-
- public String getQualifiedName()
- {
-
- return qualifiedName;
-
- }
-
- // ------------------------------------------------- Package Private
- // Methods
-
- WebContextInitParameter(String qualifiedName, String defaultValue)
- {
-
- this(qualifiedName, defaultValue, false, null);
-
- }
-
- WebContextInitParameter(String qualifiedName, String defaultValue,
- boolean deprecated, WebContextInitParameter alternate)
- {
-
- this.qualifiedName = qualifiedName;
- this.defaultValue = defaultValue;
- this.deprecated = deprecated;
- this.alternate = alternate;
-
- }
-
- // --------------------------------------------------------- Private
- // Methods
-
- private WebContextInitParameter getAlternate()
- {
-
- return alternate;
-
- }
-
- private boolean isDeprecated()
- {
-
- return deprecated;
-
- }
-
- }
-
- /**
- * <p>
- * An <code>enum</code> of all boolean context initalization parameters
- * recognized by the implementation.
- * </p>
- */
- public enum BooleanWebContextInitParameter
- {
-
- // implementation note:
- // if a parameter is to be deprecated,
- // then the <name>Deprecated enum element
- // *must* appear after the one that is taking
- // its place. The reporting logic depends on this
-
- DisplayConfiguration("com.sun.faces.displayConfiguration", false), ValidateFacesConfigFiles(
- "com.sun.faces.validateXml", false), VerifyFacesConfigObjects(
- "com.sun.faces.verifyObjects", false), ForceLoadFacesConfigFiles(
- "com.sun.faces.forceLoadConfiguration", false), DisableArtifactVersioning(
- "com.sun.faces.disableVersionTracking", false, true, null), EnableHtmlTagLibraryValidator(
- "com.sun.faces.enableHtmlTagLibValidator", false), EnableCoreTagLibraryValidator(
- "com.sun.faces.enableCoreTagLibValidator", false), PreferXHTMLContentType(
- "com.sun.faces.preferXHTML", false), PreferXHTMLContextTypeDeprecated(
- "com.sun.faces.PreferXHTML", false, true,
- PreferXHTMLContentType), CompressViewState(
- "com.sun.faces.compressViewState", true), CompressViewStateDeprecated(
- "com.sun.faces.COMPRESS_STATE", true, true, CompressViewState), CompressJavaScript(
- "com.sun.faces.compressJavaScript", true), ExternalizeJavaScriptDeprecated(
- "com.sun.faces.externalizeJavaScript", true, true, null), SendPoweredByHeader(
- "com.sun.faces.sendPoweredByHeader", true), EnableJSStyleHiding(
- "com.sun.faces.enableJSStyleHiding", false), EnableScriptInAttributeValue(
- "com.sun.faces.enableScriptsInAttributeValues", true), WriteStateAtFormEnd(
- "com.sun.faces.writeStateAtFormEnd", true), EnableLazyBeanValidation(
- "com.sun.faces.enableLazyBeanValidation", true), EnableLoadBundle11Compatibility(
- "com.sun.faces.enabledLoadBundle11Compatibility", false), EnableRestoreView11Compatibility(
- "com.sun.faces.enableRestoreView11Compatibility", false), SerializeServerState(
- "com.sun.faces.serializeServerState", false), EnableViewStateIdRendering(
- "com.sun.faces.enableViewStateIdRendering", true), RegisterConverterPropertyEditors(
- "com.sun.faces.registerConverterPropertyEditors", false), EnableGroovyScripting(
- "com.sun.faces.enableGroovyScripting", false), DisableFaceletJSFViewHandler(
- "javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER", false), DisableDefaultBeanValidator(
- BeanValidator.DISABLE_DEFAULT_BEAN_VALIDATOR_PARAM_NAME, false), DateTimeConverterUsesSystemTimezone(
- "javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE",
- false), FaceletsSkipComments(
- "javax.faces.FACELETS_SKIP_COMMENTS", false), FaceletsSkipCommentsDeprecated(
- "facelets.SKIP_COMMENTS", false, true, FaceletsSkipComments), PartialStateSaving(
- StateManager.PARTIAL_STATE_SAVING_PARAM_NAME, true), GenerateUniqueServerStateIds(
- "com.sun.faces.generateUniqueServerStateIds", true), AutoCompleteOffOnViewState(
- "com.sun.faces.autoCompleteOffOnViewState", true), EnableThreading(
- "com.sun.faces.enableThreading", true), AllowTextChildren(
- "com.sun.faces.allowTextChildren", false);
-
- private BooleanWebContextInitParameter alternate;
-
- private String qualifiedName;
- private boolean defaultValue;
- private boolean deprecated;
-
- // ---------------------------------------------------------- Public
- // Methods
-
- public boolean getDefaultValue()
- {
-
- return defaultValue;
-
- }
-
- public String getQualifiedName()
- {
-
- return qualifiedName;
-
- }
-
- // ------------------------------------------------- Package Private
- // Methods
-
- BooleanWebContextInitParameter(String qualifiedName,
- boolean defaultValue)
- {
-
- this(qualifiedName, defaultValue, false, null);
-
- }
-
- BooleanWebContextInitParameter(String qualifiedName,
- boolean defaultValue, boolean deprecated,
- BooleanWebContextInitParameter alternate)
- {
-
- this.qualifiedName = qualifiedName;
- this.defaultValue = defaultValue;
- this.deprecated = deprecated;
- this.alternate = alternate;
-
- }
-
- // --------------------------------------------------------- Private
- // Methods
-
- private BooleanWebContextInitParameter getAlternate()
- {
-
- return alternate;
-
- }
-
- private boolean isDeprecated()
- {
-
- return deprecated;
-
- }
-
- }
-
- /**
- * <p>
- * An <code>enum</code> of all environment entries (specified in the
- * web.xml) recognized by the implemenetation.
- * </p>
- */
- public enum WebEnvironmentEntry
- {
-
- ClientStateSavingPassword("ClientStateSavingPassword"), ProjectStage(
- javax.faces.application.ProjectStage.PROJECT_STAGE_JNDI_NAME);
-
- private static final String JNDI_PREFIX = "java:comp/env/";
- private String qualifiedName;
-
- // ---------------------------------------------------------- Public
- // Methods
-
- public String getQualifiedName()
- {
-
- return qualifiedName;
-
- }
-
- // ------------------------------------------------- Package Private
- // Methods
-
- WebEnvironmentEntry(String qualifiedName)
- {
-
- if (qualifiedName.startsWith(JNDI_PREFIX))
- {
- this.qualifiedName = qualifiedName;
- }
- else
- {
- this.qualifiedName = JNDI_PREFIX + qualifiedName;
- }
-
- }
-
- }
-
- /**
- * <p>
- * An <code>enum</code> of all possible values for the
- * <code>disableUnicodeEscaping</code> configuration parameter.
- * </p>
- */
- public enum DisableUnicodeEscaping
- {
- True("true"), False("false"), Auto("auto");
-
- private final String value;
-
- DisableUnicodeEscaping(String value)
- {
- this.value = value;
- }
-
- public static DisableUnicodeEscaping getByValue(String value)
- {
- for (DisableUnicodeEscaping disableUnicodeEscaping : DisableUnicodeEscaping
- .values())
- {
- if (disableUnicodeEscaping.value.equals(value)) { return disableUnicodeEscaping; }
- }
-
- return null;
- }
- }
-
-} // END WebConfiguration
\ No newline at end of file
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java-gae-jsf-ri/com/sun/faces/config/WebConfiguration.java (from rev 19674, trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java-gae-jsf-ri/com/sun/faces/config/WebConfiguration.java)
===================================================================
--- branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java-gae-jsf-ri/com/sun/faces/config/WebConfiguration.java (rev 0)
+++ branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java-gae-jsf-ri/com/sun/faces/config/WebConfiguration.java 2010-10-27 16:17:45 UTC (rev 19703)
@@ -0,0 +1,1112 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
+ *
+ * The contents of this file are subject to the terms of either the GNU
+ * General Public License Version 2 only ("GPL") or the Common Development
+ * and Distribution License("CDDL") (collectively, the "License"). You
+ * may not use this file except in compliance with the License. You can obtain
+ * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
+ * or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
+ * language governing permissions and limitations under the License.
+ *
+ * When distributing the software, include this License Header Notice in each
+ * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
+ * Sun designates this particular file as subject to the "Classpath" exception
+ * as provided by Sun in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the License
+ * Header, with the fields enclosed by brackets [] replaced by your own
+ * identifying information: "Portions Copyrighted [year]
+ * [name of copyright owner]"
+ *
+ * Contributor(s):
+ *
+ * If you wish your version of this file to be governed by only the CDDL or
+ * only the GPL Version 2, indicate your decision by adding "[Contributor]
+ * elects to include this software in this distribution under the [CDDL or GPL
+ * Version 2] license." If you don't indicate a single choice of license, a
+ * recipient has the option to distribute your version of this file under
+ * either the CDDL, the GPL Version 2 or to extend the choice of license to
+ * its licensees as provided above. However, if you add GPL Version 2 code
+ * and therefore, elected the GPL Version 2 license, then the option applies
+ * only if the new code is made subject to such option by the copyright
+ * holder.
+ */
+
+package com.sun.faces.config;
+
+import java.util.ArrayList;
+import java.util.EnumMap;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import java.util.regex.Pattern;
+
+import javax.faces.application.ResourceHandler;
+import javax.faces.application.StateManager;
+import javax.faces.application.ViewHandler;
+import javax.faces.component.UIInput;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.BeanValidator;
+import javax.faces.view.facelets.ResourceResolver;
+import javax.servlet.ServletContext;
+
+import com.sun.faces.util.FacesLogger;
+import com.sun.faces.util.Util;
+
+/** Class Documentation */
+public class WebConfiguration
+{
+
+ // Log instance for this class
+ private static final Logger LOGGER = FacesLogger.CONFIG.getLogger();
+
+ // A Simple regular expression of allowable boolean values
+ private static final Pattern ALLOWABLE_BOOLEANS = Pattern
+ .compile("true|false");
+
+ // Key under which we store our WebConfiguration instance.
+ private static final String WEB_CONFIG_KEY = "com.sun.faces.config.WebConfiguration";
+
+ // Logging level. Defaults to FINE
+ private Level loggingLevel = Level.FINE;
+
+ private Map<BooleanWebContextInitParameter, Boolean> booleanContextParameters = new EnumMap<BooleanWebContextInitParameter, Boolean>(
+ BooleanWebContextInitParameter.class);
+
+ private Map<WebContextInitParameter, String> contextParameters = new EnumMap<WebContextInitParameter, String>(
+ WebContextInitParameter.class);
+
+ private Map<WebEnvironmentEntry, String> envEntries = new EnumMap<WebEnvironmentEntry, String>(
+ WebEnvironmentEntry.class);
+
+ private Map<WebContextInitParameter, String[]> cachedListParams;
+
+ private List<String> setParams = new ArrayList<String>();
+
+ private ServletContext servletContext;
+
+ // ------------------------------------------------------------ Constructors
+
+ private WebConfiguration(ServletContext servletContext)
+ {
+
+ this.servletContext = servletContext;
+
+ String contextName = getServletContextName();
+
+ initSetList(servletContext);
+ processBooleanParameters(servletContext, contextName);
+ processInitParameters(servletContext, contextName);
+ if (canProcessJndiEntries())
+ {
+ processJndiEntries(contextName);
+ }
+
+ // build the cache of list type params
+ cachedListParams = new HashMap<WebContextInitParameter, String[]>(3);
+ getOptionValue(WebContextInitParameter.ResourceExcludes, " ");
+ getOptionValue(WebContextInitParameter.DefaultSuffix, " ");
+ getOptionValue(WebContextInitParameter.FaceletsViewMappings, ";");
+
+ }
+
+ // ---------------------------------------------------------- Public Methods
+
+ /**
+ * Return the WebConfiguration instance for this application passing the
+ * result of FacesContext.getCurrentInstance().getExternalContext() to
+ * {@link ${symbol_pound}getInstance(javax.faces.context.ExternalContext)}.
+ *
+ * @return the WebConfiguration for this application or <code>null</code> if
+ * no FacesContext is available.
+ */
+ public static WebConfiguration getInstance()
+ {
+
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ return getInstance(facesContext.getExternalContext());
+
+ }
+
+ /**
+ * Return the WebConfiguration instance for this application.
+ *
+ * @param extContext
+ * the ExternalContext for this request
+ * @return the WebConfiguration for this application
+ */
+ public static WebConfiguration getInstance(ExternalContext extContext)
+ {
+
+ WebConfiguration config = (WebConfiguration) extContext
+ .getApplicationMap().get(WEB_CONFIG_KEY);
+ if (config == null)
+ {
+ return getInstance((ServletContext) extContext.getContext());
+ }
+ else
+ {
+ return config;
+ }
+
+ }
+
+ /**
+ * Return the WebConfiguration instance for this application.
+ *
+ * @param servletContext
+ * the ServletContext
+ * @return the WebConfiguration for this application or <code>null</code> if
+ * no WebConfiguration could be located
+ */
+ public static WebConfiguration getInstance(ServletContext servletContext)
+ {
+
+ WebConfiguration webConfig = (WebConfiguration) servletContext
+ .getAttribute(WEB_CONFIG_KEY);
+
+ if (webConfig == null)
+ {
+ webConfig = new WebConfiguration(servletContext);
+ servletContext.setAttribute(WEB_CONFIG_KEY, webConfig);
+ }
+ return webConfig;
+
+ }
+
+ /**
+ * @return The <code>ServletContext</code> originally used to construct this
+ * WebConfiguration instance
+ */
+ public ServletContext getServletContext()
+ {
+
+ return servletContext;
+
+ }
+
+ /**
+ * Obtain the value of the specified boolean parameter
+ *
+ * @param param
+ * the parameter of interest
+ * @return the value of the specified boolean parameter
+ */
+ public boolean isOptionEnabled(BooleanWebContextInitParameter param)
+ {
+
+ if (booleanContextParameters.get(param) != null)
+ {
+ return booleanContextParameters.get(param);
+ }
+ else
+ {
+ return param.getDefaultValue();
+ }
+
+ }
+
+ /**
+ * Obtain the value of the specified parameter
+ *
+ * @param param
+ * the parameter of interest
+ * @return the value of the specified parameter
+ */
+ public String getOptionValue(WebContextInitParameter param)
+ {
+ String result = contextParameters.get(param);
+
+ if (null == result)
+ {
+ WebContextInitParameter alternate = param.getAlternate();
+ if (null != alternate)
+ {
+ result = contextParameters.get(alternate);
+ }
+ }
+
+ return result;
+
+ }
+
+ public String[] getOptionValue(WebContextInitParameter param, String sep)
+ {
+ String[] result;
+
+ assert (null != cachedListParams);
+ if (null == (result = cachedListParams.get(param)))
+ {
+ String value = getOptionValue(param);
+ if (null == value)
+ {
+ result = new String[0];
+ }
+ else
+ {
+ result = Util.split(value, sep);
+ }
+ cachedListParams.put(param, result);
+ }
+
+ return result;
+ }
+
+ /**
+ * Obtain the value of the specified env-entry
+ *
+ * @param entry
+ * the env-entry of interest
+ * @return the value of the specified env-entry
+ */
+ public String getEnvironmentEntry(WebEnvironmentEntry entry)
+ {
+
+ return envEntries.get(entry);
+
+ }
+
+ /**
+ * @param param
+ * the init parameter of interest
+ * @return <code>true</code> if the parameter was explicitly set, otherwise,
+ * <code>false</code>
+ */
+ public boolean isSet(WebContextInitParameter param)
+ {
+
+ return isSet(param.getQualifiedName());
+
+ }
+
+ /**
+ * @param param
+ * the init parameter of interest
+ * @return <code>true</code> if the parameter was explicitly set, otherwise,
+ * <code>false</code>
+ */
+ public boolean isSet(BooleanWebContextInitParameter param)
+ {
+
+ return isSet(param.getQualifiedName());
+
+ }
+
+ /**
+ * @return the name of this application
+ */
+ public String getServletContextName()
+ {
+
+ if (servletContext.getMajorVersion() == 2
+ && servletContext.getMinorVersion() <= 4)
+ {
+ return servletContext.getServletContextName();
+ }
+ else
+ {
+ return servletContext.getContextPath();
+ }
+
+ }
+
+ public void overrideContextInitParameter(
+ BooleanWebContextInitParameter param, boolean value)
+ {
+
+ if (param == null) { return; }
+ boolean oldVal = booleanContextParameters.put(param, value);
+ if (LOGGER.isLoggable(Level.FINE) && oldVal != value)
+ {
+ LOGGER
+ .log(
+ Level.FINE,
+ "Overriding init parameter {0}. Changing from {1} to {2}.",
+ new Object[]
+ {
+ param.getQualifiedName(), oldVal, value
+ });
+ }
+
+ }
+
+ public void overrideContextInitParameter(WebContextInitParameter param,
+ String value)
+ {
+
+ if (param == null || value == null || value.length() == 0) { return; }
+ value = value.trim();
+ String oldVal = contextParameters.put(param, value);
+ cachedListParams.remove(param);
+ if (oldVal != null)
+ {
+ if (LOGGER.isLoggable(Level.FINE) && !(oldVal.equals(value)))
+ {
+ LOGGER
+ .log(
+ Level.FINE,
+ "Overriding init parameter {0}. Changing from {1} to {2}.",
+ new Object[]
+ {
+ param.getQualifiedName(), oldVal, value
+ });
+ }
+ }
+
+ }
+
+ // ------------------------------------------------- Package Private Methods
+
+ static void clear(ServletContext servletContext)
+ {
+
+ servletContext.removeAttribute(WEB_CONFIG_KEY);
+
+ }
+
+ // --------------------------------------------------------- Private Methods
+
+ /**
+ * <p>
+ * Is the configured value valid against the default boolean pattern.
+ * </p>
+ *
+ * @param param
+ * the boolean parameter
+ * @param value
+ * the configured value
+ * @return <code>true</code> if the value is valid, otherwise
+ * <code>false</code>
+ */
+ private boolean isValueValid(BooleanWebContextInitParameter param,
+ String value)
+ {
+
+ if (!ALLOWABLE_BOOLEANS.matcher(value).matches())
+ {
+ if (LOGGER.isLoggable(Level.WARNING))
+ {
+ LOGGER.log(Level.WARNING,
+ "jsf.config.webconfig.boolconfig.invalidvalue",
+ new Object[]
+ {
+ value, param.getQualifiedName(), "true|false"
+ });
+ }
+ return false;
+ }
+
+ return true;
+
+ }
+
+ /**
+ * <p>
+ * Process all boolean context initialization parameters.
+ * </p>
+ *
+ * @param servletContext
+ * the ServletContext of interest
+ * @param contextName
+ * the context name
+ */
+ private void processBooleanParameters(ServletContext servletContext,
+ String contextName)
+ {
+
+ // process boolean contxt parameters
+ for (BooleanWebContextInitParameter param : BooleanWebContextInitParameter
+ .values())
+ {
+ String strValue = servletContext.getInitParameter(param
+ .getQualifiedName());
+ boolean value;
+
+ if (strValue != null && strValue.length() > 0
+ && param.isDeprecated())
+ {
+ BooleanWebContextInitParameter alternate = param.getAlternate();
+ if (LOGGER.isLoggable(Level.WARNING))
+ {
+ if (alternate != null)
+ {
+ LOGGER.log(Level.WARNING,
+ "jsf.config.webconfig.param.deprecated",
+ new Object[]
+ {
+ contextName, param.getQualifiedName(),
+ alternate.getQualifiedName()
+ });
+ }
+ else
+ {
+ LOGGER
+ .log(
+ Level.WARNING,
+ "jsf.config.webconfig.param.deprecated.no_replacement",
+ new Object[]
+ {
+ contextName,
+ param.getQualifiedName()
+ });
+ }
+ }
+
+ if (alternate != null)
+ {
+ if (isValueValid(param, strValue))
+ {
+ value = Boolean.valueOf(strValue);
+ }
+ else
+ {
+ value = param.getDefaultValue();
+ }
+
+ if (LOGGER.isLoggable(Level.INFO) && alternate != null)
+ {
+ LOGGER
+ .log(
+ Level.INFO,
+ ((value) ? "jsf.config.webconfig.configinfo.reset.enabled"
+ : "jsf.config.webconfig.configinfo.reset.disabled"),
+ new Object[]
+ {
+ contextName,
+ alternate.getQualifiedName()
+ });
+ }
+
+ booleanContextParameters.put(alternate, value);
+ }
+ continue;
+ }
+
+ if (!param.isDeprecated())
+ {
+ if (strValue == null)
+ {
+ value = param.getDefaultValue();
+ }
+ else
+ {
+ if (isValueValid(param, strValue))
+ {
+ value = Boolean.valueOf(strValue);
+ }
+ else
+ {
+ value = param.getDefaultValue();
+ }
+ }
+
+ // first param processed should be
+ // com.sun.faces.displayConfiguration
+ if (BooleanWebContextInitParameter.DisplayConfiguration
+ .equals(param)
+ && value)
+ {
+ loggingLevel = Level.INFO;
+ }
+
+ if (LOGGER.isLoggable(loggingLevel))
+ {
+ LOGGER
+ .log(
+ loggingLevel,
+ ((value) ? "jsf.config.webconfig.boolconfiginfo.enabled"
+ : "jsf.config.webconfig.boolconfiginfo.disabled"),
+ new Object[]
+ {
+ contextName,
+ param.getQualifiedName()
+ });
+ }
+
+ booleanContextParameters.put(param, value);
+ }
+
+ }
+
+ }
+
+ /**
+ * Adds all com.sun.faces init parameter names to a list. This allows
+ * callers to determine if a parameter was explicitly set.
+ *
+ * @param servletContext
+ * the ServletContext of interest
+ */
+ private void initSetList(ServletContext servletContext)
+ {
+
+ for (Enumeration e = servletContext.getInitParameterNames(); e
+ .hasMoreElements();)
+ {
+ String name = e.nextElement().toString();
+ if (name.startsWith("com.sun.faces"))
+ {
+ setParams.add(name);
+ }
+ }
+
+ }
+
+ /**
+ * @param name
+ * the param name
+ * @return <code>true</code> if the name was explicitly specified
+ */
+ private boolean isSet(String name)
+ {
+
+ return setParams.contains(name);
+
+ }
+
+ /**
+ * <p>
+ * Process all non-boolean context initialization parameters.
+ * </p>
+ *
+ * @param servletContext
+ * the ServletContext of interest
+ * @param contextName
+ * the context name
+ */
+ private void processInitParameters(ServletContext servletContext,
+ String contextName)
+ {
+
+ for (WebContextInitParameter param : WebContextInitParameter.values())
+ {
+ String value = servletContext.getInitParameter(param
+ .getQualifiedName());
+
+ if (value != null && value.length() > 0 && param.isDeprecated())
+ {
+ WebContextInitParameter alternate = param.getAlternate();
+ if (LOGGER.isLoggable(Level.WARNING))
+ {
+ if (alternate != null)
+ {
+ LOGGER.log(Level.WARNING,
+ "jsf.config.webconfig.param.deprecated",
+ new Object[]
+ {
+ contextName, param.getQualifiedName(),
+ alternate.getQualifiedName()
+ });
+ }
+ else
+ {
+ LOGGER
+ .log(
+ Level.WARNING,
+ "jsf.config.webconfig.param.deprecated.no_replacement",
+ new Object[]
+ {
+ contextName,
+ param.getQualifiedName()
+ });
+ }
+ }
+
+ if (alternate != null)
+ {
+ if (LOGGER.isLoggable(Level.INFO))
+ {
+ LOGGER.log(Level.INFO,
+ "jsf.config.webconfig.configinfo.reset",
+ new Object[]
+ {
+ contextName,
+ alternate.getQualifiedName(), value
+ });
+ }
+
+ contextParameters.put(alternate, value);
+ }
+ continue;
+ }
+
+ if ((value == null || value.length() == 0) && !param.isDeprecated())
+ {
+ value = param.getDefaultValue();
+ }
+ if (value == null || value.length() == 0)
+ {
+ continue;
+ }
+
+ if (value.length() > 0)
+ {
+ if (LOGGER.isLoggable(loggingLevel))
+ {
+ LOGGER.log(loggingLevel, "jsf.config.webconfig.configinfo",
+ new Object[]
+ {
+ contextName, param.getQualifiedName(),
+ value
+ });
+
+ }
+ contextParameters.put(param, value);
+ }
+ else
+ {
+ if (LOGGER.isLoggable(loggingLevel))
+ {
+ LOGGER.log(loggingLevel,
+ "jsf.config.webconfig.option.notconfigured",
+ new Object[]
+ {
+ contextName, param.getQualifiedName()
+ });
+ }
+ }
+
+ }
+
+ }
+
+ /**
+ * <p>
+ * Process all JNDI entries.
+ * </p>
+ *
+ * @param contextName
+ * the context name
+ */
+ private void processJndiEntries(String contextName)
+ {
+/*
+ * This section has been disabled due to incompatibilities with Google App Engine 1.2.6.
+ Context initialContext = null;
+ try
+ {
+ initialContext = new InitialContext();
+ }
+ catch (NamingException ne)
+ {
+ if (LOGGER.isLoggable(Level.WARNING))
+ {
+ LOGGER.log(Level.WARNING, ne.toString(), ne);
+ }
+ }
+
+ if (initialContext != null)
+ {
+ // process environment entries
+ for (WebEnvironmentEntry entry : WebEnvironmentEntry.values())
+ {
+ String entryName = entry.getQualifiedName();
+ String value = null;
+
+ try
+ {
+ value = (String) initialContext.lookup(entryName);
+ }
+ catch (NamingException root)
+ {
+ if (LOGGER.isLoggable(Level.FINE))
+ {
+ LOGGER.fine(root.toString());
+ }
+ }
+
+ if (value != null)
+ {
+ if (LOGGER.isLoggable(Level.INFO))
+ {
+ // special logic for ClientStateSavingPassword
+ if (!entry
+ .equals(WebEnvironmentEntry.ClientStateSavingPassword))
+ {
+ if (LOGGER.isLoggable(loggingLevel))
+ {
+ LOGGER.log(loggingLevel,
+ "jsf.config.webconfig.enventryinfo",
+ new Object[]
+ {
+ contextName, entryName, value
+ });
+ }
+ }
+ else
+ {
+ if (LOGGER.isLoggable(loggingLevel))
+ {
+ LOGGER
+ .log(
+ loggingLevel,
+ "jsf.config.webconfig.enventry.clientencrypt",
+ contextName);
+ }
+ }
+ }
+ envEntries.put(entry, value);
+ }
+ }
+ }
+*/
+ }
+
+ private boolean canProcessJndiEntries()
+ {
+
+ /*
+ * This section has been disabled due to incompatibilities with Google App Engine 1.2.6
+ try
+ {
+ Util.getCurrentLoader(this)
+ .loadClass("javax.naming.InitialContext");
+ }
+ catch (Exception e)
+ {
+ */
+ if (LOGGER.isLoggable(Level.FINE))
+ {
+ LOGGER
+ .fine("javax.naming is forced unavailable. JNDI entries related to Mojarra configuration will not be processed.");
+ }
+ return false;
+ /*
+ }
+ return true;
+ */
+
+ }
+
+ // ------------------------------------------------------------------- Enums
+
+ /**
+ * <p>
+ * An <code>enum</code> of all non-boolean context initalization parameters
+ * recognized by the implementation.
+ * </p>
+ */
+ public enum WebContextInitParameter
+ {
+
+ // implementation note:
+ // if a parameter is to be deprecated,
+ // then the <name>Deprecated enum element
+ // *must* appear after the one that is taking
+ // its place. The reporting logic depends on this
+
+ ManagedBeanFactoryDecorator(
+ "com.sun.faces.managedBeanFactoryDecoratorClass", ""), StateSavingMethod(
+ "javax.faces.STATE_SAVING_METHOD", "server"), FaceletsSuffix(
+ ViewHandler.FACELETS_SUFFIX_PARAM_NAME,
+ ViewHandler.DEFAULT_FACELETS_SUFFIX), DefaultSuffix(
+ ViewHandler.DEFAULT_SUFFIX_PARAM_NAME,
+ ViewHandler.DEFAULT_SUFFIX), JavaxFacesConfigFiles(
+ "javax.faces.CONFIG_FILES", ""), JavaxFacesProjectStage(
+ "javax.faces.PROJECT_STAGE", "Production"), AlternateLifecycleId(
+ "javax.faces.LIFECYCLE_ID", ""), ResourceExcludes(
+ ResourceHandler.RESOURCE_EXCLUDES_PARAM_NAME,
+ ResourceHandler.RESOURCE_EXCLUDES_DEFAULT_VALUE + " .groovy"), NumberOfViews(
+ "com.sun.faces.numberOfViewsInSession", "15"), NumberOfViewsDeprecated(
+ "com.sun.faces.NUMBER_OF_VIEWS_IN_SESSION", "15", true,
+ NumberOfViews), NumberOfLogicalViews(
+ "com.sun.faces.numberOfLogicalViews", "15"), NumberOfLogicalViewsDeprecated(
+ "com.sun.faces.NUMBER_OF_VIEWS_IN_LOGICAL_VIEW_IN_SESSION",
+ "15", true, NumberOfLogicalViews), NumberOfConcurrentFlashUsers(
+ "com.sun.faces.numberOfConcerrentFlashUsers", "5000"), NumberOfFlashesBetweenFlashReapings(
+ "com.sun.faces.numberOfFlashesBetweenFlashReapings", "5000"), InjectionProviderClass(
+ "com.sun.faces.injectionProvider", ""), SerializationProviderClass(
+ "com.sun.faces.serializationProvider", ""), ResponseBufferSize(
+ "com.sun.faces.responseBufferSize", "1024"), FaceletsBufferSize(
+ "javax.faces.FACELETS_BUFFER_SIZE", "1024", true,
+ ResponseBufferSize), FaceletsBufferSizeDeprecated(
+ "facelets.BUFFER_SIZE", "1024", true, FaceletsBufferSize), ClientStateWriteBufferSize(
+ "com.sun.faces.clientStateWriteBufferSize", "8192"), ResourceBufferSize(
+ "com.sun.faces.resourceBufferSize", "2048"), ExpressionFactory(
+ "com.sun.faces.expressionFactory",
+ "com.sun.el.ExpressionFactoryImpl"), ClientStateTimeout(
+ "com.sun.faces.clientStateTimeout", ""), DefaultResourceMaxAge(
+ "com.sun.faces.defaultResourceMaxAge", "604800"), ResourceUpdateCheckPeriod(
+ "com.sun.faces.resourceUpdateCheckPeriod", "5" // in minutes
+ ), CompressableMimeTypes("com.sun.faces.compressableMimeTypes", ""), DisableUnicodeEscaping(
+ "com.sun.faces.disableUnicodeEscaping", "auto"), FaceletsDefaultRefreshPeriod(
+ "javax.faces.FACELETS_REFRESH_PERIOD", "2"), FaceletsDefaultRefreshPeriodDeprecated(
+ "facelets.REFRESH_PERIOD", "2", true,
+ FaceletsDefaultRefreshPeriod), FaceletsResourceResolver(
+ ResourceResolver.FACELETS_RESOURCE_RESOLVER_PARAM_NAME, ""), FaceletsResourceResolverDeprecated(
+ "facelets.RESOURCE_RESOLVER", "", true,
+ FaceletsResourceResolver), FaceletsViewMappings(
+ ViewHandler.FACELETS_VIEW_MAPPINGS_PARAM_NAME, ""), FaceletsViewMappingsDeprecated(
+ "facelets.VIEW_MAPPINGS", "", true, FaceletsViewMappings), FaceletsLibraries(
+ "javax.faces.FACELETS_LIBRARIES", ""), FaceletsLibrariesDeprecated(
+ "facelets.LIBRARIES", "", true, FaceletsLibraries), FaceletsDecorators(
+ "javax.faces.FACELETS_DECORATORS", ""), FaceletsDecoratorsDeprecated(
+ "facelets.DECORATORS", "", true, FaceletsDecorators), DuplicateJARPattern(
+ "com.sun.faces.duplicateJARPattern", ""), ValidateEmptyFields(
+ UIInput.VALIDATE_EMPTY_FIELDS_PARAM_NAME, "auto"), FullStateSavingViewIds(
+ StateManager.FULL_STATE_SAVING_VIEW_IDS_PARAM_NAME, ""), AnnotationScanPackages(
+ "com.sun.faces.annotationScanPackages", ""), FaceletFactory(
+ "com.sun.faces.faceletFactory", "");
+
+ private String defaultValue;
+ private String qualifiedName;
+ private WebContextInitParameter alternate;
+ private boolean deprecated;
+
+ // ---------------------------------------------------------- Public
+ // Methods
+
+ public String getDefaultValue()
+ {
+
+ return defaultValue;
+
+ }
+
+ public String getQualifiedName()
+ {
+
+ return qualifiedName;
+
+ }
+
+ // ------------------------------------------------- Package Private
+ // Methods
+
+ WebContextInitParameter(String qualifiedName, String defaultValue)
+ {
+
+ this(qualifiedName, defaultValue, false, null);
+
+ }
+
+ WebContextInitParameter(String qualifiedName, String defaultValue,
+ boolean deprecated, WebContextInitParameter alternate)
+ {
+
+ this.qualifiedName = qualifiedName;
+ this.defaultValue = defaultValue;
+ this.deprecated = deprecated;
+ this.alternate = alternate;
+
+ }
+
+ // --------------------------------------------------------- Private
+ // Methods
+
+ private WebContextInitParameter getAlternate()
+ {
+
+ return alternate;
+
+ }
+
+ private boolean isDeprecated()
+ {
+
+ return deprecated;
+
+ }
+
+ }
+
+ /**
+ * <p>
+ * An <code>enum</code> of all boolean context initalization parameters
+ * recognized by the implementation.
+ * </p>
+ */
+ public enum BooleanWebContextInitParameter
+ {
+
+ // implementation note:
+ // if a parameter is to be deprecated,
+ // then the <name>Deprecated enum element
+ // *must* appear after the one that is taking
+ // its place. The reporting logic depends on this
+
+ DisplayConfiguration("com.sun.faces.displayConfiguration", false), ValidateFacesConfigFiles(
+ "com.sun.faces.validateXml", false), VerifyFacesConfigObjects(
+ "com.sun.faces.verifyObjects", false), ForceLoadFacesConfigFiles(
+ "com.sun.faces.forceLoadConfiguration", false), DisableArtifactVersioning(
+ "com.sun.faces.disableVersionTracking", false, true, null), EnableHtmlTagLibraryValidator(
+ "com.sun.faces.enableHtmlTagLibValidator", false), EnableCoreTagLibraryValidator(
+ "com.sun.faces.enableCoreTagLibValidator", false), PreferXHTMLContentType(
+ "com.sun.faces.preferXHTML", false), PreferXHTMLContextTypeDeprecated(
+ "com.sun.faces.PreferXHTML", false, true,
+ PreferXHTMLContentType), CompressViewState(
+ "com.sun.faces.compressViewState", true), CompressViewStateDeprecated(
+ "com.sun.faces.COMPRESS_STATE", true, true, CompressViewState), CompressJavaScript(
+ "com.sun.faces.compressJavaScript", true), ExternalizeJavaScriptDeprecated(
+ "com.sun.faces.externalizeJavaScript", true, true, null), SendPoweredByHeader(
+ "com.sun.faces.sendPoweredByHeader", true), EnableJSStyleHiding(
+ "com.sun.faces.enableJSStyleHiding", false), EnableScriptInAttributeValue(
+ "com.sun.faces.enableScriptsInAttributeValues", true), WriteStateAtFormEnd(
+ "com.sun.faces.writeStateAtFormEnd", true), EnableLazyBeanValidation(
+ "com.sun.faces.enableLazyBeanValidation", true), EnableLoadBundle11Compatibility(
+ "com.sun.faces.enabledLoadBundle11Compatibility", false), EnableRestoreView11Compatibility(
+ "com.sun.faces.enableRestoreView11Compatibility", false), SerializeServerState(
+ "com.sun.faces.serializeServerState", false), EnableViewStateIdRendering(
+ "com.sun.faces.enableViewStateIdRendering", true), RegisterConverterPropertyEditors(
+ "com.sun.faces.registerConverterPropertyEditors", false), EnableGroovyScripting(
+ "com.sun.faces.enableGroovyScripting", false), DisableFaceletJSFViewHandler(
+ "javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER", false), DisableDefaultBeanValidator(
+ BeanValidator.DISABLE_DEFAULT_BEAN_VALIDATOR_PARAM_NAME, false), DateTimeConverterUsesSystemTimezone(
+ "javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE",
+ false), FaceletsSkipComments(
+ "javax.faces.FACELETS_SKIP_COMMENTS", false), FaceletsSkipCommentsDeprecated(
+ "facelets.SKIP_COMMENTS", false, true, FaceletsSkipComments), PartialStateSaving(
+ StateManager.PARTIAL_STATE_SAVING_PARAM_NAME, true), GenerateUniqueServerStateIds(
+ "com.sun.faces.generateUniqueServerStateIds", true), AutoCompleteOffOnViewState(
+ "com.sun.faces.autoCompleteOffOnViewState", true), EnableThreading(
+ "com.sun.faces.enableThreading", true), AllowTextChildren(
+ "com.sun.faces.allowTextChildren", false);
+
+ private BooleanWebContextInitParameter alternate;
+
+ private String qualifiedName;
+ private boolean defaultValue;
+ private boolean deprecated;
+
+ // ---------------------------------------------------------- Public
+ // Methods
+
+ public boolean getDefaultValue()
+ {
+
+ return defaultValue;
+
+ }
+
+ public String getQualifiedName()
+ {
+
+ return qualifiedName;
+
+ }
+
+ // ------------------------------------------------- Package Private
+ // Methods
+
+ BooleanWebContextInitParameter(String qualifiedName,
+ boolean defaultValue)
+ {
+
+ this(qualifiedName, defaultValue, false, null);
+
+ }
+
+ BooleanWebContextInitParameter(String qualifiedName,
+ boolean defaultValue, boolean deprecated,
+ BooleanWebContextInitParameter alternate)
+ {
+
+ this.qualifiedName = qualifiedName;
+ this.defaultValue = defaultValue;
+ this.deprecated = deprecated;
+ this.alternate = alternate;
+
+ }
+
+ // --------------------------------------------------------- Private
+ // Methods
+
+ private BooleanWebContextInitParameter getAlternate()
+ {
+
+ return alternate;
+
+ }
+
+ private boolean isDeprecated()
+ {
+
+ return deprecated;
+
+ }
+
+ }
+
+ /**
+ * <p>
+ * An <code>enum</code> of all environment entries (specified in the
+ * web.xml) recognized by the implemenetation.
+ * </p>
+ */
+ public enum WebEnvironmentEntry
+ {
+
+ ClientStateSavingPassword("ClientStateSavingPassword"), ProjectStage(
+ javax.faces.application.ProjectStage.PROJECT_STAGE_JNDI_NAME);
+
+ private static final String JNDI_PREFIX = "java:comp/env/";
+ private String qualifiedName;
+
+ // ---------------------------------------------------------- Public
+ // Methods
+
+ public String getQualifiedName()
+ {
+
+ return qualifiedName;
+
+ }
+
+ // ------------------------------------------------- Package Private
+ // Methods
+
+ WebEnvironmentEntry(String qualifiedName)
+ {
+
+ if (qualifiedName.startsWith(JNDI_PREFIX))
+ {
+ this.qualifiedName = qualifiedName;
+ }
+ else
+ {
+ this.qualifiedName = JNDI_PREFIX + qualifiedName;
+ }
+
+ }
+
+ }
+
+ /**
+ * <p>
+ * An <code>enum</code> of all possible values for the
+ * <code>disableUnicodeEscaping</code> configuration parameter.
+ * </p>
+ */
+ public enum DisableUnicodeEscaping
+ {
+ True("true"), False("false"), Auto("auto");
+
+ private final String value;
+
+ DisableUnicodeEscaping(String value)
+ {
+ this.value = value;
+ }
+
+ public static DisableUnicodeEscaping getByValue(String value)
+ {
+ for (DisableUnicodeEscaping disableUnicodeEscaping : DisableUnicodeEscaping
+ .values())
+ {
+ if (disableUnicodeEscaping.value.equals(value)) { return disableUnicodeEscaping; }
+ }
+
+ return null;
+ }
+ }
+
+} // END WebConfiguration
\ No newline at end of file
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/resources (from rev 19674, trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/resources)
Deleted: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/resources/logging.properties
===================================================================
--- trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/resources/logging.properties 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/resources/logging.properties 2010-10-27 16:17:45 UTC (rev 19703)
@@ -1,31 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-${symbol_pound} A default java.util.logging configuration.
-${symbol_pound} (All App Engine logging is through java.util.logging by default).
-${symbol_pound}
-${symbol_pound} To use this configuration, copy it into your application's WEB-INF
-${symbol_pound} folder and add the following to your appengine-web.xml:
-${symbol_pound}
-${symbol_pound} <system-properties>
-${symbol_pound} <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
-${symbol_pound} </system-properties>
-${symbol_pound}
-
-${symbol_pound} Set the default logging level for all loggers to WARNING
-.level = WARNING
-
-${symbol_pound} Set the default logging level for ORM, specifically, to WARNING
-DataNucleus.JDO.level=WARNING
-DataNucleus.Persistence.level=WARNING
-DataNucleus.Cache.level=WARNING
-DataNucleus.MetaData.level=WARNING
-DataNucleus.General.level=WARNING
-DataNucleus.Utility.level=WARNING
-DataNucleus.Transaction.level=WARNING
-DataNucleus.Datastore.level=WARNING
-DataNucleus.ClassLoading.level=WARNING
-DataNucleus.Plugin.level=WARNING
-DataNucleus.ValueGeneration.level=WARNING
-DataNucleus.Enhancer.level=WARNING
-DataNucleus.SchemaTool.level=WARNING
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/resources/logging.properties (from rev 19674, trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/resources/logging.properties)
===================================================================
--- branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/resources/logging.properties (rev 0)
+++ branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/resources/logging.properties 2010-10-27 16:17:45 UTC (rev 19703)
@@ -0,0 +1,31 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+${symbol_pound} A default java.util.logging configuration.
+${symbol_pound} (All App Engine logging is through java.util.logging by default).
+${symbol_pound}
+${symbol_pound} To use this configuration, copy it into your application's WEB-INF
+${symbol_pound} folder and add the following to your appengine-web.xml:
+${symbol_pound}
+${symbol_pound} <system-properties>
+${symbol_pound} <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
+${symbol_pound} </system-properties>
+${symbol_pound}
+
+${symbol_pound} Set the default logging level for all loggers to WARNING
+.level = WARNING
+
+${symbol_pound} Set the default logging level for ORM, specifically, to WARNING
+DataNucleus.JDO.level=WARNING
+DataNucleus.Persistence.level=WARNING
+DataNucleus.Cache.level=WARNING
+DataNucleus.MetaData.level=WARNING
+DataNucleus.General.level=WARNING
+DataNucleus.Utility.level=WARNING
+DataNucleus.Transaction.level=WARNING
+DataNucleus.Datastore.level=WARNING
+DataNucleus.ClassLoading.level=WARNING
+DataNucleus.Plugin.level=WARNING
+DataNucleus.ValueGeneration.level=WARNING
+DataNucleus.Enhancer.level=WARNING
+DataNucleus.SchemaTool.level=WARNING
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp (from rev 19674, trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp)
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF (from rev 19674, trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF)
Deleted: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia
===================================================================
--- trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia 2010-10-27 16:17:45 UTC (rev 19703)
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<PROCESS model-entity="JSFProcess"/>
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia (from rev 19674, trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia)
===================================================================
--- branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia (rev 0)
+++ branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia 2010-10-27 16:17:45 UTC (rev 19703)
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PROCESS model-entity="JSFProcess"/>
Deleted: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml 2010-10-27 16:17:45 UTC (rev 19703)
@@ -1,13 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-<?xml version="1.0"?>
-<faces-config version="2.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xi="http://www.w3.org/2001/XInclude"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
-
- <managed-bean>
- <managed-bean-name>richBean</managed-bean-name>
- <managed-bean-class>${package}.RichBean</managed-bean-class>
- <managed-bean-scope>view</managed-bean-scope>
- </managed-bean>
-</faces-config>
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml (from rev 19674, trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml)
===================================================================
--- branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml (rev 0)
+++ branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml 2010-10-27 16:17:45 UTC (rev 19703)
@@ -0,0 +1,13 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<?xml version="1.0"?>
+<faces-config version="2.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xi="http://www.w3.org/2001/XInclude"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
+
+ <managed-bean>
+ <managed-bean-name>richBean</managed-bean-name>
+ <managed-bean-class>${package}.RichBean</managed-bean-class>
+ <managed-bean-scope>view</managed-bean-scope>
+ </managed-bean>
+</faces-config>
Deleted: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jboss-scanning.xml
===================================================================
--- trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jboss-scanning.xml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jboss-scanning.xml 2010-10-27 16:17:45 UTC (rev 19703)
@@ -1,14 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-<scanning xmlns="urn:jboss:scanning:1.0">
-<!--
- For JBoss AS 6 integration there is a conflict with guava, and
- google-collections. JBAS-8361
--->
- <path name="WEB-INF/classes"></path>
-
- <path name="WEB-INF/lib/guava-r05.jar">
- <exclude name="com.google.common.collect" />
- </path>
-</scanning>
\ No newline at end of file
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jboss-scanning.xml (from rev 19674, trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jboss-scanning.xml)
===================================================================
--- branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jboss-scanning.xml (rev 0)
+++ branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jboss-scanning.xml 2010-10-27 16:17:45 UTC (rev 19703)
@@ -0,0 +1,14 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<scanning xmlns="urn:jboss:scanning:1.0">
+<!--
+ For JBoss AS 6 integration there is a conflict with guava, and
+ google-collections. JBAS-8361
+-->
+ <path name="WEB-INF/classes"></path>
+
+ <path name="WEB-INF/lib/guava-r05.jar">
+ <exclude name="com.google.common.collect" />
+ </path>
+</scanning>
\ No newline at end of file
Deleted: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml 2010-10-27 16:17:45 UTC (rev 19703)
@@ -1,54 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
- <display-name>RichFaces 4 GAE Application</display-name>
- <context-param>
- <param-name>javax.faces.PROJECT_STAGE</param-name>
- <param-value>Development</param-value>
- </context-param>
- <context-param>
- <param-name>javax.faces.SKIP_COMMENTS</param-name>
- <param-value>true</param-value>
- </context-param>
- <context-param>
- <param-name>org.richfaces.enableControlSkinning</param-name>
- <param-value>true</param-value>
- </context-param>
- <context-param>
- <param-name>org.richfaces.enableControlSkinningClasses</param-name>
- <param-value>false</param-value>
- </context-param>
- <context-param>
- <param-name>org.richfaces.skin</param-name>
- <param-value>blueSky</param-value>
- </context-param>
- <servlet>
- <servlet-name>Faces Servlet</servlet-name>
- <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
- <servlet-mapping>
- <servlet-name>Faces Servlet</servlet-name>
- <url-pattern>*.jsf</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>Faces Servlet</servlet-name>
- <url-pattern>/faces/*</url-pattern>
- </servlet-mapping>
- <session-config>
- <session-timeout>30</session-timeout>
- </session-config>
- <mime-mapping>
- <extension>ecss</extension>
- <mime-type>text/css</mime-type>
- </mime-mapping>
- <welcome-file-list>
- <welcome-file>index.jsp</welcome-file>
- </welcome-file-list>
- <login-config>
- <auth-method>BASIC</auth-method>
- </login-config>
-</web-app>
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml (from rev 19674, trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml)
===================================================================
--- branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml 2010-10-27 16:17:45 UTC (rev 19703)
@@ -0,0 +1,54 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <display-name>RichFaces 4 GAE Application</display-name>
+ <context-param>
+ <param-name>javax.faces.PROJECT_STAGE</param-name>
+ <param-value>Development</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.SKIP_COMMENTS</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.enableControlSkinning</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.enableControlSkinningClasses</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.skin</param-name>
+ <param-value>blueSky</param-value>
+ </context-param>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+ <session-config>
+ <session-timeout>30</session-timeout>
+ </session-config>
+ <mime-mapping>
+ <extension>ecss</extension>
+ <mime-type>text/css</mime-type>
+ </mime-mapping>
+ <welcome-file-list>
+ <welcome-file>index.jsp</welcome-file>
+ </welcome-file-list>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>
Deleted: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/index.jsp
===================================================================
--- trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/index.jsp 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/index.jsp 2010-10-27 16:17:45 UTC (rev 19703)
@@ -1,10 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head></head>
- <body>
- <jsp:forward page="/index.jsf" />
- </body>
-</html>
\ No newline at end of file
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/index.jsp (from rev 19674, trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/index.jsp)
===================================================================
--- branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/index.jsp (rev 0)
+++ branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/index.jsp 2010-10-27 16:17:45 UTC (rev 19703)
@@ -0,0 +1,10 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head></head>
+ <body>
+ <jsp:forward page="/index.jsf" />
+ </body>
+</html>
\ No newline at end of file
Deleted: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/index.xhtml
===================================================================
--- trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/index.xhtml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/index.xhtml 2010-10-27 16:17:45 UTC (rev 19703)
@@ -1,27 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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" xmlns:a4j="http://richfaces.org/a4j">
-
-<body>
-<ui:composition template="/templates/template.xhtml">
-
- <ui:define name="title">RichFaces GAE Sample</ui:define>
-
- <ui:define name="body">
- <h:form prependId="false">
- <h:outputLabel value="Name:" for="nameInput" />
- <h:inputText id="nameInput" value="${symbol_pound}{richBean.name}">
- <a4j:ajax event="keyup" render="output" />
- </h:inputText>
- <h:panelGroup id="output">
- <h:outputText value="Hello ${symbol_pound}{richBean.name}!"
- rendered="${symbol_pound}{not empty richBean.name}" />
- </h:panelGroup>
- </h:form>
- </ui:define>
-</ui:composition>
-</body>
-</html>
\ No newline at end of file
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/index.xhtml (from rev 19674, trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/index.xhtml)
===================================================================
--- branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/index.xhtml (rev 0)
+++ branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/index.xhtml 2010-10-27 16:17:45 UTC (rev 19703)
@@ -0,0 +1,27 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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" xmlns:a4j="http://richfaces.org/a4j">
+
+<body>
+<ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="title">RichFaces GAE Sample</ui:define>
+
+ <ui:define name="body">
+ <h:form prependId="false">
+ <h:outputLabel value="Name:" for="nameInput" />
+ <h:inputText id="nameInput" value="${symbol_pound}{richBean.name}">
+ <a4j:ajax event="keyup" render="output" />
+ </h:inputText>
+ <h:panelGroup id="output">
+ <h:outputText value="Hello ${symbol_pound}{richBean.name}!"
+ rendered="${symbol_pound}{not empty richBean.name}" />
+ </h:panelGroup>
+ </h:form>
+ </ui:define>
+</ui:composition>
+</body>
+</html>
\ No newline at end of file
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/templates (from rev 19674, trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/templates)
Deleted: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/templates/template.xhtml
===================================================================
--- trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/templates/template.xhtml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/templates/template.xhtml 2010-10-27 16:17:45 UTC (rev 19703)
@@ -1,16 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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" xmlns:a4j="http://richfaces.org/a4j">
-
-<h:head>
- <title><ui:define name="title">Application Title</ui:define></title>
- <meta http-equiv="content-type" content="text/xhtml; charset=UTF-8" />
-</h:head>
-
-<h:body>
- <ui:insert name="body">Default content</ui:insert>
-</h:body>
-</html>
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/templates/template.xhtml (from rev 19674, trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/templates/template.xhtml)
===================================================================
--- branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/templates/template.xhtml (rev 0)
+++ branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp/templates/template.xhtml 2010-10-27 16:17:45 UTC (rev 19703)
@@ -0,0 +1,16 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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" xmlns:a4j="http://richfaces.org/a4j">
+
+<h:head>
+ <title><ui:define name="title">Application Title</ui:define></title>
+ <meta http-equiv="content-type" content="text/xhtml; charset=UTF-8" />
+</h:head>
+
+<h:body>
+ <ui:insert name="body">Default content</ui:insert>
+</h:body>
+</html>
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp-gae (from rev 19674, trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp-gae)
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp-gae/WEB-INF (from rev 19674, trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp-gae/WEB-INF)
Deleted: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp-gae/WEB-INF/appengine-web.xml
===================================================================
--- trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp-gae/WEB-INF/appengine-web.xml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp-gae/WEB-INF/appengine-web.xml 2010-10-27 16:17:45 UTC (rev 19703)
@@ -1,12 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-<?xml version="1.0" encoding="utf-8"?>
-<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
- <application>rf-${artifactId}</application>
- <version>1</version>
- <sessions-enabled>true</sessions-enabled>
- <system-properties>
- <property name="java.util.logging.config.file" value="WEB-INF/classes/logging.properties" />
- </system-properties>
-</appengine-web-app>
\ No newline at end of file
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp-gae/WEB-INF/appengine-web.xml (from rev 19674, trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp-gae/WEB-INF/appengine-web.xml)
===================================================================
--- branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp-gae/WEB-INF/appengine-web.xml (rev 0)
+++ branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp-gae/WEB-INF/appengine-web.xml 2010-10-27 16:17:45 UTC (rev 19703)
@@ -0,0 +1,12 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<?xml version="1.0" encoding="utf-8"?>
+<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
+ <application>rf-${artifactId}</application>
+ <version>1</version>
+ <sessions-enabled>true</sessions-enabled>
+ <system-properties>
+ <property name="java.util.logging.config.file" value="WEB-INF/classes/logging.properties" />
+ </system-properties>
+</appengine-web-app>
\ No newline at end of file
Deleted: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp-gae/WEB-INF/web.xml
===================================================================
--- trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp-gae/WEB-INF/web.xml 2010-10-26 17:10:27 UTC (rev 19674)
+++ branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp-gae/WEB-INF/web.xml 2010-10-27 16:17:45 UTC (rev 19703)
@@ -1,92 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
- id="richfaces-showcase" version="2.5">
- <display-name>RichFaces 4 GAE application</display-name>
- <welcome-file-list>
- <welcome-file>index.jsp</welcome-file>
- </welcome-file-list>
- <context-param>
- <param-name>javax.faces.FACELETS_LIBRARIES</param-name>
- <param-value>/WEB-INF/app-tags.taglib.xml</param-value>
- </context-param>
- <context-param>
- <param-name>org.richfaces.enableControlSkinning</param-name>
- <param-value>true</param-value>
- </context-param>
- <context-param>
- <param-name>org.richfaces.enableControlSkinningClasses</param-name>
- <param-value>false</param-value>
- </context-param>
- <context-param>
- <param-name>org.richfaces.skin</param-name>
- <param-value>blueSky</param-value>
- </context-param>
- <context-param>
- <param-name>javax.faces.PROJECT_STAGE</param-name>
- <param-value>Development</param-value>
- </context-param>
- <context-param>
- <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
- <param-value>server</param-value>
- </context-param>
- <context-param>
- <param-name>org.richfaces.staticResourceLocation</param-name>
- <param-value>${symbol_pound}{facesContext.externalContext.requestContextPath}/static-resources/${symbol_pound}{resourceLocation}</param-value>
- </context-param>
-
- <context-param>
- <param-name>org.ajax4jsf.cache.CACHE_MANAGER_FACTORY_CLASS</param-name>
- <param-value>org.ajax4jsf.cache.lru.LRUMapCacheFactory</param-value>
- </context-param>
-
- <context-param>
- <description>
- Set this flag to true if you want the JavaServer Faces
- Reference Implementation to validate the XML in your
- faces-config.xml resources against the DTD. Default
- value is false.
- </description>
- <param-name>com.sun.faces.validateXml</param-name>
- <param-value>true</param-value>
- </context-param>
- <!-- ***** Accommodate Single-Threaded Requirement of Google AppEngine -->
- <context-param>
- <description>
- When enabled, the runtime initialization and default ResourceHandler
- implementation will use threads to perform their functions. Set this
- value to false if threads aren't desired (as in the case of running
- within the Google Application Engine).
-
- Note that when this option is disabled, the ResourceHandler will not
- pick up new versions of resources when ProjectStage is development.
- </description>
- <param-name>com.sun.faces.enableThreading</param-name>
- <param-value>false</param-value>
- </context-param>
- <context-param>
- <param-name>com.sun.faces.expressionFactory</param-name>
- <param-value>com.sun.el.ExpressionFactoryImpl</param-value>
- </context-param>
- <context-param>
- <param-name>org.richfaces.executeAWTInitializer</param-name>
- <param-value>false</param-value>
- </context-param>
- <servlet>
- <servlet-name>Faces Servlet</servlet-name>
- <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
- <servlet-mapping>
- <servlet-name>Faces Servlet</servlet-name>
- <url-pattern>*.jsf</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>Faces Servlet</servlet-name>
- <url-pattern>/faces/*</url-pattern>
- </servlet-mapping>
-</web-app>
\ No newline at end of file
Copied: branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp-gae/WEB-INF/web.xml (from rev 19674, trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp-gae/WEB-INF/web.xml)
===================================================================
--- branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp-gae/WEB-INF/web.xml (rev 0)
+++ branches/RF-7817/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/webapp-gae/WEB-INF/web.xml 2010-10-27 16:17:45 UTC (rev 19703)
@@ -0,0 +1,92 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ id="richfaces-showcase" version="2.5">
+ <display-name>RichFaces 4 GAE application</display-name>
+ <welcome-file-list>
+ <welcome-file>index.jsp</welcome-file>
+ </welcome-file-list>
+ <context-param>
+ <param-name>javax.faces.FACELETS_LIBRARIES</param-name>
+ <param-value>/WEB-INF/app-tags.taglib.xml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.enableControlSkinning</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.enableControlSkinningClasses</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.skin</param-name>
+ <param-value>blueSky</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.PROJECT_STAGE</param-name>
+ <param-value>Development</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.staticResourceLocation</param-name>
+ <param-value>${symbol_pound}{facesContext.externalContext.requestContextPath}/static-resources/${symbol_pound}{resourceLocation}</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>org.ajax4jsf.cache.CACHE_MANAGER_FACTORY_CLASS</param-name>
+ <param-value>org.ajax4jsf.cache.lru.LRUMapCacheFactory</param-value>
+ </context-param>
+
+ <context-param>
+ <description>
+ Set this flag to true if you want the JavaServer Faces
+ Reference Implementation to validate the XML in your
+ faces-config.xml resources against the DTD. Default
+ value is false.
+ </description>
+ <param-name>com.sun.faces.validateXml</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <!-- ***** Accommodate Single-Threaded Requirement of Google AppEngine -->
+ <context-param>
+ <description>
+ When enabled, the runtime initialization and default ResourceHandler
+ implementation will use threads to perform their functions. Set this
+ value to false if threads aren't desired (as in the case of running
+ within the Google Application Engine).
+
+ Note that when this option is disabled, the ResourceHandler will not
+ pick up new versions of resources when ProjectStage is development.
+ </description>
+ <param-name>com.sun.faces.enableThreading</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.expressionFactory</param-name>
+ <param-value>com.sun.el.ExpressionFactoryImpl</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.executeAWTInitializer</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+</web-app>
\ No newline at end of file
Modified: branches/RF-7817/archetypes/richfaces-archetype-simpleapp/pom.xml
===================================================================
--- branches/RF-7817/archetypes/richfaces-archetype-simpleapp/pom.xml 2010-10-27 16:03:48 UTC (rev 19702)
+++ branches/RF-7817/archetypes/richfaces-archetype-simpleapp/pom.xml 2010-10-27 16:17:45 UTC (rev 19703)
@@ -34,6 +34,20 @@
<extensions>true</extensions>
</plugin>
</plugins>
+ <resources>
+ <!-- Selectively trigger filtering on resource directory
+ The second element turns on filtering only for META-INF directory
+ -->
+ <resource>
+ <directory>src/main/resources/</directory>
+ <filtering>false</filtering>
+ </resource>
+ <resource>
+ <directory>src/main/resources/META-INF/maven</directory>
+ <filtering>true</filtering>
+ <targetPath>META-INF/maven</targetPath>
+ </resource>
+ </resources>
</build>
<profiles>
@@ -76,7 +90,7 @@
</build>
</profile>
</profiles>
-
+
<scm>
<connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/trunk/archetypes/richfac...</connection>
<developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/trunk/archetypes/richfaces-...</developerConnection>
Modified: branches/RF-7817/archetypes/richfaces-archetype-simpleapp/src/main/resources/META-INF/maven/archetype-metadata.xml
===================================================================
--- branches/RF-7817/archetypes/richfaces-archetype-simpleapp/src/main/resources/META-INF/maven/archetype-metadata.xml 2010-10-27 16:03:48 UTC (rev 19702)
+++ branches/RF-7817/archetypes/richfaces-archetype-simpleapp/src/main/resources/META-INF/maven/archetype-metadata.xml 2010-10-27 16:17:45 UTC (rev 19703)
@@ -1,4 +1,12 @@
-<?xml version="1.0" encoding="UTF-8"?><archetype-descriptor name="richfaces-archetype-simpleapp">
+<?xml version="1.0" encoding="UTF-8"?>
+ <archetype-descriptor xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descript..." xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descript... http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd"
+ name="richfaces-archetype-simpleapp">
+ <requiredProperties>
+ <requiredProperty key="richfaces-version">
+ <defaultValue>${project.version}</defaultValue>
+ </requiredProperty>
+ </requiredProperties>
<fileSets>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/main/java</directory>
Modified: branches/RF-7817/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/pom.xml
===================================================================
--- branches/RF-7817/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/pom.xml 2010-10-27 16:03:48 UTC (rev 19702)
+++ branches/RF-7817/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/pom.xml 2010-10-27 16:17:45 UTC (rev 19703)
@@ -1,7 +1,6 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
-#set(
-$symbol_escape = '\' )
+#set($symbol_escape = '\' )
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
@@ -31,11 +30,14 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <org.richfaces.bom.version>4.0.0-SNAPSHOT</org.richfaces.bom.version>
+ <!-- Setting this property using archetype-metadata.xml requiredPorperty
+ so that generated project uses correct version of richfaces.
+ -->
+ <org.richfaces.bom.version>${richfaces-version}</org.richfaces.bom.version>
</properties>
<build>
- <finalName>${artifactId}-${symbol_dollar}{project.version}</finalName>
+ <finalName>${artifactId}-${project.version}</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
@@ -49,7 +51,7 @@
<configuration>
<webResources>
<resource>
- <directory>${symbol_dollar}{basedir}/src/main/java</directory>
+ <directory>${basedir}/src/main/java</directory>
<targetPath>/WEB-INF/src</targetPath>
</resource>
</webResources>
@@ -105,7 +107,7 @@
<goal>war</goal>
</goals>
<configuration>
- <webappDirectory>${symbol_dollar}{project.build.directory}/${symbol_dollar}{project.build.finalName}-jee6</webappDirectory>
+ <webappDirectory>${project.build.directory}/${project.build.finalName}-jee6</webappDirectory>
<classifier>jee6</classifier>
<packagingExcludes>WEB-INF/lib/jsf-api*,WEB-INF/lib/jsf-impl*</packagingExcludes>
<warSourceExcludes>WEB-INF/lib/jsf-api*,WEB-INF/lib/jsf-impl*</warSourceExcludes>
@@ -115,7 +117,7 @@
<configuration>
<webResources>
<resource>
- <directory>${symbol_dollar}{basedir}/src/main/java</directory>
+ <directory>${basedir}/src/main/java</directory>
<targetPath>/WEB-INF/src</targetPath>
</resource>
</webResources>
Copied: branches/RF-7817/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/java/RichBean.java (from rev 19674, trunk/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/java/RichBean.java)
===================================================================
--- branches/RF-7817/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/java/RichBean.java (rev 0)
+++ branches/RF-7817/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/java/RichBean.java 2010-10-27 16:17:45 UTC (rev 19703)
@@ -0,0 +1,25 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package};
+
+import java.io.Serializable;
+
+public class RichBean implements Serializable {
+
+ private static final long serialVersionUID = -2403138958014741653L;
+ private String name;
+
+ public RichBean() {
+ System.out.println("post construct: initialize");
+ name = "John";
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+}
Modified: branches/RF-7817/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- branches/RF-7817/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml 2010-10-27 16:03:48 UTC (rev 19702)
+++ branches/RF-7817/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml 2010-10-27 16:17:45 UTC (rev 19703)
@@ -1,3 +1,6 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
<?xml version="1.0"?>
<faces-config version="2.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
@@ -4,7 +7,7 @@
<managed-bean>
<managed-bean-name>richBean</managed-bean-name>
- <managed-bean-class>org.richfaces.RichBean</managed-bean-class>
+ <managed-bean-class>${package}.RichBean</managed-bean-class>
<managed-bean-scope>view</managed-bean-scope>
</managed-bean>
</faces-config>
14 years, 3 months
JBoss Rich Faces SVN: r19702 - in branches/RF-8742: core/impl/src/main/java/org/richfaces/application and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2010-10-27 12:03:48 -0400 (Wed, 27 Oct 2010)
New Revision: 19702
Modified:
branches/RF-8742/core/api/src/main/java/org/richfaces/application/MessageFactory.java
branches/RF-8742/core/impl/src/main/java/org/richfaces/application/MessageFactoryImpl.java
branches/RF-8742/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/LibraryScriptFunction.java
branches/RF-8742/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/NullConverterScript.java
branches/RF-8742/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/converter-number.js
branches/RF-8742/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/richfaces-csv.js
branches/RF-8742/ui/validator/ui/src/test/java/org/richfaces/convert/BaseConverterTest.java
branches/RF-8742/ui/validator/ui/src/test/java/org/richfaces/convert/NumberConverterTest.java
branches/RF-8742/ui/validator/ui/src/test/resources/org/richfaces/convert/test.xhtml
Log:
https://jira.jboss.org/browse/RF-9215
https://jira.jboss.org/browse/RF-9521
Modified: branches/RF-8742/core/api/src/main/java/org/richfaces/application/MessageFactory.java
===================================================================
--- branches/RF-8742/core/api/src/main/java/org/richfaces/application/MessageFactory.java 2010-10-27 16:01:55 UTC (rev 19701)
+++ branches/RF-8742/core/api/src/main/java/org/richfaces/application/MessageFactory.java 2010-10-27 16:03:48 UTC (rev 19702)
@@ -37,4 +37,6 @@
public String getMessageText(FacesContext facesContext, Enum<?> messageKey, Object... args);
+ public String getMessageFormat(FacesContext facesContext, Enum<?> messageKey);
+
}
Modified: branches/RF-8742/core/impl/src/main/java/org/richfaces/application/MessageFactoryImpl.java
===================================================================
--- branches/RF-8742/core/impl/src/main/java/org/richfaces/application/MessageFactoryImpl.java 2010-10-27 16:01:55 UTC (rev 19701)
+++ branches/RF-8742/core/impl/src/main/java/org/richfaces/application/MessageFactoryImpl.java 2010-10-27 16:03:48 UTC (rev 19702)
@@ -34,6 +34,8 @@
import org.richfaces.l10n.BundleLoader;
import org.richfaces.l10n.MessageBundle;
+import com.google.common.base.Strings;
+
/**
* @author Nick Belaevski
*
@@ -87,6 +89,15 @@
};
+
+ private static final Factory<String> FORMAT_FACTORY = new Factory<String>() {
+ public String create(ResourceBundle bundle, Enum<?> messageKey, Object... args)
+ throws MissingResourceException {
+ String format = bundle.getString(messageKey.toString());
+ return format;
+ }
+ };
+
private BundleLoader bundleLoader;
public MessageFactoryImpl(BundleLoader bundleLoader) {
@@ -138,6 +149,15 @@
return text;
}
+ public String getMessageFormat(FacesContext facesContext, Enum<?> messageKey) {
+ String text = detectLocalesAndCreate(facesContext, FORMAT_FACTORY, messageKey);
+ if (Strings.isNullOrEmpty(text)) {
+ throw new IllegalStateException("Format not found");
+ }
+
+ return text;
+ }
+
protected <T> T detectLocalesAndCreate(FacesContext context, Factory<T> factory, Enum<?> messageKey, Object... args) {
T result = null;
Modified: branches/RF-8742/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/LibraryScriptFunction.java
===================================================================
--- branches/RF-8742/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/LibraryScriptFunction.java 2010-10-27 16:01:55 UTC (rev 19701)
+++ branches/RF-8742/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/LibraryScriptFunction.java 2010-10-27 16:03:48 UTC (rev 19702)
@@ -42,6 +42,10 @@
this.resource = libraryScript.getResource();
name = libraryScript.getName();
}
+
+ public String getName() {
+ return name;
+ }
/* (non-Javadoc)
* @see org.richfaces.renderkit.html.LibraryScriptString#getResource()
Modified: branches/RF-8742/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/NullConverterScript.java
===================================================================
--- branches/RF-8742/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/NullConverterScript.java 2010-10-27 16:01:55 UTC (rev 19701)
+++ branches/RF-8742/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/NullConverterScript.java 2010-10-27 16:03:48 UTC (rev 19702)
@@ -13,9 +13,16 @@
*/
public class NullConverterScript extends JSLiteral implements LibraryScriptString {
+ private String name;
+
public NullConverterScript() {
super(ClientValidatorRenderer.VALUE_VAR);
}
+
+ public String getName() {
+ return name;
+ }
+
/* (non-Javadoc)
* @see org.richfaces.renderkit.html.LibraryScriptString#getResource()
*/
Modified: branches/RF-8742/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/converter-number.js
===================================================================
--- branches/RF-8742/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/converter-number.js 2010-10-27 16:01:55 UTC (rev 19701)
+++ branches/RF-8742/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/converter-number.js 2010-10-27 16:03:48 UTC (rev 19702)
@@ -3,7 +3,7 @@
return function (value, params) {
var result;
if (isNaN(value)) {
- throw rf.csv.getMessage(params.customMessages, 'NumberConverter.isNaN', [value]);
+ throw rf.csv.getMessage(params.customMessage, 'NUMBER_CONVERTER_NUMBER', [value, 0, params.componentId]);
} else {
result = parseInt(value);
}
Modified: branches/RF-8742/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/richfaces-csv.js
===================================================================
--- branches/RF-8742/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/richfaces-csv.js 2010-10-27 16:01:55 UTC (rev 19701)
+++ branches/RF-8742/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/richfaces-csv.js 2010-10-27 16:03:48 UTC (rev 19702)
@@ -9,12 +9,13 @@
var RE_MESSAGE_PATTERN = /\{(\d+)\}/g;
$.extend(rf.csv, {
+ MESSAGE_EVENT_NAME: "onmessage."+rf.Event.RICH_NAMESPACE,
// Messages API
addMessage: function (messagesObject) {
$.extend(_messages, messagesObject);
},
- getMessage: function(customMessages, id, values) {
- var message = (customMessages && customMessages[id]) || _messages[id] || "";
+ getMessage: function(customMessage, messageId, values) {
+ var message = customMessage || _messages[messageId] || "";
if (message) {
var msgObject = message.replace(RE_MESSAGE_PATTERN,"\n$1\n").split("\n");
var value;
@@ -27,8 +28,8 @@
return message;
},
sendMessage: function (componentId, message) {
- //rf.messageManager.send(componentId, message);
- //rf.Event.fire("onMessage.RichFaces.componentId");
+ rf.Event.fireById(document, MESSAGE_EVENT_NAME, message);
+ rf.Event.fireById(componentId, MESSAGE_EVENT_NAME, message);
},
// Converters API
addConverter: function (converterFunctions) {
@@ -53,9 +54,10 @@
}
if (converter) {
try {
+ converter.options.componentId = id;
value = getConverter([converter.name])(value, converter.options);
} catch (e){
- sendMessage(id, id+":"+e);
+ sendMessage(id, e);
return false;
}
}
@@ -135,8 +137,8 @@
/*
* message.constructor () {
- * rf.Event.bindById(this.id, "onMessage:RichFaces.global", onMessage );
- * rf.Event.bindById(this.id, "onMessage.RichFaces.componentId", onMessage );
+ * rf.Event.bindById(componentId, "onMessage.RichFaces", onMessage );
+ * rf.Event.bindById(document, "onMessage.RichFaces", onMessage );
* }
*
*/
Modified: branches/RF-8742/ui/validator/ui/src/test/java/org/richfaces/convert/BaseConverterTest.java
===================================================================
--- branches/RF-8742/ui/validator/ui/src/test/java/org/richfaces/convert/BaseConverterTest.java 2010-10-27 16:01:55 UTC (rev 19701)
+++ branches/RF-8742/ui/validator/ui/src/test/java/org/richfaces/convert/BaseConverterTest.java 2010-10-27 16:03:48 UTC (rev 19702)
@@ -50,12 +50,16 @@
import org.ajax4jsf.javascript.JSFunction;
import org.ajax4jsf.javascript.ScriptUtils;
import org.jboss.test.faces.htmlunit.HtmlUnitEnvironment;
+import org.jboss.test.faces.jetty.JettyServer;
import org.junit.After;
import org.junit.Before;
import org.junit.runner.RunWith;
+import org.richfaces.application.MessageFactory;
+import org.richfaces.application.ServiceTracker;
import com.gargoylesoftware.htmlunit.ScriptResult;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
+import com.google.common.base.Strings;
/**
* @author Nick Belaevski
@@ -64,249 +68,267 @@
@RunWith(BaseConverterTestRunner.class)
public abstract class BaseConverterTest {
- public static final String TEST_COMPONENT_LABEL = "input";
-
- public class TestBean {
-
- private static final String CONVERTER_VAR = "__converter";
+ public static final String TEST_COMPONENT_LABEL = "input";
- private String converterId;
-
- private String clientConverterClassName;
-
- private String convertedValueAsScript;
-
- private String conversionErrorMessage;
-
- private ConverterException converterException;
-
- private Map<String, Object> attributes = new HashMap<String, Object>();
-
- private String converterParametersString;
-
- public void setClientConverterClassName(String clientConverterClassName) {
- this.clientConverterClassName = clientConverterClassName;
- }
-
- public String getClientConverterClassName() {
- return clientConverterClassName;
- }
-
- public void setConverterId(String converterId) {
- this.converterId = converterId;
- }
-
- public String getSubmittedValue() {
- return submittedValue;
- }
-
- public String getSubmittedValueAsScript() {
- return ScriptUtils.toScript(submittedValue);
- }
-
- public String getConversionErrorMessage() {
- return conversionErrorMessage;
- }
-
- public void setConversionErrorMessage(String conversionErrorMessage) {
- this.conversionErrorMessage = conversionErrorMessage;
- }
-
- public void setAttribute(String name, Object value) {
- attributes.put(name, value);
- }
+ public class TestBean {
- public String getConverterParametersString() {
- return converterParametersString;
- }
-
- public ConverterException getConverterException() {
- return converterException;
- }
-
- private void configure(FacesContext facesContext, Converter converter) {
- ExpressionFactory expressionFactory = facesContext.getApplication().getExpressionFactory();
-
- VariableMapper varMapper = facesContext.getELContext().getVariableMapper();
- ValueExpression originalExpr = varMapper.resolveVariable(CONVERTER_VAR);
- try {
- varMapper.setVariable(CONVERTER_VAR, expressionFactory.createValueExpression(converter, Converter.class));
-
- for (Entry<String, Object> mapEntry: attributes.entrySet()) {
-
- String exprString = MessageFormat.format("#'{'{0}.{1}'}'", CONVERTER_VAR, mapEntry.getKey());
- ValueExpression ve = expressionFactory.createValueExpression(facesContext.getELContext(), exprString, Object.class);
-
- ve.setValue(facesContext.getELContext(), mapEntry.getValue());
- }
- } finally {
- varMapper.setVariable(CONVERTER_VAR, originalExpr);
- }
- }
-
- private Converter createConverter(FacesContext facesContext) {
- Converter converter = facesContext.getApplication().createConverter(converterId);
- configure(facesContext, converter);
- return converter;
- }
-
- private UIComponent createTestComponent() {
- HtmlInputText testComponent = new HtmlInputText();
- testComponent.setLabel(TEST_COMPONENT_LABEL);
- return testComponent;
- }
-
- public String getConvertedValueAsScript() {
- return convertedValueAsScript != null ? convertedValueAsScript : "null";
- }
-
- public void init() {
- if (converterId == null || clientConverterClassName == null) {
- throw new NullPointerException();
- }
-
- FacesContext facesContext = FacesContext.getCurrentInstance();
- Converter converter = createConverter(facesContext);
- try {
- Object convertedObject = converter.getAsObject(facesContext, createTestComponent(), submittedValue);
- convertedValueAsScript = serializeObjectToScript(convertedObject);
- } catch (ConverterException e) {
- this.converterException = e;
- }
-
- Map<String,Object> map = new HashMap<String, Object>(attributes);
- map.put("componentId", TEST_COMPONENT_LABEL);
-
- converterParametersString = ScriptUtils.toScript(map);
- }
- }
+ private static final String CONVERTER_VAR = "__converter";
- private TestBean testBean;
-
- private HtmlUnitEnvironment environment;
-
- private String converterScriptName;
-
- private String submittedValue;
-
- private String failureMessage;
-
- public BaseConverterTest(String converterScriptName) {
- this.converterScriptName = converterScriptName;
- }
-
- @Before
- public void setUp() throws Exception {
- testBean = new TestBean();
-
- environment = new HtmlUnitEnvironment();
- environment.getServer().addResource("/test.xhtml", BaseConverterTest.class.getResource("test.xhtml"));
- environment.getServer().addResource("/resources/converter.js", converterScriptName);
- environment.getServer().addWebListener(new ServletRequestListener() {
-
- public void requestInitialized(ServletRequestEvent sre) {
- sre.getServletRequest().setAttribute("testBean", testBean);
- }
-
- public void requestDestroyed(ServletRequestEvent sre) {
- }
- });
-
- environment.start();
- }
-
- @After
- public void tearDown() throws Exception {
- submittedValue = null;
- failureMessage = null;
-
- testBean = null;
-
- environment.release();
- environment = null;
- }
-
- protected String serializeObjectToScript(Object object) {
- if (object instanceof Date) {
- Calendar calendar = Calendar.getInstance();
- calendar.setTime((Date) object);
- calendar.setTimeZone(TimeZone.getTimeZone("UTC"));
-
- return new JSFunction("new Date", calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH),
- calendar.get(Calendar.DAY_OF_MONTH), calendar.get(Calendar.HOUR), calendar.get(Calendar.MINUTE),
- calendar.get(Calendar.SECOND), calendar.get(Calendar.MILLISECOND)).toScript();
- }
-
- return ScriptUtils.toScript(object);
- }
-
- public void setConversionErrorMessage(String conversionErrorMessage) {
- testBean.setConversionErrorMessage(conversionErrorMessage);
- }
-
- public void setConverterId(String converterId) {
- testBean.setConverterId(converterId);
- }
+ private String converterId;
- public void setClientConverterClassName(String clientConverterClassName) {
- testBean.setClientConverterClassName(clientConverterClassName);
- }
-
- public void setAttribute(String name, Object value) {
- testBean.setAttribute(name, value);
- }
+ private String clientConverterClassName;
- public void setSubmittedValue(String submittedValue) {
- this.submittedValue = submittedValue;
- }
-
- public void setFailureMessage(String failureMessage) {
- this.failureMessage = failureMessage;
- }
-
- public void assertConversionOk() throws Exception {
- HtmlPage page = environment.getPage("/test.jsf");
-
- assertTrue(page.getWebClient().isJavaScriptEnabled());
- ScriptResult conversionMessageResult = page.executeJavaScript("verifyConversion()");
- if (!ScriptResult.isUndefined(conversionMessageResult)) {
- fail(conversionMessageResult.getJavaScriptResult().toString());
- }
- }
-
- public void assertConversionFailure() throws Exception {
- HtmlPage page = environment.getPage("/test.jsf");
+ private String convertedValueAsScript;
- assertNotNull(testBean.getConverterException());
-
- assertTrue(page.getWebClient().isJavaScriptEnabled());
- ScriptResult conversionErrorResult = page.executeJavaScript("window.conversionError");
-
- if (ScriptResult.isUndefined(conversionErrorResult)) {
- fail("converter has not thrown an error");
- return;
- }
-
- Object conversionErrorMessage;
+ private String conversionErrorMessage;
- Object scriptResult = conversionErrorResult.getJavaScriptResult();
- if (scriptResult instanceof Scriptable) {
- Scriptable scriptable = (Scriptable) scriptResult;
- conversionErrorMessage = scriptable.get("message", scriptable);
- } else {
- conversionErrorMessage = scriptResult;
- }
-
- if (failureMessage != null) {
- assertEquals(failureMessage, conversionErrorMessage);
- } else {
- assertEquals(testBean.getConverterException().getMessage(), conversionErrorMessage);
- }
- }
+ private Enum<?> conversionErrorMessageEnum;
- public void setup(TestData testData) {
- setSubmittedValue(testData.submittedValue());
- setFailureMessage(testData.failureMessage());
- }
-
+ private ConverterException converterException;
+
+ private Map<String, Object> attributes = new HashMap<String, Object>();
+
+ private String converterParametersString;
+
+ public void setClientConverterClassName(String clientConverterClassName) {
+ this.clientConverterClassName = clientConverterClassName;
+ }
+
+ public String getClientConverterClassName() {
+ return clientConverterClassName;
+ }
+
+ public void setConverterId(String converterId) {
+ this.converterId = converterId;
+ }
+
+ public String getSubmittedValue() {
+ return submittedValue;
+ }
+
+ public String getSubmittedValueAsScript() {
+ return ScriptUtils.toScript(submittedValue);
+ }
+
+ public String getConversionErrorMessage() {
+ return conversionErrorMessage;
+ }
+
+ public void setConversionErrorMessage(String conversionErrorMessage) {
+ this.conversionErrorMessage = conversionErrorMessage;
+ }
+
+ public void setAttribute(String name, Object value) {
+ attributes.put(name, value);
+ }
+
+ public String getConverterParametersString() {
+ return converterParametersString;
+ }
+
+ public ConverterException getConverterException() {
+ return converterException;
+ }
+
+ public void setConversionErrorMessageEnum(
+ Enum<?> conversionErrorMessageEnum) {
+ this.conversionErrorMessageEnum = conversionErrorMessageEnum;
+ }
+
+ private void configure(FacesContext facesContext, Converter converter) {
+ ExpressionFactory expressionFactory = facesContext.getApplication().getExpressionFactory();
+
+ VariableMapper varMapper = facesContext.getELContext().getVariableMapper();
+ ValueExpression originalExpr = varMapper.resolveVariable(CONVERTER_VAR);
+ try {
+ varMapper.setVariable(CONVERTER_VAR, expressionFactory.createValueExpression(converter, Converter.class));
+
+ for (Entry<String, Object> mapEntry: attributes.entrySet()) {
+
+ String exprString = MessageFormat.format("#'{'{0}.{1}'}'", CONVERTER_VAR, mapEntry.getKey());
+ ValueExpression ve = expressionFactory.createValueExpression(facesContext.getELContext(), exprString, Object.class);
+
+ ve.setValue(facesContext.getELContext(), mapEntry.getValue());
+ }
+ } finally {
+ varMapper.setVariable(CONVERTER_VAR, originalExpr);
+ }
+ }
+
+ private Converter createConverter(FacesContext facesContext) {
+ Converter converter = facesContext.getApplication().createConverter(converterId);
+ configure(facesContext, converter);
+ return converter;
+ }
+
+ private UIComponent createTestComponent() {
+ HtmlInputText testComponent = new HtmlInputText();
+ testComponent.setLabel(TEST_COMPONENT_LABEL);
+ return testComponent;
+ }
+
+ public String getConvertedValueAsScript() {
+ return convertedValueAsScript != null ? convertedValueAsScript : "null";
+ }
+
+ public void init() {
+ if (converterId == null || clientConverterClassName == null) {
+ throw new NullPointerException();
+ }
+
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ Converter converter = createConverter(facesContext);
+ try {
+ Object convertedObject = converter.getAsObject(facesContext, createTestComponent(), submittedValue);
+ convertedValueAsScript = serializeObjectToScript(convertedObject);
+ } catch (ConverterException e) {
+ this.converterException = e;
+ }
+
+ if (Strings.isNullOrEmpty(conversionErrorMessage) && conversionErrorMessageEnum != null) {
+ MessageFactory messageFactory = ServiceTracker.getService(MessageFactory.class);
+ conversionErrorMessage = messageFactory.getMessageFormat(facesContext, conversionErrorMessageEnum);
+ }
+
+ Map<String,Object> map = new HashMap<String, Object>(attributes);
+ map.put("componentId", TEST_COMPONENT_LABEL);
+ map.put("customMessage", MessageFormat.format(conversionErrorMessage , "{0}"));
+
+ converterParametersString = ScriptUtils.toScript(map);
+ }
+ }
+
+ private TestBean testBean;
+
+ private HtmlUnitEnvironment environment;
+
+ private String converterScriptName;
+
+ private String submittedValue;
+
+ private String failureMessage;
+
+ public BaseConverterTest(String converterScriptName) {
+ this.converterScriptName = converterScriptName;
+ }
+
+ @Before
+ public void setUp() throws Exception {
+ testBean = new TestBean();
+
+ environment = new HtmlUnitEnvironment(new JettyServer());
+ environment.getServer().addResource("/test.xhtml", BaseConverterTest.class.getResource("test.xhtml"));
+ environment.getServer().addResource("/resources/converter.js", converterScriptName);
+ environment.getServer().addWebListener(new ServletRequestListener() {
+
+ public void requestInitialized(ServletRequestEvent sre) {
+ sre.getServletRequest().setAttribute("testBean", testBean);
+ }
+
+ public void requestDestroyed(ServletRequestEvent sre) {
+ }
+ });
+
+ environment.start();
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ submittedValue = null;
+ failureMessage = null;
+
+ testBean = null;
+
+ environment.release();
+ environment = null;
+ }
+
+ protected String serializeObjectToScript(Object object) {
+ if (object instanceof Date) {
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTime((Date) object);
+ calendar.setTimeZone(TimeZone.getTimeZone("UTC"));
+
+ return new JSFunction("new Date", calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH),
+ calendar.get(Calendar.DAY_OF_MONTH), calendar.get(Calendar.HOUR), calendar.get(Calendar.MINUTE),
+ calendar.get(Calendar.SECOND), calendar.get(Calendar.MILLISECOND)).toScript();
+ }
+
+ return ScriptUtils.toScript(object);
+ }
+
+ public void setConversionErrorMessage(String conversionErrorMessage) {
+ testBean.setConversionErrorMessage(conversionErrorMessage);
+ }
+
+ public void setConverterId(String converterId) {
+ testBean.setConverterId(converterId);
+ }
+
+ public void setClientConverterClassName(String clientConverterClassName) {
+ testBean.setClientConverterClassName(clientConverterClassName);
+ }
+
+ public void setAttribute(String name, Object value) {
+ testBean.setAttribute(name, value);
+ }
+
+ public void setSubmittedValue(String submittedValue) {
+ this.submittedValue = submittedValue;
+ }
+
+ public void setFailureMessage(String failureMessage) {
+ this.failureMessage = failureMessage;
+ }
+
+ public void setConversionErrorMessageEnum(
+ Enum<?> conversionErrorMessageEnum) {
+ testBean.setConversionErrorMessageEnum(conversionErrorMessageEnum);
+ }
+
+ public void assertConversionOk() throws Exception {
+ HtmlPage page = environment.getPage("/test.jsf");
+ System.out.println(page.asXml());
+ assertTrue(page.getWebClient().isJavaScriptEnabled());
+ ScriptResult conversionMessageResult = page.executeJavaScript("verifyConversion()");
+ if (!ScriptResult.isUndefined(conversionMessageResult)) {
+ fail(conversionMessageResult.getJavaScriptResult().toString());
+ }
+ }
+
+ public void assertConversionFailure() throws Exception {
+ HtmlPage page = environment.getPage("/test.jsf");
+
+ assertNotNull(testBean.getConverterException());
+
+ assertTrue(page.getWebClient().isJavaScriptEnabled());
+ ScriptResult conversionErrorResult = page.executeJavaScript("window.conversionError");
+
+ if (ScriptResult.isUndefined(conversionErrorResult)) {
+ fail("converter has not thrown an error");
+ return;
+ }
+
+ Object conversionErrorMessage;
+
+ Object scriptResult = conversionErrorResult.getJavaScriptResult();
+ if (scriptResult instanceof Scriptable) {
+ Scriptable scriptable = (Scriptable) scriptResult;
+ conversionErrorMessage = scriptable.get("message", scriptable);
+ } else {
+ conversionErrorMessage = scriptResult;
+ }
+
+ if (failureMessage != null) {
+ assertEquals(failureMessage, conversionErrorMessage);
+ } else {
+ assertEquals(testBean.getConverterException().getMessage(), conversionErrorMessage);
+ }
+ }
+
+ public void setup(TestData testData) {
+ setSubmittedValue(testData.submittedValue());
+ setFailureMessage(testData.failureMessage());
+ }
+
}
Modified: branches/RF-8742/ui/validator/ui/src/test/java/org/richfaces/convert/NumberConverterTest.java
===================================================================
--- branches/RF-8742/ui/validator/ui/src/test/java/org/richfaces/convert/NumberConverterTest.java 2010-10-27 16:01:55 UTC (rev 19701)
+++ branches/RF-8742/ui/validator/ui/src/test/java/org/richfaces/convert/NumberConverterTest.java 2010-10-27 16:03:48 UTC (rev 19702)
@@ -21,9 +21,14 @@
*/
package org.richfaces.convert;
+import static org.junit.Assert.*;
+
import javax.faces.convert.NumberConverter;
import org.junit.Test;
+import org.richfaces.application.MessageFactory;
+import org.richfaces.application.ServiceTracker;
+import org.richfaces.appplication.FacesMessages;
/**
* @author Pavel Yaschenko
@@ -47,6 +52,7 @@
public void testSuccess() throws Exception {
setClientConverterClassName("RichFaces.csv.getConverter('number')");
setConverterId(NumberConverter.CONVERTER_ID);
- //setAttribute("pattern", "dd-MM-yyyy");
+ setConversionErrorMessageEnum(FacesMessages.NUMBER_CONVERTER_NUMBER);
}
+
}
Modified: branches/RF-8742/ui/validator/ui/src/test/resources/org/richfaces/convert/test.xhtml
===================================================================
--- branches/RF-8742/ui/validator/ui/src/test/resources/org/richfaces/convert/test.xhtml 2010-10-27 16:01:55 UTC (rev 19701)
+++ branches/RF-8742/ui/validator/ui/src/test/resources/org/richfaces/convert/test.xhtml 2010-10-27 16:03:48 UTC (rev 19702)
@@ -10,6 +10,8 @@
</f:metadata>
<h:head>
<h:outputScript name="jquery.js" />
+ <h:outputScript name="richfaces.js" />
+ <h:outputScript name="richfaces-event.js" />
<h:outputScript name="richfaces-csv.js" library="org.richfaces"/>
<h:outputScript name="converter.js" />
</h:head>
@@ -19,7 +21,7 @@
try {
window.actual = #{testBean.clientConverterClassName}(#{testBean.submittedValueAsScript},
- "#{testBean.conversionErrorMessage}", #{testBean.converterParametersString});
+ #{testBean.converterParametersString});
} catch (e) {
window.conversionError = e;
}
14 years, 3 months
JBoss Rich Faces SVN: r19701 - in branches/RF-7817/cdk: generator/src/main/resources/META-INF/templates and 6 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-10-27 12:01:55 -0400 (Wed, 27 Oct 2010)
New Revision: 19701
Added:
branches/RF-7817/cdk/generator/src/main/resources/META-INF/schema/cdk-extensions.xsd
branches/RF-7817/cdk/generator/src/main/resources/META-INF/templates/java/add-attributes-to-script-hash.ftl
branches/RF-7817/cdk/generator/src/main/resources/META-INF/templates/java/script-object.ftl
branches/RF-7817/cdk/generator/src/main/resources/META-INF/templates/java/script-option.ftl
branches/RF-7817/cdk/generator/src/test/java/org/richfaces/cdk/templatecompiler/statements/AddAttributesToScriptHashTest.java
Modified:
branches/RF-7817/cdk/generator/src/main/resources/META-INF/schema/cdk-composite.xsd
branches/RF-7817/cdk/generator/src/main/resources/META-INF/schema/cdk-jstl-core.xsd
branches/RF-7817/cdk/generator/src/main/resources/META-INF/schema/cdk-template.xsd
branches/RF-7817/cdk/generator/src/main/resources/META-INF/schema/xhtml-el.xsd
branches/RF-7817/cdk/generator/src/main/resources/META-INF/templates/component.ftl
branches/RF-7817/cdk/generator/src/main/resources/META-INF/templates/java/class.ftl
branches/RF-7817/cdk/generator/src/main/resources/META-INF/templates/java/util.ftl
branches/RF-7817/cdk/generator/src/main/resources/META-INF/templates/java/write-attributes-set.ftl
branches/RF-7817/cdk/generator/src/main/resources/META-INF/templates/java/write-boolean-attribute.ftl
branches/RF-7817/cdk/generator/src/test/java/org/richfaces/cdk/templatecompiler/model/TemplateParserTest.java
branches/RF-7817/cdk/generator/src/test/java/org/richfaces/cdk/templatecompiler/parser/el/test/ELParserTest.java
branches/RF-7817/cdk/generator/src/test/java/org/richfaces/cdk/templatecompiler/statements/FreeMarkerTemplateStatementTest.java
branches/RF-7817/cdk/generator/src/test/java/org/richfaces/cdk/templatecompiler/statements/WriteAttributesSetTest.java
branches/RF-7817/cdk/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/cdk/test/component/AbstractTestComponent.java
branches/RF-7817/cdk/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/cdk/test/component/Html5Attributes.java
branches/RF-7817/cdk/maven-cdk-plugin/src/it/annotated-component/src/main/templates/testComponent.xml
Log:
Merged revisions 19156-19157,19159-19160,19176,19186-19187,19190,19194,19196,19199,19203-19204,19231-19234,19248-19249,19255-19256,19258-19262,19276,19279-19281,19283,19285,19291-19299,19307,19312,19315,19318-19319,19325,19341-19342,19345-19351,19353-19355,19358-19359,19364,19367-19369,19371,19374-19377,19379-19385,19387,19393-19394,19400,19402-19404,19418-19422,19426,19430-19431,19434-19441,19443-19444,19446,19468,19470,19477,19491,19498-19499,19501,19504,19506-19507,19517-19519,19525,19542-19543,19548,19550,19555,19557,19560-19561,19565-19566,19571-19573,19582-19585,19592-19593,19599,19601-19602,19613,19646,19657-19659,19665,19671-19674 via svnmerge from
https://svn.jboss.org/repos/richfaces/trunk
Modified: branches/RF-7817/cdk/generator/src/main/resources/META-INF/schema/cdk-composite.xsd
===================================================================
--- branches/RF-7817/cdk/generator/src/main/resources/META-INF/schema/cdk-composite.xsd 2010-10-27 15:58:37 UTC (rev 19700)
+++ branches/RF-7817/cdk/generator/src/main/resources/META-INF/schema/cdk-composite.xsd 2010-10-27 16:01:55 UTC (rev 19701)
@@ -19,10 +19,9 @@
<xs:schema targetNamespace="http://jboss.org/schema/richfaces/cdk/jsf/composite"
xmlns:cc="http://jboss.org/schema/richfaces/cdk/jsf/composite" xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:cdk="http://jboss.org/schema/richfaces/cdk/core"
+ xmlns:xml="http://www.w3.org/XML/1998/namespace"
elementFormDefault="qualified" attributeFormDefault="unqualified">
- <xs:import schemaLocation="cdk-template.xsd" namespace="http://jboss.org/schema/richfaces/cdk/core" />
<xs:annotation>
<xs:documentation>
@@ -308,7 +307,7 @@
<xs:complexType name="compositeImplementationType"
mixed="true">
<xs:choice>
- <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax" />
+ <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax" namespace="##other " />
</xs:choice>
</xs:complexType>
Copied: branches/RF-7817/cdk/generator/src/main/resources/META-INF/schema/cdk-extensions.xsd (from rev 19674, trunk/cdk/generator/src/main/resources/META-INF/schema/cdk-extensions.xsd)
===================================================================
--- branches/RF-7817/cdk/generator/src/main/resources/META-INF/schema/cdk-extensions.xsd (rev 0)
+++ branches/RF-7817/cdk/generator/src/main/resources/META-INF/schema/cdk-extensions.xsd 2010-10-27 16:01:55 UTC (rev 19701)
@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://jboss.org/schema/richfaces/cdk/ext" xmlns="http://jboss.org/schema/richfaces/cdk/ext"
+ elementFormDefault="qualified">
+
+ <xs:simpleType name="beanAttribute">
+ <xs:restriction base="xs:string">
+ <xs:pattern value="[a-zA-Z][a-zA-Z_]*" />
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:attributeGroup name="attrs">
+ <xs:attributeGroup ref="coreattrs" />
+ <xs:attributeGroup ref="i18n" />
+ <xs:attributeGroup ref="events" />
+ </xs:attributeGroup>
+ <xs:attributeGroup name="coreattrs">
+ <xs:annotation>
+ <xs:documentation>
+ core attributes common to most elements
+ id
+ document-wide unique id
+ class space separated list of classes
+ style
+ associated style info
+ title advisory title/amplification
+ </xs:documentation>
+ </xs:annotation>
+ <xs:attribute ref="id" />
+ <xs:attribute ref="style" />
+ <xs:attribute ref="title" />
+ </xs:attributeGroup>
+
+ <xs:attribute name="id" type="beanAttribute" />
+ <xs:attribute name="style" type="beanAttribute" />
+ <xs:attribute name="title" type="beanAttribute" />
+
+ <xs:attributeGroup name="i18n">
+ <xs:annotation>
+ <xs:documentation>
+ internationalization attributes
+ lang language code
+ (backwards compatible)
+ xml:lang language code (as per XML 1.0 spec)
+ dir direction for weak/neutral text
+ </xs:documentation>
+ </xs:annotation>
+ <xs:attribute ref="lang" />
+ </xs:attributeGroup>
+ <xs:attribute name="lang" type="beanAttribute" />
+
+ <xs:attributeGroup name="classGroup">
+ <xs:attribute ref="class" />
+ </xs:attributeGroup>
+ <xs:attribute name="class" type="beanAttribute" />
+
+ <xs:attributeGroup name="events">
+ <xs:annotation>
+ <xs:documentation>
+ attributes for common UI events
+ onclick a pointer
+ button was clicked
+ ondblclick a pointer button was double clicked
+ onmousedown a pointer button was pressed down
+ onmouseup a pointer
+ button was released
+ onmousemove a pointer was moved onto the element
+ onmouseout a pointer was moved away from the element
+ onkeypress a key
+ was pressed and released
+ onkeydown a key was pressed down
+ onkeyup a
+ key was released
+ </xs:documentation>
+ </xs:annotation>
+ <xs:attribute ref="onclick" />
+ <xs:attribute ref="ondblclick" />
+ <xs:attribute ref="onmousedown" />
+ <xs:attribute ref="onmouseup" />
+ <xs:attribute ref="onmouseover" />
+ <xs:attribute ref="onmousemove" />
+ <xs:attribute ref="onmouseout" />
+ <xs:attribute ref="onkeypress" />
+ <xs:attribute ref="onkeydown" />
+ <xs:attribute ref="onkeyup" />
+ </xs:attributeGroup>
+ <xs:attribute name="onclick" type="beanAttribute" />
+ <xs:attribute name="ondblclick" type="beanAttribute" />
+ <xs:attribute name="onmousedown" type="beanAttribute" />
+ <xs:attribute name="onmouseup" type="beanAttribute" />
+ <xs:attribute name="onmouseover" type="beanAttribute" />
+ <xs:attribute name="onmousemove" type="beanAttribute" />
+ <xs:attribute name="onmouseout" type="beanAttribute" />
+ <xs:attribute name="onkeypress" type="beanAttribute" />
+ <xs:attribute name="onkeydown" type="beanAttribute" />
+ <xs:attribute name="onkeyup" type="beanAttribute" />
+
+ <xs:attributeGroup name="focus">
+ <xs:annotation>
+ <xs:documentation>
+ attributes for elements that can get the focus
+ accesskey accessibility key character
+ tabindex position in tabbing
+ order
+ onfocus the element got the focus
+ onblur the element lost the
+ focus
+ </xs:documentation>
+ </xs:annotation>
+ <xs:attribute ref="accesskey" />
+ <xs:attribute ref="tabindex" />
+ <xs:attribute ref="onfocus" />
+ <xs:attribute ref="onblur" />
+ </xs:attributeGroup>
+ <xs:attribute name="accesskey" type="beanAttribute" />
+ <xs:attribute name="tabindex" type="beanAttribute" />
+ <xs:attribute name="onfocus" type="beanAttribute" />
+ <xs:attribute name="onblur" type="beanAttribute" />
+
+ <xs:attribute name="align" type="beanAttribute" />
+ <xs:attribute name="charset" type="beanAttribute"></xs:attribute>
+ <xs:attribute name="type" type="beanAttribute"></xs:attribute>
+ <xs:attribute name="name" type="beanAttribute"></xs:attribute>
+ <xs:attribute name="href" type="beanAttribute"></xs:attribute>
+ <xs:attribute name="hreflang" type="beanAttribute"></xs:attribute>
+ <xs:attribute name="rel" type="beanAttribute"></xs:attribute>
+ <xs:attribute name="rev" type="beanAttribute"></xs:attribute>
+ <xs:attribute name="shape" type="beanAttribute"></xs:attribute>
+ <xs:attribute name="coords" type="beanAttribute"></xs:attribute>
+ <xs:attribute name="target" type="beanAttribute"></xs:attribute>
+
+ <xs:attribute name="cite" type="beanAttribute" />
+
+ <xs:attribute name="size" type="beanAttribute" />
+ <xs:attribute name="color" type="beanAttribute" />
+ <xs:attribute name="face" type="beanAttribute" />
+
+ <xs:attribute name="action" type="beanAttribute" />
+ <xs:attribute name="method"></xs:attribute>
+ <xs:attribute name="enctype" type="beanAttribute" />
+ <xs:attribute name="onsubmit" type="beanAttribute" />
+ <xs:attribute name="onreset" type="beanAttribute" />
+ <xs:attribute name="accept" type="beanAttribute" />
+ <xs:attribute name="accept-charset" type="beanAttribute" />
+
+ <xs:attribute name="for" type="beanAttribute" />
+
+ <xs:attribute name="value" type="beanAttribute" />
+
+ <xs:attribute name="disabled" type="beanAttribute" />
+ <xs:attribute name="readonly" type="beanAttribute" />
+ <xs:attribute name="nowrap" type="beanAttribute" />
+ <xs:attribute name="compact" type="beanAttribute" />
+ <xs:attribute name="checked" type="beanAttribute" />
+ <xs:attribute name="valign" type="beanAttribute" />
+ <xs:attribute name="char" type="beanAttribute" />
+ <xs:attribute name="charoff" type="beanAttribute" />
+ <xs:attribute name="codebase" type="beanAttribute" />
+ <xs:attribute name="alt" type="beanAttribute" />
+ <xs:attribute name="clear" type="beanAttribute" />
+ <xs:attribute name="span" type="beanAttribute" />
+ <xs:attribute name="profile" type="beanAttribute" />
+ <xs:attribute name="width" type="beanAttribute" />
+ <xs:attribute name="src" type="beanAttribute" />
+ <xs:attribute name="maxlength" type="beanAttribute" />
+ <xs:attribute name="media" type="beanAttribute" />
+ <xs:attribute name="http-equiv" type="beanAttribute" />
+ <xs:attribute name="archive" type="beanAttribute" />
+ <xs:attribute name="nohref" type="beanAttribute" />
+ <xs:attribute name="longdesc" type="beanAttribute" />
+ <xs:attribute name="usemap" type="beanAttribute" />
+ <xs:attribute name="required" type="beanAttribute" />
+ <xs:attribute name="rows" type="beanAttribute" />
+ <xs:attribute name="cols" type="beanAttribute" />
+ <xs:attribute name="bgcolor" type="beanAttribute" />
+ <xs:attribute name="code" type="beanAttribute" />
+ <xs:attribute name="height" type="beanAttribute" />
+ <xs:attribute name="onselect" type="beanAttribute" />
+ <xs:attribute name="onchange" type="beanAttribute" />
+ <xs:attribute name="object" type="beanAttribute" />
+ <xs:attribute name="border" type="beanAttribute" />
+ <xs:attribute name="content" type="beanAttribute" />
+ <xs:attribute name="hspace" type="beanAttribute" />
+ <xs:attribute name="vspace" type="beanAttribute" />
+ <xs:attribute name="scheme" type="beanAttribute" />
+
+</xs:schema>
\ No newline at end of file
Modified: branches/RF-7817/cdk/generator/src/main/resources/META-INF/schema/cdk-jstl-core.xsd
===================================================================
--- branches/RF-7817/cdk/generator/src/main/resources/META-INF/schema/cdk-jstl-core.xsd 2010-10-27 15:58:37 UTC (rev 19700)
+++ branches/RF-7817/cdk/generator/src/main/resources/META-INF/schema/cdk-jstl-core.xsd 2010-10-27 16:01:55 UTC (rev 19701)
@@ -26,7 +26,6 @@
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://jboss.org/schema/richfaces/cdk/jstl/core" xmlns="http://jboss.org/schema/richfaces/cdk/jstl/core"
- xmlns:cdk="http://jboss.org/schema/richfaces/cdk/core"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:annotation>
@@ -35,8 +34,29 @@
</xs:documentation>
</xs:annotation>
- <xs:import schemaLocation="cdk-template.xsd" namespace="http://jboss.org/schema/richfaces/cdk/core" />
+ <xs:simpleType name="elStrictExpression">
+ <xs:restriction base="xs:string">
+ <xs:pattern value="#\{[^\}]+\}" />
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="literalExpression">
+ <xs:restriction base="xs:string">
+ <!-- TODO -->
+ <xs:pattern value=".*" />
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="elMixedExpression">
+ <xs:restriction base="xs:string">
+ <xs:pattern value=".*#\{[^\}]+\}.*" />
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="elFreeformExpression">
+ <xs:restriction base="xs:string" />
+ </xs:simpleType>
+
<xs:complexType name="arbitraryContent" mixed="true">
<xs:choice>
<xs:any minOccurs="0" maxOccurs="unbounded" />
@@ -47,7 +67,7 @@
<xs:complexContent>
<xs:extension base="arbitraryContent">
<xs:attribute name="test" form="unqualified" use="required"
- type="cdk:elStrictExpression">
+ type="elStrictExpression">
<xs:annotation>
<xs:documentation>
<p>The test condition that determines whether or not the body content should be processed.</p>
@@ -111,14 +131,14 @@
<xs:complexType>
<xs:complexContent>
<xs:extension base="arbitraryContent">
- <xs:attribute name="items" type="cdk:elStrictExpression">
+ <xs:attribute name="items" type="elStrictExpression">
<xs:annotation>
<xs:documentation>
<p>Collection of items to iterate over.</p>
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="var" type="cdk:literalExpression">
+ <xs:attribute name="var" type="literalExpression">
<xs:annotation>
<xs:documentation>
<p>Name of the exported scoped variable for the current item of the iteration.
Modified: branches/RF-7817/cdk/generator/src/main/resources/META-INF/schema/cdk-template.xsd
===================================================================
--- branches/RF-7817/cdk/generator/src/main/resources/META-INF/schema/cdk-template.xsd 2010-10-27 15:58:37 UTC (rev 19700)
+++ branches/RF-7817/cdk/generator/src/main/resources/META-INF/schema/cdk-template.xsd 2010-10-27 16:01:55 UTC (rev 19701)
@@ -28,7 +28,9 @@
targetNamespace="http://jboss.org/schema/richfaces/cdk/core" xmlns="http://jboss.org/schema/richfaces/cdk/core"
elementFormDefault="qualified" attributeFormDefault="unqualified"
xmlns:xhtml="http://jboss.org/schema/richfaces/cdk/xhtml-el" xmlns:javaee="http://java.sun.com/xml/ns/javaee"
- xmlns:c="http://jboss.org/schema/richfaces/cdk/jstl/core" xmlns:cc="http://jboss.org/schema/richfaces/cdk/jsf/composite">
+ xmlns:c="http://jboss.org/schema/richfaces/cdk/jstl/core"
+ xmlns:cc="http://jboss.org/schema/richfaces/cdk/jsf/composite"
+ xmlns:x="http://jboss.org/schema/richfaces/cdk/ext">
<xs:annotation>
<xs:documentation>
@@ -36,33 +38,12 @@
</xs:documentation>
</xs:annotation>
- <xs:import schemaLocation="web-facesuicomponent_2_0.xsd" namespace="http://java.sun.com/xml/ns/javaee" />
+ <xs:import schemaLocation="http://java.sun.com/xml/ns/javaee/web-facesuicomponent_2_0.xsd" namespace="http://java.sun.com/xml/ns/javaee" />
<xs:import schemaLocation="cdk-composite.xsd" namespace="http://jboss.org/schema/richfaces/cdk/jsf/composite" />
<xs:import schemaLocation="cdk-jstl-core.xsd" namespace="http://jboss.org/schema/richfaces/cdk/jstl/core" />
+ <xs:import schemaLocation="cdk-extensions.xsd" namespace="http://jboss.org/schema/richfaces/cdk/ext" />
- <xs:simpleType name="elStrictExpression">
- <xs:restriction base="xs:string">
- <xs:pattern value="#\{[^\}]+\}" />
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="literalExpression">
- <xs:restriction base="xs:string">
- <!-- TODO -->
- <xs:pattern value=".*" />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="elMixedExpression">
- <xs:restriction base="xs:string">
- <xs:pattern value=".*#\{[^\}]+\}.*" />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="elFreeformExpression">
- <xs:restriction base="xs:string" />
- </xs:simpleType>
-
<xs:simpleType name="resourceDependencyTargets">
<xs:restriction base="xs:string">
<xs:enumeration value="body" />
@@ -145,8 +126,45 @@
</xs:simpleType>
</xs:attribute>
+ <xs:attribute name="passThrough">
+ <xs:annotation>
+ <xs:documentation>
+ <p>Enables pass-through rendering of attributes. Allows to define whitespace-separated list of attributes
+ to include. If component attribute name is different from default, the exact name can be added after colon.</p>
+ <p>
+ Examples:
+
+ <ul>
+ <li><code><![CDATA[<div cdk:passThrough="title style"></code>]]></code></li>
+ <li><code><![CDATA[<div cdk:passThrough="title:headTitle style">]]></code></li>
+ </ul>
+
+ <span class="usage">
+ Attributes already defined on the tag are automatically excluded from pass-through
+ rendering.
+ </span>
+ </p>
+ <p>If "disabled" attribute of the component is true (i.e. boolean true or "true"), then
+ attributes that have associated behavior events are not encoded.</p>
+ </xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:restriction>
+ <xs:simpleType>
+ <xs:list>
+ <xs:simpleType>
+ <xs:restriction base="xs:NMTOKEN" />
+ </xs:simpleType>
+ </xs:list>
+ </xs:simpleType>
+ <xs:minLength value="0" />
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+
<xs:attributeGroup name="core.attrs">
<xs:attribute ref="passThroughWithExclusions" />
+ <xs:attribute ref="passThrough" />
</xs:attributeGroup>
<xs:element name="root">
@@ -260,10 +278,11 @@
</li>
<li>
all content declared inside <code><![CDATA[<cdk:body>]]></code> tag is compiled into
- statements of <code>encodeChildren(...)</code> method.
+ statements of <code>encodeChildren(...)</code> method. If content of body element is empty,
+ no encodeChildren(...) method will be generated unless 'enforce' attribute set to true.
</li>
<li>
- all content declared before <code><![CDATA[<cdk:body>]]></code> tag is compiled into
+ all content declared after <code><![CDATA[<cdk:body>]]></code> tag is compiled into
statements of <code>encodeEnd(...)</code> method
</li>
</ul>
@@ -344,6 +363,39 @@
]]></pre>
<br /><br />
+ If you want to disable default encodeChildren method, use enforce attribute:
+ <pre><![CDATA[
+ ...
+ <cc:implementation>
+ <div id="myId">
+ <cdk:body enforce="true"/>
+ </div>
+ </cc:implementation>
+ ...
+ ]]></pre>
+ produces the following code (unsignificant details are ommitted):
+ <pre><![CDATA[
+ ...
+
+ encodeBegin(...) {
+ ...
+ writer.startElement("div", cc);
+ writer.writeAttribute("id", "myId", null);
+ }
+
+ encodeChildren(...) {
+ // empty method.
+ }
+
+ encodeEnd(...) {
+ ...
+ writer.endElement("div");
+ }
+
+ ...
+ ]]></pre>
+
+ <br /><br />
The following code snippet:
<pre><![CDATA[
...
@@ -374,11 +426,14 @@
<xs:choice>
<xs:any minOccurs="0" maxOccurs="unbounded" />
</xs:choice>
+ <xs:attribute name="enforce" type="xs:boolean"/>
</xs:complexType>
</xs:element>
<xs:element ref="c:if" />
<xs:element ref="c:choose" />
<xs:element ref="call" />
+ <xs:element ref="switch" />
+ <xs:element ref="object" />
</xs:choice>
</xs:group>
@@ -426,7 +481,7 @@
<xs:complexType mixed="true">
<xs:simpleContent>
<xs:extension base="xs:string">
- <xs:attribute name="name" form="unqualified" type="literalExpression" use="required">
+ <xs:attribute name="name" form="unqualified" type="c:literalExpression" use="required">
<xs:annotation>
<xs:documentation>
<p>Name of the variable, corresponding to Java identifier syntax.</p>
@@ -461,12 +516,13 @@
<xs:annotation>
<xs:documentation>
<p>Variable type name. CDK automatically resolves simple names for primitive types,
- JSF API classes and objects from java.lang.* or java.util.*.</p>
+ JSF API classes and objects from java.lang.* or java.util.*.
+ For parametrised types you can use java generics syntax </p>
<p>Examples:
<ul>
<li><code><![CDATA[<cdk:object type="java.lang.String" ...>]]></code></li>
<li><code><![CDATA[<cdk:object type="float" ...>]]></code></li>
- <li><code><![CDATA[<cdk:object type="List" ...>]]></code></li>
+ <li><code><![CDATA[<cdk:object type="List<String>" ...>]]></code></li>
<li><code><![CDATA[<cdk:object type="UIComponent" ...>]]></code></li>
</ul>
</p>
@@ -475,24 +531,6 @@
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="type-arguments" form="unqualified" type="xs:string">
- <xs:annotation>
- <xs:documentation>
- <p>Comma-separated list of generic type arguments for usage with types like
- java.util.List or java.util.Map.</p>
- <p>Examples:
- <ul>
- <li>
- <code><![CDATA[<cdk:object name="map" type="Map" type-arguments="String, Object" />]]></code>
- </li>
- <li>
- <code><![CDATA[<cdk:object name="list" type="List" type-arguments="UIComponent" />]]></code>
- </li>
- </ul>
- </p>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
@@ -541,7 +579,42 @@
</xs:complexType>
</xs:element>
</xs:sequence>
- <xs:attribute name="key" use="required" form="unqualified" type="elStrictExpression" />
+ <xs:attribute name="key" use="required" form="unqualified" type="c:elStrictExpression" />
</xs:complexType>
</xs:element>
+
+ <xs:element name="import">
+ <xs:complexType>
+ <xs:attribute type="xs:string" use="required" name="package" />
+ <xs:attribute type="xs:NMTOKENS" name="names" />
+ <xs:attribute type="xs:boolean" name="static" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="scriptObject">
+ <xs:complexType>
+ <xs:attribute type="xs:string" name="name" use="required" />
+ <xs:attribute type="c:elStrictExpression" name="base" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="scriptOption">
+ <xs:complexType>
+ <xs:attribute type="xs:NMTOKENS" name="attributes" />
+ <xs:attribute type="xs:NMTOKENS" name="variables" />
+ <xs:attribute type="xs:string" name="name" />
+ <xs:attribute type="c:elFreeformExpression" name="value" />
+ <xs:attribute type="c:literalExpression" name="defaultValue" />
+ <xs:attribute name="wrapper">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="noop" />
+ <xs:enumeration value="asArray" />
+ <xs:enumeration value="eventHandler" />
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+
</xs:schema>
Modified: branches/RF-7817/cdk/generator/src/main/resources/META-INF/schema/xhtml-el.xsd
===================================================================
--- branches/RF-7817/cdk/generator/src/main/resources/META-INF/schema/xhtml-el.xsd 2010-10-27 15:58:37 UTC (rev 19700)
+++ branches/RF-7817/cdk/generator/src/main/resources/META-INF/schema/xhtml-el.xsd 2010-10-27 16:01:55 UTC (rev 19701)
@@ -18,9 +18,10 @@
xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://jboss.org/schema/richfaces/cdk/xhtml-el"
xmlns="http://jboss.org/schema/richfaces/cdk/xhtml-el" xmlns:xml="http://www.w3.org/XML/1998/namespace"
elementFormDefault="qualified" xmlns:cdk="http://jboss.org/schema/richfaces/cdk/core"
- xmlns:cdk-addinfo="http://jboss.org/schema/richfaces/cdk/additional-attributes-info">
+ xmlns:cdk-addinfo="http://jboss.org/schema/richfaces/cdk/additional-attributes-info"
+ xmlns:c="http://jboss.org/schema/richfaces/cdk/jstl/core"
+ xmlns:x="http://jboss.org/schema/richfaces/cdk/ext">
- <xs:import schemaLocation="cdk-template.xsd" namespace="http://jboss.org/schema/richfaces/cdk/core" />
<xs:annotation>
<xs:documentation>
@@ -80,6 +81,10 @@
</xs:documentation>
</xs:annotation>
+ <xs:import schemaLocation="cdk-template.xsd" namespace="http://jboss.org/schema/richfaces/cdk/core" />
+ <xs:import schemaLocation="cdk-jstl-core.xsd" namespace="http://jboss.org/schema/richfaces/cdk/jstl/core" />
+ <xs:import schemaLocation="cdk-extensions.xsd" namespace="http://jboss.org/schema/richfaces/cdk/ext" />
+
<xs:annotation>
<xs:documentation>
================== Imported Names
@@ -93,7 +98,7 @@
media type, as per [RFC2045]
</xs:documentation>
</xs:annotation>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
<xs:simpleType name="ContentTypes">
@@ -103,7 +108,7 @@
[RFC2045]
</xs:documentation>
</xs:annotation>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
<xs:simpleType name="Charset">
@@ -112,7 +117,7 @@
a character encoding, as per [RFC2045]
</xs:documentation>
</xs:annotation>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
<xs:simpleType name="Charsets">
@@ -122,7 +127,7 @@
per [RFC2045]
</xs:documentation>
</xs:annotation>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
<xs:simpleType name="LanguageCode">
@@ -131,7 +136,7 @@
a language code, as per [RFC3066]
</xs:documentation>
</xs:annotation>
- <xs:union memberTypes="xs:language cdk:elMixedExpression" />
+ <xs:union memberTypes="xs:language c:elMixedExpression" />
</xs:simpleType>
<xs:simpleType name="Character">
@@ -148,7 +153,7 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
</xs:union>
</xs:simpleType>
@@ -165,7 +170,7 @@
one or more digits
</xs:documentation>
</xs:annotation>
- <xs:union memberTypes="simpleType.Number cdk:elMixedExpression" />
+ <xs:union memberTypes="simpleType.Number c:elMixedExpression" />
</xs:simpleType>
<xs:simpleType name="tabindexNumber">
@@ -188,7 +193,7 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elMixedExpression" />
+ <xs:restriction base="c:elMixedExpression" />
</xs:simpleType>
</xs:union>
</xs:simpleType>
@@ -199,7 +204,7 @@
space-separated list of link types
</xs:documentation>
</xs:annotation>
- <xs:union memberTypes="xs:NMTOKENS cdk:elMixedExpression" />
+ <xs:union memberTypes="xs:NMTOKENS c:elMixedExpression" />
</xs:simpleType>
<xs:simpleType name="MediaDesc">
@@ -215,7 +220,7 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
</xs:union>
</xs:simpleType>
@@ -226,7 +231,7 @@
a Uniform Resource Identifier, see [RFC2396]
</xs:documentation>
</xs:annotation>
- <xs:union memberTypes="xs:anyURI cdk:elMixedExpression" />
+ <xs:union memberTypes="xs:anyURI c:elMixedExpression" />
</xs:simpleType>
<xs:simpleType name="UriList">
@@ -236,7 +241,7 @@
Identifiers
</xs:documentation>
</xs:annotation>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
<xs:simpleType name="Datetime">
@@ -245,7 +250,7 @@
date and time information. ISO date format
</xs:documentation>
</xs:annotation>
- <xs:union memberTypes="xs:dateTime cdk:elMixedExpression" />
+ <xs:union memberTypes="xs:dateTime c:elMixedExpression" />
</xs:simpleType>
<xs:simpleType name="Script">
@@ -254,7 +259,7 @@
script expression
</xs:documentation>
</xs:annotation>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
<xs:simpleType name="StyleSheet">
@@ -263,7 +268,7 @@
style sheet data
</xs:documentation>
</xs:annotation>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
<xs:simpleType name="Text">
@@ -272,7 +277,7 @@
used for titles etc.
</xs:documentation>
</xs:annotation>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
<xs:simpleType name="FrameTarget">
@@ -288,7 +293,7 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
</xs:union>
</xs:simpleType>
@@ -306,7 +311,7 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
</xs:union>
</xs:simpleType>
@@ -324,7 +329,7 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
</xs:union>
</xs:simpleType>
@@ -335,7 +340,7 @@
integer representing length in pixels
</xs:documentation>
</xs:annotation>
- <xs:union memberTypes="xs:nonNegativeInteger cdk:elMixedExpression" />
+ <xs:union memberTypes="xs:nonNegativeInteger c:elMixedExpression" />
</xs:simpleType>
<xs:annotation>
@@ -355,7 +360,7 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
</xs:union>
</xs:simpleType>
@@ -373,7 +378,7 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
</xs:union>
</xs:simpleType>
@@ -395,7 +400,7 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
</xs:union>
</xs:simpleType>
@@ -428,26 +433,26 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
</xs:union>
</xs:simpleType>
<!-- TODO: add constraints -->
<xs:simpleType name="ID">
- <xs:union memberTypes="xs:ID cdk:elMixedExpression" />
+ <xs:union memberTypes="xs:ID c:elMixedExpression" />
</xs:simpleType>
<xs:simpleType name="IDREF">
- <xs:union memberTypes="xs:IDREF cdk:elMixedExpression" />
+ <xs:union memberTypes="xs:IDREF c:elMixedExpression" />
</xs:simpleType>
<xs:simpleType name="IDREFS">
- <xs:union memberTypes="xs:IDREFS cdk:elMixedExpression" />
+ <xs:union memberTypes="xs:IDREFS c:elMixedExpression" />
</xs:simpleType>
<xs:simpleType name="NMTOKEN">
- <xs:union memberTypes="xs:NMTOKEN cdk:elMixedExpression" />
+ <xs:union memberTypes="xs:NMTOKEN c:elMixedExpression" />
</xs:simpleType>
<xs:simpleType name="NMTOKENS">
- <xs:union memberTypes="xs:NMTOKENS cdk:elMixedExpression" />
+ <xs:union memberTypes="xs:NMTOKENS c:elMixedExpression" />
</xs:simpleType>
<xs:annotation>
@@ -466,6 +471,7 @@
</xs:appinfo>
</xs:annotation>
</xs:attribute>
+ <xs:attribute ref="x:class"/>
</xs:attributeGroup>
<xs:attributeGroup name="coreattrs">
@@ -484,6 +490,7 @@
<xs:attribute name="id" type="ID" />
<xs:attribute name="style" type="StyleSheet" />
<xs:attribute name="title" type="Text" />
+ <xs:attributeGroup ref="x:coreattrs" />
</xs:attributeGroup>
<xs:simpleType name="simpleType.dir">
@@ -509,9 +516,10 @@
<xs:attribute ref="xml:lang" />
<xs:attribute name="dir">
<xs:simpleType>
- <xs:union memberTypes="simpleType.dir cdk:elMixedExpression" />
+ <xs:union memberTypes="simpleType.dir c:elMixedExpression" />
</xs:simpleType>
</xs:attribute>
+ <xs:attributeGroup ref="x:i18n" />
</xs:attributeGroup>
<xs:attributeGroup name="events">
@@ -543,6 +551,7 @@
<xs:attribute name="onkeypress" type="Script" />
<xs:attribute name="onkeydown" type="Script" />
<xs:attribute name="onkeyup" type="Script" />
+ <xs:attributeGroup ref="x:events" />
</xs:attributeGroup>
<xs:attributeGroup name="focus">
@@ -561,6 +570,7 @@
<xs:attribute name="tabindex" type="tabindexNumber" />
<xs:attribute name="onfocus" type="Script" />
<xs:attribute name="onblur" type="Script" />
+ <xs:attributeGroup ref="x:focus" />
</xs:attributeGroup>
<xs:attributeGroup name="attrs">
@@ -588,11 +598,12 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
</xs:union>
</xs:simpleType>
</xs:attribute>
+ <xs:attribute ref="x:align"/>
</xs:attributeGroup>
<xs:annotation>
@@ -868,7 +879,19 @@
<xs:attribute default="rect" name="shape" type="Shape"></xs:attribute>
<xs:attribute name="coords" type="Coords"></xs:attribute>
<xs:attribute name="target" type="FrameTarget"></xs:attribute>
- <xs:attributeGroup ref="cdk:core.attrs" />
+
+ <xs:attribute ref="x:charset" ></xs:attribute>
+ <xs:attribute ref="x:type" ></xs:attribute>
+ <xs:attribute ref="x:name" ></xs:attribute>
+ <xs:attribute ref="x:href" ></xs:attribute>
+ <xs:attribute ref="x:hreflang" ></xs:attribute>
+ <xs:attribute ref="x:rel" ></xs:attribute>
+ <xs:attribute ref="x:rev" ></xs:attribute>
+ <xs:attribute ref="x:shape" ></xs:attribute>
+ <xs:attribute ref="x:coords" ></xs:attribute>
+ <xs:attribute ref="x:target" ></xs:attribute>
+
+ <xs:attributeGroup ref="cdk:core.attrs" />
</xs:complexType>
<xs:group name="a.children">
@@ -1126,7 +1149,7 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
</xs:union>
</xs:simpleType>
@@ -1144,7 +1167,7 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
</xs:union>
</xs:simpleType>
@@ -1331,7 +1354,7 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
</xs:union>
</xs:simpleType>
@@ -1346,11 +1369,12 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
</xs:union>
</xs:simpleType>
</xs:attribute>
+ <xs:attribute ref="x:compact" />
</xs:attributeGroup>
<xs:element name="ul" type="ul.content">
@@ -1380,7 +1404,7 @@
first list item in an ordered list.
</xs:documentation>
</xs:annotation>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
<xs:element name="ol" type="ol.content">
@@ -1413,7 +1437,7 @@
LIStyle is constrained to: "(ULStyle|OLStyle)"
</xs:documentation>
</xs:annotation>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
<xs:element name="li">
@@ -1640,14 +1664,14 @@
<xs:attributeGroup ref="events" />
<xs:attribute name="lang" type="LanguageCode" />
<xs:attribute ref="xml:lang" />
- <xs:attribute name="dir" use="required">
+ <xs:attribute name="dir" use="optional">
<xs:annotation>
<xs:appinfo>
<cdk-addinfo:default-value>ltr</cdk-addinfo:default-value>
</xs:appinfo>
</xs:annotation>
<xs:simpleType>
- <xs:union memberTypes="simpleType.dir cdk:elMixedExpression" />
+ <xs:union memberTypes="simpleType.dir c:elMixedExpression" />
</xs:simpleType>
</xs:attribute>
</xs:extension>
@@ -1824,6 +1848,7 @@
<xs:extension base="Inline">
<xs:attributeGroup ref="attrs" />
<xs:attribute name="cite" type="URI" />
+ <xs:attribute ref="x:cite" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
@@ -2001,6 +2026,10 @@
<xs:attribute name="size" />
<xs:attribute name="color" type="Color" />
<xs:attribute name="face" />
+
+ <xs:attribute ref="x:size" />
+ <xs:attribute ref="x:color" />
+ <xs:attribute ref="x:face" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
@@ -2098,7 +2127,7 @@
<xs:complexContent>
<xs:extension base="form.content">
<xs:attributeGroup ref="attrs" />
- <xs:attribute name="action" use="required" type="URI" />
+ <xs:attribute name="action" use="optional" type="URI" />
<xs:attribute name="method" default="get">
<xs:simpleType>
<xs:union>
@@ -2109,7 +2138,7 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
</xs:union>
</xs:simpleType>
@@ -2121,6 +2150,16 @@
<xs:attribute name="accept" type="ContentTypes" />
<xs:attribute name="accept-charset" type="Charsets" />
<xs:attribute name="target" type="FrameTarget" />
+
+ <xs:attribute ref="x:action" />
+ <xs:attribute ref="x:method" ></xs:attribute>
+ <xs:attribute ref="x:enctype" />
+ <xs:attribute ref="x:onsubmit" />
+ <xs:attribute ref="x:onreset" />
+ <xs:attribute ref="x:accept" />
+ <xs:attribute ref="x:accept-charset" />
+ <xs:attribute ref="x:target" />
+
</xs:extension>
</xs:complexContent>
</xs:complexType>
@@ -2141,6 +2180,12 @@
<xs:attribute name="accesskey" type="Character" />
<xs:attribute name="onfocus" type="Script" />
<xs:attribute name="onblur" type="Script" />
+
+ <xs:attribute ref="x:for" />
+ <xs:attribute ref="x:accesskey" />
+ <xs:attribute ref="x:onfocus" />
+ <xs:attribute ref="x:onblur" />
+
</xs:extension>
</xs:complexContent>
</xs:complexType>
@@ -2163,7 +2208,7 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
</xs:union>
</xs:simpleType>
@@ -2178,11 +2223,12 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
</xs:union>
</xs:simpleType>
</xs:attribute>
+ <xs:attribute ref="x:checked" />
</xs:attributeGroup>
<xs:attributeGroup name="disabledGroup">
@@ -2195,11 +2241,12 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
</xs:union>
</xs:simpleType>
</xs:attribute>
+ <xs:attribute ref="x:disabled"></xs:attribute>
</xs:attributeGroup>
<xs:attributeGroup name="readonlyGroup">
@@ -2212,11 +2259,12 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
</xs:union>
</xs:simpleType>
</xs:attribute>
+ <xs:attribute ref="x:readonly"></xs:attribute>
</xs:attributeGroup>
<xs:element name="input" type="input.content">
@@ -2286,7 +2334,7 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
</xs:union>
</xs:simpleType>
@@ -2334,11 +2382,16 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
</xs:union>
</xs:simpleType>
</xs:attribute>
+
+ <xs:attribute ref="x:name" />
+ <xs:attribute ref="x:value" />
+ <xs:attribute ref="x:type" />
+
</xs:extension>
</xs:complexContent>
</xs:complexType>
@@ -2392,7 +2445,7 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
</xs:union>
</xs:simpleType>
@@ -2419,7 +2472,7 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
</xs:union>
</xs:simpleType>
@@ -2439,7 +2492,7 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
</xs:union>
</xs:simpleType>
@@ -2466,13 +2519,18 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
</xs:union>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="char" type="Character" />
<xs:attribute name="charoff" type="Length" />
+
+ <xs:attribute ref="x:align"/>
+ <xs:attribute ref="x:char"/>
+ <xs:attribute ref="x:charoff"/>
+
</xs:attributeGroup>
<xs:attributeGroup name="cellvalign">
@@ -2493,11 +2551,12 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
</xs:union>
</xs:simpleType>
</xs:attribute>
+ <xs:attribute ref="x:valign"/>
</xs:attributeGroup>
<xs:element name="table" type="table.content">
@@ -2514,7 +2573,7 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elFreeformExpression" />
+ <xs:restriction base="c:elFreeformExpression" />
</xs:simpleType>
</xs:union>
</xs:simpleType>
@@ -2607,7 +2666,7 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elMixedExpression" />
+ <xs:restriction base="c:elMixedExpression" />
</xs:simpleType>
</xs:union>
</xs:simpleType>
@@ -2629,11 +2688,12 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elMixedExpression" />
+ <xs:restriction base="c:elMixedExpression" />
</xs:simpleType>
</xs:union>
</xs:simpleType>
</xs:attribute>
+ <xs:attribute ref="x:nowrap" />
</xs:attributeGroup>
<xs:element name="th">
@@ -2711,12 +2771,24 @@
<xs:attribute name="object" type="xs:anySimpleType"></xs:attribute>
<xs:attribute name="alt" type="Text"></xs:attribute>
<xs:attribute name="name" type="NMTOKEN"></xs:attribute>
- <xs:attribute use="required" name="width" type="Length"></xs:attribute>
- <xs:attribute use="required" name="height" type="Length"></xs:attribute>
+ <xs:attribute use="optional" name="width" type="Length"></xs:attribute>
+ <xs:attribute use="optional" name="height" type="Length"></xs:attribute>
<xs:attribute name="align" type="ImgAlign"></xs:attribute>
<xs:attribute name="hspace" type="Pixels"></xs:attribute>
<xs:attribute name="vspace" type="Pixels"></xs:attribute>
<xs:attributeGroup ref="cdk:core.attrs" />
+
+ <xs:attribute ref="x:codebase" ></xs:attribute>
+ <xs:attribute ref="x:archive" ></xs:attribute>
+ <xs:attribute ref="x:code" ></xs:attribute>
+ <xs:attribute ref="x:object" ></xs:attribute>
+ <xs:attribute ref="x:alt" ></xs:attribute>
+ <xs:attribute ref="x:name" ></xs:attribute>
+ <xs:attribute ref="x:width" ></xs:attribute>
+ <xs:attribute ref="x:height" ></xs:attribute>
+ <xs:attribute ref="x:align" ></xs:attribute>
+ <xs:attribute ref="x:hspace" ></xs:attribute>
+ <xs:attribute ref="x:vspace" ></xs:attribute>
</xs:complexType>
<xs:group name="applet.children">
@@ -2753,28 +2825,47 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elMixedExpression"></xs:restriction>
+ <xs:restriction base="c:elMixedExpression"></xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
</xs:attribute>
- <xs:attribute use="required" name="alt" type="Text"></xs:attribute>
+
+ <xs:attribute use="optional" name="alt" type="Text"></xs:attribute>
<xs:attribute name="target" type="FrameTarget"></xs:attribute>
<xs:attributeGroup ref="cdk:core.attrs" />
+
+ <xs:attribute ref="x:alt" ></xs:attribute>
+ <xs:attribute ref="x:target" ></xs:attribute>
+ <xs:attribute ref="x:shape" ></xs:attribute>
+ <xs:attribute ref="x:coords" ></xs:attribute>
+ <xs:attribute ref="x:href" ></xs:attribute>
+ <xs:attribute ref="x:nohref"></xs:attribute>
+
</xs:complexType>
<xs:complexType name="base.content">
<xs:group ref="cdk:structural" minOccurs="0" maxOccurs="unbounded" />
<xs:attribute name="id" type="ID"></xs:attribute>
<xs:attribute name="href" type="URI"></xs:attribute>
<xs:attribute name="target" type="FrameTarget"></xs:attribute>
+
+ <xs:attribute ref="x:id" ></xs:attribute>
+ <xs:attribute ref="x:href" ></xs:attribute>
+ <xs:attribute ref="x:target" ></xs:attribute>
+
<xs:attributeGroup ref="cdk:core.attrs" />
</xs:complexType>
<xs:complexType name="basefont.content">
<xs:group ref="cdk:structural" minOccurs="0" maxOccurs="unbounded" />
<xs:attribute name="id" type="ID" />
- <xs:attribute use="required" name="size" type="xs:anySimpleType" />
+ <xs:attribute use="optional" name="size" type="xs:anySimpleType" />
<xs:attribute name="color" type="Color" />
<xs:attribute name="face" type="xs:anySimpleType" />
+
+ <xs:attribute ref="x:id" />
+ <xs:attribute ref="x:size" />
+ <xs:attribute ref="x:color" />
+ <xs:attribute ref="x:face" />
<xs:attributeGroup ref="cdk:core.attrs" />
</xs:complexType>
<xs:complexType name="br.content">
@@ -2792,11 +2883,12 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elMixedExpression"></xs:restriction>
+ <xs:restriction base="c:elMixedExpression"></xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
</xs:attribute>
+ <xs:attribute ref="x:clear" />
<xs:attributeGroup ref="cdk:core.attrs" />
</xs:complexType>
<xs:complexType name="col.content">
@@ -2806,6 +2898,10 @@
<xs:attribute name="width" type="MultiLength"></xs:attribute>
<xs:attributeGroup ref="cellhalign"></xs:attributeGroup>
<xs:attributeGroup ref="cellvalign"></xs:attributeGroup>
+
+ <xs:attribute ref="x:span" />
+ <xs:attribute ref="x:width" />
+
<xs:attributeGroup ref="cdk:core.attrs" />
</xs:complexType>
<xs:complexType name="colgroup.content">
@@ -2815,6 +2911,9 @@
<xs:attribute name="width" type="MultiLength" />
<xs:attributeGroup ref="cellhalign" />
<xs:attributeGroup ref="cellvalign" />
+
+ <xs:attribute ref="x:span" />
+ <xs:attribute ref="x:width" />
<xs:attributeGroup ref="cdk:core.attrs" />
</xs:complexType>
<xs:group name="colgroup.children">
@@ -2885,6 +2984,9 @@
<xs:attributeGroup ref="i18n"></xs:attributeGroup>
<xs:attribute name="id" type="ID"></xs:attribute>
<xs:attribute name="profile" type="URI"></xs:attribute>
+
+ <xs:attribute ref="x:id" />
+ <xs:attribute ref="x:profile" />
<xs:attributeGroup ref="cdk:core.attrs" />
</xs:complexType>
@@ -2923,7 +3025,7 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elMixedExpression"></xs:restriction>
+ <xs:restriction base="c:elMixedExpression"></xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
@@ -2937,19 +3039,24 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elMixedExpression"></xs:restriction>
+ <xs:restriction base="c:elMixedExpression"></xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="size" type="Pixels"></xs:attribute>
<xs:attribute name="width" type="Length"></xs:attribute>
+
+ <xs:attribute ref="x:size" />
+ <xs:attribute ref="x:width" />
<xs:attributeGroup ref="cdk:core.attrs" />
</xs:complexType>
<xs:complexType name="html.content">
<xs:group ref="html.children" />
<xs:attributeGroup ref="i18n"></xs:attributeGroup>
<xs:attribute name="id" type="ID"></xs:attribute>
+
+ <xs:attribute ref="x:id" />
<xs:attributeGroup ref="cdk:core.attrs" />
</xs:complexType>
<xs:group name="html.children">
@@ -2962,8 +3069,8 @@
<xs:complexType name="img.content">
<xs:group ref="cdk:structural" minOccurs="0" maxOccurs="unbounded" />
<xs:attributeGroup ref="attrs"></xs:attributeGroup>
- <xs:attribute use="required" name="src" type="URI"></xs:attribute>
- <xs:attribute use="required" name="alt" type="Text">
+ <xs:attribute use="optional" name="src" type="URI"></xs:attribute>
+ <xs:attribute use="optional" name="alt" type="Text">
<xs:annotation>
<xs:appinfo>
<cdk-addinfo:default-value></cdk-addinfo:default-value>
@@ -2986,7 +3093,7 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elMixedExpression"></xs:restriction>
+ <xs:restriction base="c:elMixedExpression"></xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
@@ -2995,6 +3102,18 @@
<xs:attribute name="border" type="Length"></xs:attribute>
<xs:attribute name="hspace" type="Pixels"></xs:attribute>
<xs:attribute name="vspace" type="Pixels"></xs:attribute>
+
+ <xs:attribute ref="x:src" ></xs:attribute>
+ <xs:attribute ref="x:alt" ></xs:attribute>
+ <xs:attribute ref="x:name" ></xs:attribute>
+ <xs:attribute ref="x:longdesc" ></xs:attribute>
+ <xs:attribute ref="x:height" ></xs:attribute>
+ <xs:attribute ref="x:width" ></xs:attribute>
+ <xs:attribute ref="x:usemap" ></xs:attribute>
+ <xs:attribute ref="x:align" ></xs:attribute>
+ <xs:attribute ref="x:border" ></xs:attribute>
+ <xs:attribute ref="x:hspace" ></xs:attribute>
+ <xs:attribute ref="x:vspace" ></xs:attribute>
<xs:attributeGroup ref="cdk:core.attrs" />
</xs:complexType>
<xs:complexType name="input.content">
@@ -3018,6 +3137,20 @@
<xs:attribute name="onchange" type="Script"></xs:attribute>
<xs:attribute name="accept" type="ContentTypes"></xs:attribute>
<xs:attribute name="align" type="ImgAlign"></xs:attribute>
+
+ <xs:attribute ref="x:type" ></xs:attribute>
+ <xs:attribute ref="x:name" ></xs:attribute>
+ <xs:attribute ref="x:value" ></xs:attribute>
+ <xs:attribute ref="x:size" ></xs:attribute>
+ <xs:attribute ref="x:maxlength" ></xs:attribute>
+ <xs:attribute ref="x:src" ></xs:attribute>
+ <xs:attribute ref="x:alt" ></xs:attribute>
+ <xs:attribute ref="x:usemap" ></xs:attribute>
+ <xs:attribute ref="x:onselect" ></xs:attribute>
+ <xs:attribute ref="x:onchange" ></xs:attribute>
+ <xs:attribute ref="x:accept" ></xs:attribute>
+ <xs:attribute ref="x:align" ></xs:attribute>
+
<xs:attributeGroup ref="cdk:core.attrs" />
</xs:complexType>
<xs:complexType name="isindex.content">
@@ -3038,6 +3171,15 @@
<xs:attribute name="rev" type="LinkTypes"></xs:attribute>
<xs:attribute name="media" type="MediaDesc"></xs:attribute>
<xs:attribute name="target" type="FrameTarget"></xs:attribute>
+
+ <xs:attribute ref="x:charset" ></xs:attribute>
+ <xs:attribute ref="x:href" ></xs:attribute>
+ <xs:attribute ref="x:hreflang" ></xs:attribute>
+ <xs:attribute ref="x:type" ></xs:attribute>
+ <xs:attribute ref="x:rel" ></xs:attribute>
+ <xs:attribute ref="x:rev" ></xs:attribute>
+ <xs:attribute ref="x:media" ></xs:attribute>
+ <xs:attribute ref="x:target" ></xs:attribute>
<xs:attributeGroup ref="cdk:core.attrs" />
</xs:complexType>
<xs:complexType name="map.content">
@@ -3045,10 +3187,15 @@
<xs:attributeGroup ref="i18n"></xs:attributeGroup>
<xs:attributeGroup ref="events"></xs:attributeGroup>
<xs:attributeGroup ref="classGroup" />
- <xs:attribute use="required" name="id" type="ID" />
+ <xs:attribute use="optional" name="id" type="ID" />
<xs:attribute name="style" type="StyleSheet" />
<xs:attribute name="title" type="Text" />
<xs:attribute name="name" type="xs:anySimpleType" />
+
+ <xs:attribute ref="x:id" />
+ <xs:attribute ref="x:style" />
+ <xs:attribute ref="x:title" />
+ <xs:attribute ref="x:name" />
<xs:attributeGroup ref="cdk:core.attrs" />
</xs:complexType>
@@ -3091,9 +3238,16 @@
<xs:attribute name="id" type="ID"></xs:attribute>
<xs:attribute name="http-equiv" type="xs:anySimpleType"></xs:attribute>
<xs:attribute name="name" type="xs:anySimpleType"></xs:attribute>
- <xs:attribute use="required" name="content" type="xs:anySimpleType">
+ <xs:attribute use="optional" name="content" type="xs:anySimpleType">
</xs:attribute>
<xs:attribute name="scheme" type="xs:anySimpleType"></xs:attribute>
+
+ <xs:attribute ref="x:id" ></xs:attribute>
+ <xs:attribute ref="x:http-equiv" ></xs:attribute>
+ <xs:attribute ref="x:name" ></xs:attribute>
+ <xs:attribute ref="x:content" >
+ </xs:attribute>
+ <xs:attribute ref="x:scheme" ></xs:attribute>
<xs:attributeGroup ref="cdk:core.attrs" />
</xs:complexType>
<xs:complexType name="object.content" mixed="true">
@@ -3108,7 +3262,7 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elMixedExpression"></xs:restriction>
+ <xs:restriction base="c:elMixedExpression"></xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
@@ -3172,7 +3326,7 @@
<xs:group ref="optgroup.children" />
<xs:attributeGroup ref="attrs"></xs:attributeGroup>
<xs:attributeGroup ref="disabledGroup" />
- <xs:attribute use="required" name="label" type="Text"></xs:attribute>
+ <xs:attribute use="optional" name="label" type="Text"></xs:attribute>
<xs:attributeGroup ref="cdk:core.attrs" />
</xs:complexType>
@@ -3196,7 +3350,7 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elMixedExpression"></xs:restriction>
+ <xs:restriction base="c:elMixedExpression"></xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
@@ -3208,7 +3362,7 @@
<xs:complexType name="param.content">
<xs:group ref="cdk:structural" minOccurs="0" maxOccurs="unbounded" />
<xs:attribute name="id" type="ID"></xs:attribute>
- <xs:attribute use="required" name="name" type="xs:anySimpleType">
+ <xs:attribute use="optional" name="name" type="xs:anySimpleType">
</xs:attribute>
<xs:attribute name="value" type="xs:anySimpleType"></xs:attribute>
<xs:attribute default="data" name="valuetype">
@@ -3222,7 +3376,7 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elMixedExpression"></xs:restriction>
+ <xs:restriction base="c:elMixedExpression"></xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
@@ -3234,7 +3388,7 @@
<xs:group ref="cdk:structural" minOccurs="0" maxOccurs="unbounded" />
<xs:attribute name="id" type="ID"></xs:attribute>
<xs:attribute name="charset" type="Charset"></xs:attribute>
- <xs:attribute use="required" name="type" type="ContentType"></xs:attribute>
+ <xs:attribute use="optional" name="type" type="ContentType"></xs:attribute>
<xs:attribute name="language" type="xs:anySimpleType"></xs:attribute>
<xs:attribute name="src" type="URI"></xs:attribute>
<xs:attribute name="defer">
@@ -3246,7 +3400,7 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elMixedExpression"></xs:restriction>
+ <xs:restriction base="c:elMixedExpression"></xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
@@ -3269,7 +3423,7 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
- <xs:restriction base="cdk:elMixedExpression" />
+ <xs:restriction base="c:elMixedExpression" />
</xs:simpleType>
</xs:union>
</xs:simpleType>
@@ -3295,7 +3449,7 @@
<xs:group ref="cdk:structural" minOccurs="0" maxOccurs="unbounded" />
<xs:attributeGroup ref="i18n"></xs:attributeGroup>
<xs:attribute name="id" type="ID"></xs:attribute>
- <xs:attribute use="required" name="type" type="ContentType"></xs:attribute>
+ <xs:attribute use="optional" name="type" type="ContentType"></xs:attribute>
<xs:attribute name="media" type="MediaDesc"></xs:attribute>
<xs:attribute name="title" type="Text"></xs:attribute>
<xs:attribute fixed="preserve" ref="xml:space"></xs:attribute>
@@ -3357,11 +3511,17 @@
<xs:attributeGroup ref="focus"></xs:attributeGroup>
<xs:attributeGroup ref="disabledGroup" />
<xs:attribute name="name" type="xs:anySimpleType"></xs:attribute>
- <xs:attribute use="required" name="rows" type="Number"></xs:attribute>
- <xs:attribute use="required" name="cols" type="Number"></xs:attribute>
+ <xs:attribute use="optional" name="rows" type="Number"></xs:attribute>
+ <xs:attribute use="optional" name="cols" type="Number"></xs:attribute>
<xs:attributeGroup ref="readonlyGroup" />
<xs:attribute name="onselect" type="Script"></xs:attribute>
<xs:attribute name="onchange" type="Script"></xs:attribute>
+
+ <xs:attribute ref="x:name" ></xs:attribute>
+ <xs:attribute ref="x:rows" ></xs:attribute>
+ <xs:attribute ref="x:cols" ></xs:attribute>
+ <xs:attribute ref="x:onselect" ></xs:attribute>
+ <xs:attribute ref="x:onchange" ></xs:attribute>
<xs:attributeGroup ref="cdk:core.attrs" />
</xs:complexType>
<xs:complexType name="tfoot.content">
@@ -3398,6 +3558,7 @@
<xs:group ref="cdk:structural" minOccurs="0" maxOccurs="unbounded" />
<xs:attributeGroup ref="i18n"></xs:attributeGroup>
<xs:attribute name="id" type="ID"></xs:attribute>
+ <xs:attribute ref="x:id"></xs:attribute>
<xs:attributeGroup ref="cdk:core.attrs" />
</xs:complexType>
@@ -3407,6 +3568,8 @@
<xs:attributeGroup ref="cellhalign"></xs:attributeGroup>
<xs:attributeGroup ref="cellvalign"></xs:attributeGroup>
<xs:attribute name="bgcolor" type="Color"></xs:attribute>
+
+ <xs:attribute ref="x:bgcolor"></xs:attribute>
<xs:attributeGroup ref="cdk:core.attrs" />
</xs:complexType>
@@ -3425,6 +3588,8 @@
<xs:attributeGroup ref="attrs" />
<xs:attribute name="type" type="ULStyle" />
<xs:attributeGroup ref="compactGroup" />
+
+ <xs:attribute ref="x:type"></xs:attribute>
<xs:attributeGroup ref="cdk:core.attrs" />
</xs:complexType>
Modified: branches/RF-7817/cdk/generator/src/main/resources/META-INF/templates/component.ftl
===================================================================
--- branches/RF-7817/cdk/generator/src/main/resources/META-INF/templates/component.ftl 2010-10-27 15:58:37 UTC (rev 19700)
+++ branches/RF-7817/cdk/generator/src/main/resources/META-INF/templates/component.ftl 2010-10-27 16:01:55 UTC (rev 19701)
@@ -18,7 +18,6 @@
import javax.el.MethodExpression;
import javax.el.ValueExpression;
import javax.faces.component.StateHelper;
-import org.richfaces.component.PartialStateHolderHelper;
import ${baseClass};
<#include "_attributes_import.ftl">
Copied: branches/RF-7817/cdk/generator/src/main/resources/META-INF/templates/java/add-attributes-to-script-hash.ftl (from rev 19674, trunk/cdk/generator/src/main/resources/META-INF/templates/java/add-attributes-to-script-hash.ftl)
===================================================================
--- branches/RF-7817/cdk/generator/src/main/resources/META-INF/templates/java/add-attributes-to-script-hash.ftl (rev 0)
+++ branches/RF-7817/cdk/generator/src/main/resources/META-INF/templates/java/add-attributes-to-script-hash.ftl 2010-10-27 16:01:55 UTC (rev 19701)
@@ -0,0 +1,5 @@
+<@util.require "ADD_TO_SCRIPT_HASH_ATTRIBUTES"/>
+
+<@util.attributesField "${fieldName}" attributes />
+
+${ADD_TO_SCRIPT_HASH_ATTRIBUTES}(${parent.name}, ${facesContextVariable}, ${componentVariable}, ${fieldName}, <#if wrapper?exists>ScriptHashVariableWrapper.${wrapper}<#else>null</#if>);
\ No newline at end of file
Modified: branches/RF-7817/cdk/generator/src/main/resources/META-INF/templates/java/class.ftl
===================================================================
--- branches/RF-7817/cdk/generator/src/main/resources/META-INF/templates/java/class.ftl 2010-10-27 15:58:37 UTC (rev 19700)
+++ branches/RF-7817/cdk/generator/src/main/resources/META-INF/templates/java/class.ftl 2010-10-27 16:01:55 UTC (rev 19701)
@@ -1,7 +1,7 @@
package ${package.name};
<#list imports as import><#if !import.default >
-import ${import.name};
+import<#if import.static> static</#if> ${import.name};
</#if></#list>
<@renderCommonJavaElementStuff element=.data_model />class ${simpleName} <#if superClass.name != 'java.lang.Object'>extends ${superClass.simpleName} </#if>{
Copied: branches/RF-7817/cdk/generator/src/main/resources/META-INF/templates/java/script-object.ftl (from rev 19674, trunk/cdk/generator/src/main/resources/META-INF/templates/java/script-object.ftl)
===================================================================
--- branches/RF-7817/cdk/generator/src/main/resources/META-INF/templates/java/script-object.ftl (rev 0)
+++ branches/RF-7817/cdk/generator/src/main/resources/META-INF/templates/java/script-object.ftl 2010-10-27 16:01:55 UTC (rev 19701)
@@ -0,0 +1,4 @@
+${type} ${name} = new ${implementationType}(<#if base?exists>${base}</#if>);
+<#list statements as subStatement>
+${subStatement.code}
+</#list>
\ No newline at end of file
Copied: branches/RF-7817/cdk/generator/src/main/resources/META-INF/templates/java/script-option.ftl (from rev 19674, trunk/cdk/generator/src/main/resources/META-INF/templates/java/script-option.ftl)
===================================================================
--- branches/RF-7817/cdk/generator/src/main/resources/META-INF/templates/java/script-option.ftl (rev 0)
+++ branches/RF-7817/cdk/generator/src/main/resources/META-INF/templates/java/script-option.ftl 2010-10-27 16:01:55 UTC (rev 19701)
@@ -0,0 +1,2 @@
+<@util.require "ADD_TO_SCRIPT_HASH" />
+${ADD_TO_SCRIPT_HASH}(${parent.name}, "${name}", ${value}, <#if defaultValue?exists>${defaultValue}<#else>null</#if>, <#if wrapper?exists>ScriptHashVariableWrapper.${wrapper}<#else>null</#if>);
Modified: branches/RF-7817/cdk/generator/src/main/resources/META-INF/templates/java/util.ftl
===================================================================
--- branches/RF-7817/cdk/generator/src/main/resources/META-INF/templates/java/util.ftl 2010-10-27 15:58:37 UTC (rev 19700)
+++ branches/RF-7817/cdk/generator/src/main/resources/META-INF/templates/java/util.ftl 2010-10-27 16:01:55 UTC (rev 19701)
@@ -3,3 +3,10 @@
<#macro import name>${addImport(name)}</#macro>
<#macro concat seq delimiter=","><#list seq as item><#nested item/><#if item_has_next>${delimiter}</#if></#list></#macro>
+<#macro attributesField fieldName attributes>
+ <@require "CREATE_ATTRIBUTES"/>
+ <@constant "Attributes" "${fieldName}">${CREATE_ATTRIBUTES}()<#list attributes as attribute>
+ .${attribute.builderMethod}("${attribute.name}","${attribute.componentAttribute}"<#list attribute.behaviors as behavior>,"${behavior}"</#list>)
+ <#if attribute.defaultValue?exists >.defaultValue(${attribute.defaultValue})</#if>
+ </#list></@constant>
+</#macro>
Modified: branches/RF-7817/cdk/generator/src/main/resources/META-INF/templates/java/write-attributes-set.ftl
===================================================================
--- branches/RF-7817/cdk/generator/src/main/resources/META-INF/templates/java/write-attributes-set.ftl 2010-10-27 15:58:37 UTC (rev 19700)
+++ branches/RF-7817/cdk/generator/src/main/resources/META-INF/templates/java/write-attributes-set.ftl 2010-10-27 16:01:55 UTC (rev 19701)
@@ -1,7 +1,6 @@
-<@util.require "RENDER_ATTRIBUTES_SET"/><@util.require "CREATE_ATTRIBUTES"/>
-<@util.constant "Attributes" "${fieldName}">${CREATE_ATTRIBUTES}()<#list attributes as attribute>
- .${attribute.builderMethod}("${attribute.name}","${attribute.componentAttribute}"<#list attribute.behaviors as behavior>,"${behavior}"</#list>)
- <#if attribute.defaultValue?exists >.defaultValue("${attribute.defaultValue}")</#if>
-</#list></(a)util.constant>
+<@util.require "RENDER_ATTRIBUTES_SET"/>
+
+<@util.attributesField "${fieldName}" attributes />
+
${RENDER_ATTRIBUTES_SET}(${facesContextVariable}, ${componentVariable},
${fieldName});
\ No newline at end of file
Modified: branches/RF-7817/cdk/generator/src/main/resources/META-INF/templates/java/write-boolean-attribute.ftl
===================================================================
--- branches/RF-7817/cdk/generator/src/main/resources/META-INF/templates/java/write-boolean-attribute.ftl 2010-10-27 15:58:37 UTC (rev 19700)
+++ branches/RF-7817/cdk/generator/src/main/resources/META-INF/templates/java/write-boolean-attribute.ftl 2010-10-27 16:01:55 UTC (rev 19701)
@@ -1,12 +1,16 @@
-<#if value.literal && value == "true">
+<#if value.literal >
+ <#if value == '"true"' || value == '"${attributeName}"' >
${responseWriterVariable}.writeAttribute("${attributeName}","${attributeName}",null);
+ </#if>
<#else>
<#if value.type == "boolean" >
if(${value}) {
<#elseif value.type == "Boolean" >
if(Boolean.TRUE.equals(${value})) {
+ <#elseif value.type == "String" >
+ if("${attributeName}".equals(${value}) || Boolean.valueOf(${value}) ) {
<#else>
- if(Boolean.valueOf(String.valueOf(${value}))) {
+ if(null != ${value} && ( Boolean.valueOf(${value}.toString()) || "${attributeName}".equals(${value}.toString())) ) {
</#if>
${responseWriterVariable}.writeAttribute("${attributeName}","${attributeName}",null);
}
Modified: branches/RF-7817/cdk/generator/src/test/java/org/richfaces/cdk/templatecompiler/model/TemplateParserTest.java
===================================================================
--- branches/RF-7817/cdk/generator/src/test/java/org/richfaces/cdk/templatecompiler/model/TemplateParserTest.java 2010-10-27 15:58:37 UTC (rev 19700)
+++ branches/RF-7817/cdk/generator/src/test/java/org/richfaces/cdk/templatecompiler/model/TemplateParserTest.java 2010-10-27 16:01:55 UTC (rev 19701)
@@ -23,8 +23,14 @@
package org.richfaces.cdk.templatecompiler.model;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import java.util.Arrays;
+import java.util.Iterator;
import java.util.List;
import org.junit.Test;
@@ -32,6 +38,8 @@
import org.richfaces.cdk.model.FacesId;
import org.richfaces.cdk.xmlconfig.JaxbTestBase;
+import com.google.common.collect.Iterables;
+
/**
* <p class="changed_added_4_0">
* </p>
@@ -230,7 +238,11 @@
+ "<cdk:component-family>org.richfaces.TreeFamily</cdk:component-family>"
+ "<cdk:renderer-type>org.richfaces.TreeRenderer</cdk:renderer-type>"
+ "<cdk:renderkit-id>RF4_XHTML</cdk:renderkit-id>"
- + "<cdk:renders-children>false</cdk:renders-children>" + TEMPLATE_MIDDLE + TEMPLATE_EPILOG);
+ + "<cdk:renders-children>false</cdk:renders-children>"
+ + "<cdk:import package=\"com.foo\" names=\"Bar Fooz\" />"
+ + "<cdk:import package=\"net.foo\" names=\"Field\" static=\"true\" />"
+ + "<cdk:import package=\"org.foo\" names=\"*\" />"
+ + TEMPLATE_MIDDLE + TEMPLATE_EPILOG);
CompositeInterface interfaceSection = template.getInterface();
assertNotNull(interfaceSection);
@@ -242,6 +254,28 @@
assertEquals("RF4_XHTML", interfaceSection.getRenderKitId());
assertEquals(Boolean.FALSE, interfaceSection.getRendersChildren());
+ List<ClassImport> classImports = interfaceSection.getClassImports();
+
+ ClassImport importElement;
+
+ Iterator<ClassImport> children = classImports.iterator();
+
+ importElement = children.next();
+ assertEquals("com.foo", importElement.getPackage());
+ assertEquals(Arrays.asList("Bar", "Fooz"), importElement.getNames());
+ assertFalse(importElement.isStatic());
+
+ importElement = children.next();
+ assertEquals("net.foo", importElement.getPackage());
+ assertEquals(Arrays.asList("Field"), importElement.getNames());
+ assertTrue(importElement.isStatic());
+
+ importElement = children.next();
+ assertEquals("org.foo", importElement.getPackage());
+ assertEquals(Arrays.asList("*"), importElement.getNames());
+ assertFalse(importElement.isStatic());
+
+ assertFalse(children.hasNext());
}
@Test
@@ -397,4 +431,51 @@
assertNotNull(template.getInterface());
assertNotNull(template.getImplementation());
}
+
+ @Test
+ public void testScriptObject() throws Exception {
+ Template template =
+ unmarshal(Template.class, TEMPLATE_PROLOG + TEMPLATE_MIDDLE
+ + "<cdk:scriptObject name=\"hash\" base=\"#{getBaseOptions(context)}\">"
+ + "<cdk:scriptOption name=\"name\" value=\"#{value}\" />"
+ + "<cdk:scriptOption name=\"delay\" value=\"#{delay}\" defaultValue=\"100\" />"
+ + "<cdk:scriptOption name=\"rowClasses\" value=\"#{rowClasses}\" wrapper=\"asArray\" />"
+ + "<cdk:scriptOption attributes=\"min max\" />"
+ + "<cdk:scriptOption variables=\"allowHeader allowFooter\" />"
+ + "</cdk:scriptObject>" +
+
+ TEMPLATE_EPILOG);
+
+ CompositeImplementation implementation = template.getImplementation();
+ assertNotNull(implementation);
+
+ CdkScriptObjectElement scriptObject = (CdkScriptObjectElement) Iterables.getOnlyElement(implementation.getChildren());
+ assertEquals("hash", scriptObject.getName());
+ assertEquals("#{getBaseOptions(context)}", scriptObject.getBase());
+
+ CdkScriptOptionElement scriptOption;
+ Iterator<Object> children = scriptObject.getChildren().iterator();
+
+ scriptOption = (CdkScriptOptionElement) children.next();
+ assertEquals("name", scriptOption.getName());
+ assertEquals("#{value}", scriptOption.getValue());
+
+ scriptOption = (CdkScriptOptionElement) children.next();
+ assertEquals("delay", scriptOption.getName());
+ assertEquals("#{delay}", scriptOption.getValue());
+ assertEquals("100", scriptOption.getDefaultValue());
+
+ scriptOption = (CdkScriptOptionElement) children.next();
+ assertEquals("rowClasses", scriptOption.getName());
+ assertEquals("#{rowClasses}", scriptOption.getValue());
+ assertEquals("asArray", scriptOption.getWrapper());
+
+ scriptOption = (CdkScriptOptionElement) children.next();
+ assertEquals(Arrays.asList("min", "max"), scriptOption.getAttributes());
+
+ scriptOption = (CdkScriptOptionElement) children.next();
+ assertEquals(Arrays.asList("allowHeader", "allowFooter"), scriptOption.getVariables());
+
+ assertFalse(children.hasNext());
+ }
}
Modified: branches/RF-7817/cdk/generator/src/test/java/org/richfaces/cdk/templatecompiler/parser/el/test/ELParserTest.java
===================================================================
--- branches/RF-7817/cdk/generator/src/test/java/org/richfaces/cdk/templatecompiler/parser/el/test/ELParserTest.java 2010-10-27 15:58:37 UTC (rev 19700)
+++ branches/RF-7817/cdk/generator/src/test/java/org/richfaces/cdk/templatecompiler/parser/el/test/ELParserTest.java 2010-10-27 16:01:55 UTC (rev 19701)
@@ -21,9 +21,14 @@
package org.richfaces.cdk.templatecompiler.parser.el.test;
-import static org.junit.Assert.*;
-import static org.easymock.EasyMock.*;
-import static org.richfaces.cdk.templatecompiler.statements.HelperMethod.*;
+import static org.easymock.EasyMock.anyObject;
+import static org.easymock.EasyMock.expectLastCall;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.richfaces.cdk.templatecompiler.statements.HelperMethod.EMPTINESS_CHECK;
+import static org.richfaces.cdk.templatecompiler.statements.HelperMethod.EQUALS_CHECK;
+import static org.richfaces.cdk.templatecompiler.statements.HelperMethod.TO_BOOLEAN_CONVERSION;
+import static org.richfaces.cdk.templatecompiler.statements.HelperMethod.TO_STRING_CONVERSION;
import java.util.HashMap;
import java.util.List;
@@ -668,4 +673,12 @@
assertEquals("\"Literal\"",parseExpression.getCode());
assertEquals(String.class.getName(), parseExpression.getType().getRawName());
}
+
+ @Test
+ public void testToScriptArgs() throws Exception {
+ TypedTemplateStatement parseExpression = parseExpression("#{toScriptArgs(clientId, bean)}");
+
+ assertTrue(Iterables.contains(parseExpression.getRequiredMethods(), HelperMethod.TO_SCRIPT_ARGS));
+ assertEquals("toScriptArgs(clientId,bean)", parseExpression.getCode());
+ }
}
Copied: branches/RF-7817/cdk/generator/src/test/java/org/richfaces/cdk/templatecompiler/statements/AddAttributesToScriptHashTest.java (from rev 19674, trunk/cdk/generator/src/test/java/org/richfaces/cdk/templatecompiler/statements/AddAttributesToScriptHashTest.java)
===================================================================
--- branches/RF-7817/cdk/generator/src/test/java/org/richfaces/cdk/templatecompiler/statements/AddAttributesToScriptHashTest.java (rev 0)
+++ branches/RF-7817/cdk/generator/src/test/java/org/richfaces/cdk/templatecompiler/statements/AddAttributesToScriptHashTest.java 2010-10-27 16:01:55 UTC (rev 19701)
@@ -0,0 +1,92 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.templatecompiler.statements;
+
+import java.util.Collections;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.richfaces.cdk.CdkClassLoader;
+import org.richfaces.cdk.CdkTestRunner;
+import org.richfaces.cdk.model.ClassName;
+import org.richfaces.cdk.model.PropertyBase;
+import org.richfaces.cdk.model.PropertyModel;
+import org.richfaces.cdk.templatecompiler.builder.model.JavaField;
+import org.richfaces.cdk.templatecompiler.el.types.TypesFactory;
+import org.richfaces.cdk.templatecompiler.el.types.TypesFactoryImpl;
+
+import com.google.common.collect.Iterables;
+import com.google.inject.Binder;
+import com.google.inject.Inject;
+
+/**
+ * <p class="changed_added_4_0">
+ * </p>
+ *
+ * @author asmirnov(a)exadel.com
+ *
+ */
+(a)RunWith(CdkTestRunner.class)
+public class AddAttributesToScriptHashTest extends FreeMarkerTestBase {
+
+ @Inject
+ private TypesFactory typesFactory;
+
+ @Inject
+ private ScriptObjectStatement parentStatement;
+
+ @Inject
+ private AddAttributesToScriptHashStatement statement;
+
+ @Override
+ public void configure(Binder binder) {
+ super.configure(binder);
+ binder.bind(TypesFactory.class).to(TypesFactoryImpl.class);
+ binder.bind(CdkClassLoader.class).toInstance(createClassLoader());
+ }
+
+ /**
+ * Test method for {@link org.richfaces.cdk.templatecompiler.statements.FreeMarkerTemplateStatementBase#getCode()}.
+ */
+ @Test
+ public void testGetCode() {
+ statement.setParent(parentStatement);
+ parentStatement.setObject("hash", null);
+
+ PropertyBase property = new PropertyModel();
+ property.setName("bar");
+ property.setDefaultValue("deflt");
+ property.setType(ClassName.get(String.class));
+
+ controller.replay();
+ statement.setAttributes(Collections.singleton("bar"), Collections.singleton(property));
+ String code = statement.getCode();
+ controller.verify();
+ verifyCode(code, "!attributes()", "!defaultValue(", "!if(", "");
+ verifyHelpers(statement, HelperMethod.CREATE_ATTRIBUTES, HelperMethod.ADD_TO_SCRIPT_HASH_ATTRIBUTES);
+ JavaField javaField = Iterables.getOnlyElement(statement.getRequiredFields());
+ verifyCode(javaField.getValue().getCode(), "attributes()", "generic(", "defaultValue(");
+ }
+
+}
Modified: branches/RF-7817/cdk/generator/src/test/java/org/richfaces/cdk/templatecompiler/statements/FreeMarkerTemplateStatementTest.java
===================================================================
--- branches/RF-7817/cdk/generator/src/test/java/org/richfaces/cdk/templatecompiler/statements/FreeMarkerTemplateStatementTest.java 2010-10-27 15:58:37 UTC (rev 19700)
+++ branches/RF-7817/cdk/generator/src/test/java/org/richfaces/cdk/templatecompiler/statements/FreeMarkerTemplateStatementTest.java 2010-10-27 16:01:55 UTC (rev 19701)
@@ -1,7 +1,7 @@
package org.richfaces.cdk.templatecompiler.statements;
-import static org.easymock.EasyMock.*;
-import static org.junit.Assert.*;
+import static org.easymock.EasyMock.expect;
+import static org.junit.Assert.assertEquals;
import java.util.Collections;
@@ -15,7 +15,7 @@
import org.richfaces.cdk.generate.freemarker.FreeMarkerRenderer;
import org.richfaces.cdk.templatecompiler.builder.model.JavaField;
import org.richfaces.cdk.templatecompiler.builder.model.JavaImport;
-import org.richfaces.cdk.templatecompiler.builder.model.RuntimeImport;
+import org.richfaces.cdk.templatecompiler.builder.model.JavaImportImpl;
import org.richfaces.cdk.templatecompiler.el.types.TypesFactory;
import com.google.common.collect.Iterables;
@@ -64,7 +64,7 @@
public void testGetRequiredImports() {
freeMarkerStatement.addImport("foo.Bar");
expect(statement.getRequiredImports()).andStubReturn(
- Collections.<JavaImport> singleton(new RuntimeImport("foo.baz")));
+ Collections.<JavaImport> singleton(new JavaImportImpl("foo.baz")));
expect(renderer.renderTemplate("foo.ftl", freeMarkerStatement)).andReturn(FOO_CODE);
controller.replay();
freeMarkerStatement.addStatement(statement);
Modified: branches/RF-7817/cdk/generator/src/test/java/org/richfaces/cdk/templatecompiler/statements/WriteAttributesSetTest.java
===================================================================
--- branches/RF-7817/cdk/generator/src/test/java/org/richfaces/cdk/templatecompiler/statements/WriteAttributesSetTest.java 2010-10-27 15:58:37 UTC (rev 19700)
+++ branches/RF-7817/cdk/generator/src/test/java/org/richfaces/cdk/templatecompiler/statements/WriteAttributesSetTest.java 2010-10-27 16:01:55 UTC (rev 19701)
@@ -55,7 +55,7 @@
*/
@Test
public void testGetCode() {
- WriteAttributesSetStatement.PassThrough passThrough = new WriteAttributesSetStatement.PassThrough();
+ PassThrough passThrough = new PassThrough();
passThrough.name = QName.valueOf("foo");
passThrough.type = "String";
passThrough.componentAttribute = "bar";
Modified: branches/RF-7817/cdk/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/cdk/test/component/AbstractTestComponent.java
===================================================================
--- branches/RF-7817/cdk/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/cdk/test/component/AbstractTestComponent.java 2010-10-27 15:58:37 UTC (rev 19700)
+++ branches/RF-7817/cdk/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/cdk/test/component/AbstractTestComponent.java 2010-10-27 16:01:55 UTC (rev 19701)
@@ -63,6 +63,7 @@
description=@Description(displayName="Test HTML5 abbreviation",largeIcon="large.gif",smallIcon="spall.png"),
tag=@Tag(name="abbr",generate=true,handler="org.richfaces.cdk.test.facelets.AbbrTagHandler"),
generate="org.richfaces.cdk.test.component.html.HtmlTestAbbr",
+ attributes={"core-props.xml","events-props.xml","i18n-props.xml"},
interfaces=Html5Attributes.class,
renderer=@JsfRenderer(type="org.richfaces.cdk.test.HtmlAbbrRenderer")),
@RendererSpecificComponent(type = "org.richfaces.cdk.test.TestHtmlDfn",
Modified: branches/RF-7817/cdk/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/cdk/test/component/Html5Attributes.java
===================================================================
--- branches/RF-7817/cdk/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/cdk/test/component/Html5Attributes.java 2010-10-27 15:58:37 UTC (rev 19700)
+++ branches/RF-7817/cdk/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/cdk/test/component/Html5Attributes.java 2010-10-27 16:01:55 UTC (rev 19701)
@@ -48,7 +48,7 @@
/**
* @return
*/
- @Attribute(events=@EventName("ondrag"))
+ @Attribute(events=@EventName("drag"))
public abstract DraggableState getDraggable();
/**
Modified: branches/RF-7817/cdk/maven-cdk-plugin/src/it/annotated-component/src/main/templates/testComponent.xml
===================================================================
--- branches/RF-7817/cdk/maven-cdk-plugin/src/it/annotated-component/src/main/templates/testComponent.xml 2010-10-27 15:58:37 UTC (rev 19700)
+++ branches/RF-7817/cdk/maven-cdk-plugin/src/it/annotated-component/src/main/templates/testComponent.xml 2010-10-27 16:01:55 UTC (rev 19701)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<cdk:root xmlns="http://www.w3.org/1999/xhtml" xmlns:cdk="http://jboss.org/schema/richfaces/cdk/core"
+<cdk:root xmlns="http://jboss.org/schema/richfaces/cdk/xhtml-el" xmlns:cdk="http://jboss.org/schema/richfaces/cdk/core"
xmlns:c="http://jboss.org/schema/richfaces/cdk/jstl/core" xmlns:cc="http://jboss.org/schema/richfaces/cdk/jsf/composite"
xmlns:x="http://jboss.org/schema/richfaces/cdk/ext">
<cc:interface>
@@ -37,7 +37,9 @@
</cc:interface>
<cc:implementation>
- <div id="#{clientId}" cdk:passThroughWithExclusions="id dir lang">
+ <div id="#{clientId}" cdk:passThroughWithExclusions="id dir lang" >
+ <input readonly="readonly"/>
+ <a x:onclick="onBodyClick" onclick="" href="/root/"/>
<c:if test="#{component.attributes['ifTest'] != null}">if content</c:if>
<c:choose>
<c:when test="#{component.attributes['anotherTest'] != null}">when content</c:when>
@@ -51,7 +53,7 @@
<ul x:style="listStyle" x:class="listClass" cdk:passThrough="id title:listTitle onclick:onlistclick ondblclick:onlistdblclick">
<c:forEach items="#{component.children}" var="iterationVar">
<li>forEach content <cdk:call>iterationVar.encodeAll(facesContext)</cdk:call></li>
- </c:forEach>
+ </c:forEach>
</ul>
</div>
</cc:implementation>
14 years, 3 months
JBoss Rich Faces SVN: r19700 - in trunk/examples/iteration-demo/src/main/webapp: resources and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-10-27 11:58:37 -0400 (Wed, 27 Oct 2010)
New Revision: 19700
Added:
trunk/examples/iteration-demo/src/main/webapp/resources/qunit/
trunk/examples/iteration-demo/src/main/webapp/resources/qunit/qunit.css
trunk/examples/iteration-demo/src/main/webapp/resources/qunit/qunit.js
trunk/examples/iteration-demo/src/main/webapp/rf-9392.xhtml
Log:
https://jira.jboss.org/browse/RF-9392
Added: trunk/examples/iteration-demo/src/main/webapp/resources/qunit/qunit.css
===================================================================
--- trunk/examples/iteration-demo/src/main/webapp/resources/qunit/qunit.css (rev 0)
+++ trunk/examples/iteration-demo/src/main/webapp/resources/qunit/qunit.css 2010-10-27 15:58:37 UTC (rev 19700)
@@ -0,0 +1,119 @@
+
+ol#qunit-tests {
+ font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
+ margin:0;
+ padding:0;
+ list-style-position:inside;
+
+ font-size: smaller;
+}
+ol#qunit-tests li{
+ padding:0.4em 0.5em 0.4em 2.5em;
+ border-bottom:1px solid #fff;
+ font-size:small;
+ list-style-position:inside;
+}
+ol#qunit-tests li ol{
+ box-shadow: inset 0px 2px 13px #999;
+ -moz-box-shadow: inset 0px 2px 13px #999;
+ -webkit-box-shadow: inset 0px 2px 13px #999;
+ margin-top:0.5em;
+ margin-left:0;
+ padding:0.5em;
+ background-color:#fff;
+ border-radius:15px;
+ -moz-border-radius: 15px;
+ -webkit-border-radius: 15px;
+}
+ol#qunit-tests li li{
+ border-bottom:none;
+ margin:0.5em;
+ background-color:#fff;
+ list-style-position: inside;
+ padding:0.4em 0.5em 0.4em 0.5em;
+}
+
+ol#qunit-tests li li.pass{
+ border-left:26px solid #C6E746;
+ background-color:#fff;
+ color:#5E740B;
+ }
+ol#qunit-tests li li.fail{
+ border-left:26px solid #EE5757;
+ background-color:#fff;
+ color:#710909;
+}
+ol#qunit-tests li.pass{
+ background-color:#D2E0E6;
+ color:#528CE0;
+}
+ol#qunit-tests li.fail{
+ background-color:#EE5757;
+ color:#000;
+}
+ol#qunit-tests li strong {
+ cursor:pointer;
+}
+h1#qunit-header{
+ background-color:#0d3349;
+ margin:0;
+ padding:0.5em 0 0.5em 1em;
+ color:#fff;
+ font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
+ border-top-right-radius:15px;
+ border-top-left-radius:15px;
+ -moz-border-radius-topright:15px;
+ -moz-border-radius-topleft:15px;
+ -webkit-border-top-right-radius:15px;
+ -webkit-border-top-left-radius:15px;
+ text-shadow: rgba(0, 0, 0, 0.5) 4px 4px 1px;
+}
+h2#qunit-banner{
+ font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
+ height:5px;
+ margin:0;
+ padding:0;
+}
+h2#qunit-banner.qunit-pass{
+ background-color:#C6E746;
+}
+h2#qunit-banner.qunit-fail, #qunit-testrunner-toolbar {
+ background-color:#EE5757;
+}
+#qunit-testrunner-toolbar {
+ font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
+ padding:0;
+ /*width:80%;*/
+ padding:0em 0 0.5em 2em;
+ font-size: small;
+}
+h2#qunit-userAgent {
+ font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
+ background-color:#2b81af;
+ margin:0;
+ padding:0;
+ color:#fff;
+ font-size: small;
+ padding:0.5em 0 0.5em 2.5em;
+ text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
+}
+p#qunit-testresult{
+ font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
+ margin:0;
+ font-size: small;
+ color:#2b81af;
+ border-bottom-right-radius:15px;
+ border-bottom-left-radius:15px;
+ -moz-border-radius-bottomright:15px;
+ -moz-border-radius-bottomleft:15px;
+ -webkit-border-bottom-right-radius:15px;
+ -webkit-border-bottom-left-radius:15px;
+ background-color:#D2E0E6;
+ padding:0.5em 0.5em 0.5em 2.5em;
+}
+strong b.fail{
+ color:#710909;
+ }
+strong b.pass{
+ color:#5E740B;
+ }
Added: trunk/examples/iteration-demo/src/main/webapp/resources/qunit/qunit.js
===================================================================
--- trunk/examples/iteration-demo/src/main/webapp/resources/qunit/qunit.js (rev 0)
+++ trunk/examples/iteration-demo/src/main/webapp/resources/qunit/qunit.js 2010-10-27 15:58:37 UTC (rev 19700)
@@ -0,0 +1,1043 @@
+/*
+ * QUnit - A JavaScript Unit Testing Framework
+ *
+ * http://docs.jquery.com/QUnit
+ *
+ * Copyright (c) 2009 John Resig, Jörn Zaefferer
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ */
+
+(function(window) {
+
+var QUnit = {
+
+ // Initialize the configuration options
+ init: function() {
+ config = {
+ stats: { all: 0, bad: 0 },
+ moduleStats: { all: 0, bad: 0 },
+ started: +new Date,
+ blocking: false,
+ autorun: false,
+ assertions: [],
+ filters: [],
+ queue: []
+ };
+
+ var tests = id("qunit-tests"),
+ banner = id("qunit-banner"),
+ result = id("qunit-testresult");
+
+ if ( tests ) {
+ tests.innerHTML = "";
+ }
+
+ if ( banner ) {
+ banner.className = "";
+ }
+
+ if ( result ) {
+ result.parentNode.removeChild( result );
+ }
+ },
+
+ // call on start of module test to prepend name to all tests
+ module: function(name, testEnvironment) {
+ config.currentModule = name;
+
+ synchronize(function() {
+ if ( config.currentModule ) {
+ QUnit.moduleDone( config.currentModule, config.moduleStats.bad, config.moduleStats.all );
+ }
+
+ config.currentModule = name;
+ config.moduleTestEnvironment = testEnvironment;
+ config.moduleStats = { all: 0, bad: 0 };
+
+ QUnit.moduleStart( name, testEnvironment );
+ });
+ },
+
+ asyncTest: function(testName, expected, callback) {
+ if ( arguments.length === 2 ) {
+ callback = expected;
+ expected = 0;
+ }
+
+ QUnit.test(testName, expected, callback, true);
+ },
+
+ test: function(testName, expected, callback, async) {
+ var name = testName, testEnvironment, testEnvironmentArg;
+
+ if ( arguments.length === 2 ) {
+ callback = expected;
+ expected = null;
+ }
+ // is 2nd argument a testEnvironment?
+ if ( expected && typeof expected === 'object') {
+ testEnvironmentArg = expected;
+ expected = null;
+ }
+
+ if ( config.currentModule ) {
+ name = config.currentModule + " module: " + name;
+ }
+
+ if ( !validTest(name) ) {
+ return;
+ }
+
+ synchronize(function() {
+ QUnit.testStart( testName );
+
+ testEnvironment = extend({
+ setup: function() {},
+ teardown: function() {}
+ }, config.moduleTestEnvironment);
+ if (testEnvironmentArg) {
+ extend(testEnvironment,testEnvironmentArg);
+ }
+
+ // allow utility functions to access the current test environment
+ QUnit.current_testEnvironment = testEnvironment;
+
+ config.assertions = [];
+ config.expected = expected;
+
+ try {
+ if ( !config.pollution ) {
+ saveGlobal();
+ }
+
+ testEnvironment.setup.call(testEnvironment);
+ } catch(e) {
+ QUnit.ok( false, "Setup failed on " + name + ": " + e.message );
+ }
+
+ if ( async ) {
+ QUnit.stop();
+ }
+
+ try {
+ callback.call(testEnvironment);
+ } catch(e) {
+ fail("Test " + name + " died, exception and test follows", e, callback);
+ QUnit.ok( false, "Died on test #" + (config.assertions.length + 1) + ": " + e.message );
+ // else next test will carry the responsibility
+ saveGlobal();
+
+ // Restart the tests if they're blocking
+ if ( config.blocking ) {
+ start();
+ }
+ }
+ });
+
+ synchronize(function() {
+ try {
+ checkPollution();
+ testEnvironment.teardown.call(testEnvironment);
+ } catch(e) {
+ QUnit.ok( false, "Teardown failed on " + name + ": " + e.message );
+ }
+
+ try {
+ QUnit.reset();
+ } catch(e) {
+ fail("reset() failed, following Test " + name + ", exception and reset fn follows", e, reset);
+ }
+
+ if ( config.expected && config.expected != config.assertions.length ) {
+ QUnit.ok( false, "Expected " + config.expected + " assertions, but " + config.assertions.length + " were run" );
+ }
+
+ var good = 0, bad = 0,
+ tests = id("qunit-tests");
+
+ config.stats.all += config.assertions.length;
+ config.moduleStats.all += config.assertions.length;
+
+ if ( tests ) {
+ var ol = document.createElement("ol");
+ ol.style.display = "none";
+
+ for ( var i = 0; i < config.assertions.length; i++ ) {
+ var assertion = config.assertions[i];
+
+ var li = document.createElement("li");
+ li.className = assertion.result ? "pass" : "fail";
+ li.appendChild(document.createTextNode(assertion.message || "(no message)"));
+ ol.appendChild( li );
+
+ if ( assertion.result ) {
+ good++;
+ } else {
+ bad++;
+ config.stats.bad++;
+ config.moduleStats.bad++;
+ }
+ }
+
+ var b = document.createElement("strong");
+ b.innerHTML = name + " <b style='color:black;'>(<b class='fail'>" + bad + "</b>, <b class='pass'>" + good + "</b>, " + config.assertions.length + ")</b>";
+
+ addEvent(b, "click", function() {
+ var next = b.nextSibling, display = next.style.display;
+ next.style.display = display === "none" ? "block" : "none";
+ });
+
+ addEvent(b, "dblclick", function(e) {
+ var target = e && e.target ? e.target : window.event.srcElement;
+ if ( target.nodeName.toLowerCase() === "strong" ) {
+ var text = "", node = target.firstChild;
+
+ while ( node.nodeType === 3 ) {
+ text += node.nodeValue;
+ node = node.nextSibling;
+ }
+
+ text = text.replace(/(^\s*|\s*$)/g, "");
+
+ if ( window.location ) {
+ window.location.href = window.location.href.match(/^(.+?)(\?.*)?$/)[1] + "?" + encodeURIComponent(text);
+ }
+ }
+ });
+
+ var li = document.createElement("li");
+ li.className = bad ? "fail" : "pass";
+ li.appendChild( b );
+ li.appendChild( ol );
+ tests.appendChild( li );
+
+ if ( bad ) {
+ var toolbar = id("qunit-testrunner-toolbar");
+ if ( toolbar ) {
+ toolbar.style.display = "block";
+ id("qunit-filter-pass").disabled = null;
+ id("qunit-filter-missing").disabled = null;
+ }
+ }
+
+ } else {
+ for ( var i = 0; i < config.assertions.length; i++ ) {
+ if ( !config.assertions[i].result ) {
+ bad++;
+ config.stats.bad++;
+ config.moduleStats.bad++;
+ }
+ }
+ }
+
+ QUnit.testDone( testName, bad, config.assertions.length );
+
+ if ( !window.setTimeout && !config.queue.length ) {
+ done();
+ }
+ });
+
+ if ( window.setTimeout && !config.doneTimer ) {
+ config.doneTimer = window.setTimeout(function(){
+ if ( !config.queue.length ) {
+ done();
+ } else {
+ synchronize( done );
+ }
+ }, 13);
+ }
+ },
+
+ /**
+ * Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through.
+ */
+ expect: function(asserts) {
+ config.expected = asserts;
+ },
+
+ /**
+ * Asserts true.
+ * @example ok( "asdfasdf".length > 5, "There must be at least 5 chars" );
+ */
+ ok: function(a, msg) {
+ QUnit.log(a, msg);
+
+ config.assertions.push({
+ result: !!a,
+ message: msg
+ });
+ },
+
+ /**
+ * Checks that the first two arguments are equal, with an optional message.
+ * Prints out both actual and expected values.
+ *
+ * Prefered to ok( actual == expected, message )
+ *
+ * @example equal( format("Received {0} bytes.", 2), "Received 2 bytes." );
+ *
+ * @param Object actual
+ * @param Object expected
+ * @param String message (optional)
+ */
+ equal: function(actual, expected, message) {
+ push(expected == actual, actual, expected, message);
+ },
+
+ notEqual: function(actual, expected, message) {
+ push(expected != actual, actual, expected, message);
+ },
+
+ deepEqual: function(a, b, message) {
+ push(QUnit.equiv(a, b), a, b, message);
+ },
+
+ notDeepEqual: function(a, b, message) {
+ push(!QUnit.equiv(a, b), a, b, message);
+ },
+
+ strictEqual: function(actual, expected, message) {
+ push(expected === actual, actual, expected, message);
+ },
+
+ notStrictEqual: function(actual, expected, message) {
+ push(expected !== actual, actual, expected, message);
+ },
+
+ start: function() {
+ // A slight delay, to avoid any current callbacks
+ if ( window.setTimeout ) {
+ window.setTimeout(function() {
+ if ( config.timeout ) {
+ clearTimeout(config.timeout);
+ }
+
+ config.blocking = false;
+ process();
+ }, 13);
+ } else {
+ config.blocking = false;
+ process();
+ }
+ },
+
+ stop: function(timeout) {
+ config.blocking = true;
+
+ if ( timeout && window.setTimeout ) {
+ config.timeout = window.setTimeout(function() {
+ QUnit.ok( false, "Test timed out" );
+ QUnit.start();
+ }, timeout);
+ }
+ },
+
+ /**
+ * Resets the test setup. Useful for tests that modify the DOM.
+ */
+ reset: function() {
+ if ( window.jQuery ) {
+ jQuery("#main").html( config.fixture );
+ jQuery.event.global = {};
+ jQuery.ajaxSettings = extend({}, config.ajaxSettings);
+ }
+ },
+
+ /**
+ * Trigger an event on an element.
+ *
+ * @example triggerEvent( document.body, "click" );
+ *
+ * @param DOMElement elem
+ * @param String type
+ */
+ triggerEvent: function( elem, type, event ) {
+ if ( document.createEvent ) {
+ event = document.createEvent("MouseEvents");
+ event.initMouseEvent(type, true, true, elem.ownerDocument.defaultView,
+ 0, 0, 0, 0, 0, false, false, false, false, 0, null);
+ elem.dispatchEvent( event );
+
+ } else if ( elem.fireEvent ) {
+ elem.fireEvent("on"+type);
+ }
+ },
+
+ // Safe object type checking
+ is: function( type, obj ) {
+ return Object.prototype.toString.call( obj ) === "[object "+ type +"]";
+ },
+
+ // Logging callbacks
+ done: function(failures, total) {},
+ log: function(result, message) {},
+ testStart: function(name) {},
+ testDone: function(name, failures, total) {},
+ moduleStart: function(name, testEnvironment) {},
+ moduleDone: function(name, failures, total) {}
+};
+
+// Backwards compatibility, deprecated
+QUnit.equals = QUnit.equal;
+QUnit.same = QUnit.deepEqual;
+
+// Maintain internal state
+var config = {
+ // The queue of tests to run
+ queue: [],
+
+ // block until document ready
+ blocking: true
+};
+
+// Load paramaters
+(function() {
+ var location = window.location || { search: "", protocol: "file:" },
+ GETParams = location.search.slice(1).split('&');
+
+ for ( var i = 0; i < GETParams.length; i++ ) {
+ GETParams[i] = decodeURIComponent( GETParams[i] );
+ if ( GETParams[i] === "noglobals" ) {
+ GETParams.splice( i, 1 );
+ i--;
+ config.noglobals = true;
+ } else if ( GETParams[i].search('=') > -1 ) {
+ GETParams.splice( i, 1 );
+ i--;
+ }
+ }
+
+ // restrict modules/tests by get parameters
+ config.filters = GETParams;
+
+ // Figure out if we're running the tests from a server or not
+ QUnit.isLocal = !!(location.protocol === 'file:');
+})();
+
+// Expose the API as global variables, unless an 'exports'
+// object exists, in that case we assume we're in CommonJS
+if ( typeof exports === "undefined" || typeof require === "undefined" ) {
+ extend(window, QUnit);
+ window.QUnit = QUnit;
+} else {
+ extend(exports, QUnit);
+ exports.QUnit = QUnit;
+}
+
+if ( typeof document === "undefined" || document.readyState === "complete" ) {
+ config.autorun = true;
+}
+
+addEvent(window, "load", function() {
+ // Initialize the config, saving the execution queue
+ var oldconfig = extend({}, config);
+ QUnit.init();
+ extend(config, oldconfig);
+
+ config.blocking = false;
+
+ var userAgent = id("qunit-userAgent");
+ if ( userAgent ) {
+ userAgent.innerHTML = navigator.userAgent;
+ }
+
+ var toolbar = id("qunit-testrunner-toolbar");
+ if ( toolbar ) {
+ toolbar.style.display = "none";
+
+ var filter = document.createElement("input");
+ filter.type = "checkbox";
+ filter.id = "qunit-filter-pass";
+ filter.disabled = true;
+ addEvent( filter, "click", function() {
+ var li = document.getElementsByTagName("li");
+ for ( var i = 0; i < li.length; i++ ) {
+ if ( li[i].className.indexOf("pass") > -1 ) {
+ li[i].style.display = filter.checked ? "none" : "";
+ }
+ }
+ });
+ toolbar.appendChild( filter );
+
+ var label = document.createElement("label");
+ label.setAttribute("for", "qunit-filter-pass");
+ label.innerHTML = "Hide passed tests";
+ toolbar.appendChild( label );
+
+ var missing = document.createElement("input");
+ missing.type = "checkbox";
+ missing.id = "qunit-filter-missing";
+ missing.disabled = true;
+ addEvent( missing, "click", function() {
+ var li = document.getElementsByTagName("li");
+ for ( var i = 0; i < li.length; i++ ) {
+ if ( li[i].className.indexOf("fail") > -1 && li[i].innerHTML.indexOf('missing test - untested code is broken code') > - 1 ) {
+ li[i].parentNode.parentNode.style.display = missing.checked ? "none" : "block";
+ }
+ }
+ });
+ toolbar.appendChild( missing );
+
+ label = document.createElement("label");
+ label.setAttribute("for", "qunit-filter-missing");
+ label.innerHTML = "Hide missing tests (untested code is broken code)";
+ toolbar.appendChild( label );
+ }
+
+ var main = id('main');
+ if ( main ) {
+ config.fixture = main.innerHTML;
+ }
+
+ if ( window.jQuery ) {
+ config.ajaxSettings = window.jQuery.ajaxSettings;
+ }
+
+ QUnit.start();
+});
+
+function done() {
+ if ( config.doneTimer && window.clearTimeout ) {
+ window.clearTimeout( config.doneTimer );
+ config.doneTimer = null;
+ }
+
+ if ( config.queue.length ) {
+ config.doneTimer = window.setTimeout(function(){
+ if ( !config.queue.length ) {
+ done();
+ } else {
+ synchronize( done );
+ }
+ }, 13);
+
+ return;
+ }
+
+ config.autorun = true;
+
+ // Log the last module results
+ if ( config.currentModule ) {
+ QUnit.moduleDone( config.currentModule, config.moduleStats.bad, config.moduleStats.all );
+ }
+
+ var banner = id("qunit-banner"),
+ tests = id("qunit-tests"),
+ html = ['Tests completed in ',
+ +new Date - config.started, ' milliseconds.<br/>',
+ '<span class="passed">', config.stats.all - config.stats.bad, '</span> tests of <span class="total">', config.stats.all, '</span> passed, <span class="failed">', config.stats.bad,'</span> failed.'].join('');
+
+ if ( banner ) {
+ banner.className = (config.stats.bad ? "qunit-fail" : "qunit-pass");
+ }
+
+ if ( tests ) {
+ var result = id("qunit-testresult");
+
+ if ( !result ) {
+ result = document.createElement("p");
+ result.id = "qunit-testresult";
+ result.className = "result";
+ tests.parentNode.insertBefore( result, tests.nextSibling );
+ }
+
+ result.innerHTML = html;
+ }
+
+ QUnit.done( config.stats.bad, config.stats.all );
+}
+
+function validTest( name ) {
+ var i = config.filters.length,
+ run = false;
+
+ if ( !i ) {
+ return true;
+ }
+
+ while ( i-- ) {
+ var filter = config.filters[i],
+ not = filter.charAt(0) == '!';
+
+ if ( not ) {
+ filter = filter.slice(1);
+ }
+
+ if ( name.indexOf(filter) !== -1 ) {
+ return !not;
+ }
+
+ if ( not ) {
+ run = true;
+ }
+ }
+
+ return run;
+}
+
+function push(result, actual, expected, message) {
+ message = message || (result ? "okay" : "failed");
+ QUnit.ok( result, result ? message + ": " + expected : message + ", expected: " + QUnit.jsDump.parse(expected) + " result: " + QUnit.jsDump.parse(actual) );
+}
+
+function synchronize( callback ) {
+ config.queue.push( callback );
+
+ if ( config.autorun && !config.blocking ) {
+ process();
+ }
+}
+
+function process() {
+ while ( config.queue.length && !config.blocking ) {
+ config.queue.shift()();
+ }
+}
+
+function saveGlobal() {
+ config.pollution = [];
+
+ if ( config.noglobals ) {
+ for ( var key in window ) {
+ config.pollution.push( key );
+ }
+ }
+}
+
+function checkPollution( name ) {
+ var old = config.pollution;
+ saveGlobal();
+
+ var newGlobals = diff( old, config.pollution );
+ if ( newGlobals.length > 0 ) {
+ ok( false, "Introduced global variable(s): " + newGlobals.join(", ") );
+ config.expected++;
+ }
+
+ var deletedGlobals = diff( config.pollution, old );
+ if ( deletedGlobals.length > 0 ) {
+ ok( false, "Deleted global variable(s): " + deletedGlobals.join(", ") );
+ config.expected++;
+ }
+}
+
+// returns a new Array with the elements that are in a but not in b
+function diff( a, b ) {
+ var result = a.slice();
+ for ( var i = 0; i < result.length; i++ ) {
+ for ( var j = 0; j < b.length; j++ ) {
+ if ( result[i] === b[j] ) {
+ result.splice(i, 1);
+ i--;
+ break;
+ }
+ }
+ }
+ return result;
+}
+
+function fail(message, exception, callback) {
+ if ( typeof console !== "undefined" && console.error && console.warn ) {
+ console.error(message);
+ console.error(exception);
+ console.warn(callback.toString());
+
+ } else if ( window.opera && opera.postError ) {
+ opera.postError(message, exception, callback.toString);
+ }
+}
+
+function extend(a, b) {
+ for ( var prop in b ) {
+ a[prop] = b[prop];
+ }
+
+ return a;
+}
+
+function addEvent(elem, type, fn) {
+ if ( elem.addEventListener ) {
+ elem.addEventListener( type, fn, false );
+ } else if ( elem.attachEvent ) {
+ elem.attachEvent( "on" + type, fn );
+ } else {
+ fn();
+ }
+}
+
+function id(name) {
+ return !!(typeof document !== "undefined" && document && document.getElementById) &&
+ document.getElementById( name );
+}
+
+// Test for equality any JavaScript type.
+// Discussions and reference: http://philrathe.com/articles/equiv
+// Test suites: http://philrathe.com/tests/equiv
+// Author: Philippe Rathé <prathe(a)gmail.com>
+QUnit.equiv = function () {
+
+ var innerEquiv; // the real equiv function
+ var callers = []; // stack to decide between skip/abort functions
+
+
+ // Determine what is o.
+ function hoozit(o) {
+ if (QUnit.is("String", o)) {
+ return "string";
+
+ } else if (QUnit.is("Boolean", o)) {
+ return "boolean";
+
+ } else if (QUnit.is("Number", o)) {
+
+ if (isNaN(o)) {
+ return "nan";
+ } else {
+ return "number";
+ }
+
+ } else if (typeof o === "undefined") {
+ return "undefined";
+
+ // consider: typeof null === object
+ } else if (o === null) {
+ return "null";
+
+ // consider: typeof [] === object
+ } else if (QUnit.is( "Array", o)) {
+ return "array";
+
+ // consider: typeof new Date() === object
+ } else if (QUnit.is( "Date", o)) {
+ return "date";
+
+ // consider: /./ instanceof Object;
+ // /./ instanceof RegExp;
+ // typeof /./ === "function"; // => false in IE and Opera,
+ // true in FF and Safari
+ } else if (QUnit.is( "RegExp", o)) {
+ return "regexp";
+
+ } else if (typeof o === "object") {
+ return "object";
+
+ } else if (QUnit.is( "Function", o)) {
+ return "function";
+ } else {
+ return undefined;
+ }
+ }
+
+ // Call the o related callback with the given arguments.
+ function bindCallbacks(o, callbacks, args) {
+ var prop = hoozit(o);
+ if (prop) {
+ if (hoozit(callbacks[prop]) === "function") {
+ return callbacks[prop].apply(callbacks, args);
+ } else {
+ return callbacks[prop]; // or undefined
+ }
+ }
+ }
+
+ var callbacks = function () {
+
+ // for string, boolean, number and null
+ function useStrictEquality(b, a) {
+ if (b instanceof a.constructor || a instanceof b.constructor) {
+ // to catch short annotaion VS 'new' annotation of a declaration
+ // e.g. var i = 1;
+ // var j = new Number(1);
+ return a == b;
+ } else {
+ return a === b;
+ }
+ }
+
+ return {
+ "string": useStrictEquality,
+ "boolean": useStrictEquality,
+ "number": useStrictEquality,
+ "null": useStrictEquality,
+ "undefined": useStrictEquality,
+
+ "nan": function (b) {
+ return isNaN(b);
+ },
+
+ "date": function (b, a) {
+ return hoozit(b) === "date" && a.valueOf() === b.valueOf();
+ },
+
+ "regexp": function (b, a) {
+ return hoozit(b) === "regexp" &&
+ a.source === b.source && // the regex itself
+ a.global === b.global && // and its modifers (gmi) ...
+ a.ignoreCase === b.ignoreCase &&
+ a.multiline === b.multiline;
+ },
+
+ // - skip when the property is a method of an instance (OOP)
+ // - abort otherwise,
+ // initial === would have catch identical references anyway
+ "function": function () {
+ var caller = callers[callers.length - 1];
+ return caller !== Object &&
+ typeof caller !== "undefined";
+ },
+
+ "array": function (b, a) {
+ var i;
+ var len;
+
+ // b could be an object literal here
+ if ( ! (hoozit(b) === "array")) {
+ return false;
+ }
+
+ len = a.length;
+ if (len !== b.length) { // safe and faster
+ return false;
+ }
+ for (i = 0; i < len; i++) {
+ if ( ! innerEquiv(a[i], b[i])) {
+ return false;
+ }
+ }
+ return true;
+ },
+
+ "object": function (b, a) {
+ var i;
+ var eq = true; // unless we can proove it
+ var aProperties = [], bProperties = []; // collection of strings
+
+ // comparing constructors is more strict than using instanceof
+ if ( a.constructor !== b.constructor) {
+ return false;
+ }
+
+ // stack constructor before traversing properties
+ callers.push(a.constructor);
+
+ for (i in a) { // be strict: don't ensures hasOwnProperty and go deep
+
+ aProperties.push(i); // collect a's properties
+
+ if ( ! innerEquiv(a[i], b[i])) {
+ eq = false;
+ break;
+ }
+ }
+
+ callers.pop(); // unstack, we are done
+
+ for (i in b) {
+ bProperties.push(i); // collect b's properties
+ }
+
+ // Ensures identical properties name
+ return eq && innerEquiv(aProperties.sort(), bProperties.sort());
+ }
+ };
+ }();
+
+ innerEquiv = function () { // can take multiple arguments
+ var args = Array.prototype.slice.apply(arguments);
+ if (args.length < 2) {
+ return true; // end transition
+ }
+
+ return (function (a, b) {
+ if (a === b) {
+ return true; // catch the most you can
+ } else if (a === null || b === null || typeof a === "undefined" || typeof b === "undefined" || hoozit(a) !== hoozit(b)) {
+ return false; // don't lose time with error prone cases
+ } else {
+ return bindCallbacks(a, callbacks, [b, a]);
+ }
+
+ // apply transition with (1..n) arguments
+ })(args[0], args[1]) && arguments.callee.apply(this, args.splice(1, args.length -1));
+ };
+
+ return innerEquiv;
+
+}();
+
+/**
+ * jsDump
+ * Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
+ * Licensed under BSD (http://www.opensource.org/licenses/bsd-license.php)
+ * Date: 5/15/2008
+ * @projectDescription Advanced and extensible data dumping for Javascript.
+ * @version 1.0.0
+ * @author Ariel Flesler
+ * @link {http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html}
+ */
+QUnit.jsDump = (function() {
+ function quote( str ) {
+ return '"' + str.toString().replace(/"/g, '\\"') + '"';
+ };
+ function literal( o ) {
+ return o + '';
+ };
+ function join( pre, arr, post ) {
+ var s = jsDump.separator(),
+ base = jsDump.indent(),
+ inner = jsDump.indent(1);
+ if ( arr.join )
+ arr = arr.join( ',' + s + inner );
+ if ( !arr )
+ return pre + post;
+ return [ pre, inner + arr, base + post ].join(s);
+ };
+ function array( arr ) {
+ var i = arr.length, ret = Array(i);
+ this.up();
+ while ( i-- )
+ ret[i] = this.parse( arr[i] );
+ this.down();
+ return join( '[', ret, ']' );
+ };
+
+ var reName = /^function (\w+)/;
+
+ var jsDump = {
+ parse:function( obj, type ) { //type is used mostly internally, you can fix a (custom)type in advance
+ var parser = this.parsers[ type || this.typeOf(obj) ];
+ type = typeof parser;
+
+ return type == 'function' ? parser.call( this, obj ) :
+ type == 'string' ? parser :
+ this.parsers.error;
+ },
+ typeOf:function( obj ) {
+ var type;
+ if ( obj === null ) {
+ type = "null";
+ } else if (typeof obj === "undefined") {
+ type = "undefined";
+ } else if (QUnit.is("RegExp", obj)) {
+ type = "regexp";
+ } else if (QUnit.is("Date", obj)) {
+ type = "date";
+ } else if (QUnit.is("Function", obj)) {
+ type = "function";
+ } else if (QUnit.is("Array", obj)) {
+ type = "array";
+ } else if (QUnit.is("Window", obj) || QUnit.is("global", obj)) {
+ type = "window";
+ } else if (QUnit.is("HTMLDocument", obj)) {
+ type = "document";
+ } else if (QUnit.is("HTMLCollection", obj) || QUnit.is("NodeList", obj)) {
+ type = "nodelist";
+ } else if (/^\[object HTML/.test(Object.prototype.toString.call( obj ))) {
+ type = "node";
+ } else {
+ type = typeof obj;
+ }
+ return type;
+ },
+ separator:function() {
+ return this.multiline ? this.HTML ? '<br />' : '\n' : this.HTML ? ' ' : ' ';
+ },
+ indent:function( extra ) {// extra can be a number, shortcut for increasing-calling-decreasing
+ if ( !this.multiline )
+ return '';
+ var chr = this.indentChar;
+ if ( this.HTML )
+ chr = chr.replace(/\t/g,' ').replace(/ /g,' ');
+ return Array( this._depth_ + (extra||0) ).join(chr);
+ },
+ up:function( a ) {
+ this._depth_ += a || 1;
+ },
+ down:function( a ) {
+ this._depth_ -= a || 1;
+ },
+ setParser:function( name, parser ) {
+ this.parsers[name] = parser;
+ },
+ // The next 3 are exposed so you can use them
+ quote:quote,
+ literal:literal,
+ join:join,
+ //
+ _depth_: 1,
+ // This is the list of parsers, to modify them, use jsDump.setParser
+ parsers:{
+ window: '[Window]',
+ document: '[Document]',
+ error:'[ERROR]', //when no parser is found, shouldn't happen
+ unknown: '[Unknown]',
+ 'null':'null',
+ undefined:'undefined',
+ 'function':function( fn ) {
+ var ret = 'function',
+ name = 'name' in fn ? fn.name : (reName.exec(fn)||[])[1];//functions never have name in IE
+ if ( name )
+ ret += ' ' + name;
+ ret += '(';
+
+ ret = [ ret, this.parse( fn, 'functionArgs' ), '){'].join('');
+ return join( ret, this.parse(fn,'functionCode'), '}' );
+ },
+ array: array,
+ nodelist: array,
+ arguments: array,
+ object:function( map ) {
+ var ret = [ ];
+ this.up();
+ for ( var key in map )
+ ret.push( this.parse(key,'key') + ': ' + this.parse(map[key]) );
+ this.down();
+ return join( '{', ret, '}' );
+ },
+ node:function( node ) {
+ var open = this.HTML ? '<' : '<',
+ close = this.HTML ? '>' : '>';
+
+ var tag = node.nodeName.toLowerCase(),
+ ret = open + tag;
+
+ for ( var a in this.DOMAttrs ) {
+ var val = node[this.DOMAttrs[a]];
+ if ( val )
+ ret += ' ' + a + '=' + this.parse( val, 'attribute' );
+ }
+ return ret + close + open + '/' + tag + close;
+ },
+ functionArgs:function( fn ) {//function calls it internally, it's the arguments part of the function
+ var l = fn.length;
+ if ( !l ) return '';
+
+ var args = Array(l);
+ while ( l-- )
+ args[l] = String.fromCharCode(97+l);//97 is 'a'
+ return ' ' + args.join(', ') + ' ';
+ },
+ key:quote, //object calls it internally, the key part of an item in a map
+ functionCode:'[code]', //function calls it internally, it's the content of the function
+ attribute:quote, //node calls it internally, it's an html attribute value
+ string:quote,
+ date:quote,
+ regexp:literal, //regex
+ number:literal,
+ 'boolean':literal
+ },
+ DOMAttrs:{//attributes to dump from nodes, name=>realName
+ id:'id',
+ name:'name',
+ 'class':'className'
+ },
+ HTML:true,//if true, entities are escaped ( <, >, \t, space and \n )
+ indentChar:' ',//indentation unit
+ multiline:true //if true, items in a collection, are separated by a \n, else just a space.
+ };
+
+ return jsDump;
+})();
+
+})(this);
Added: trunk/examples/iteration-demo/src/main/webapp/rf-9392.xhtml
===================================================================
--- trunk/examples/iteration-demo/src/main/webapp/rf-9392.xhtml (rev 0)
+++ trunk/examples/iteration-demo/src/main/webapp/rf-9392.xhtml 2010-10-27 15:58:37 UTC (rev 19700)
@@ -0,0 +1,79 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+<f:view>
+ <h:head>
+ <h:outputScript name="jquery.js" />
+ <h:outputScript library="qunit" name="qunit.js" />
+
+ <h:outputStylesheet library="qunit" name="qunit.css" />
+ <style type="text/css">
+ .additionTestClass, .removalTestClass {
+ position: absolute;
+ line-height: 0px;
+ font-size: 0px;
+ }
+ </style>
+
+ <style type="text/css" id="removalTest">
+ .removalTestClass {
+ width: 200px;
+ height: 180px;
+ background-color: #EEE;
+ }
+ </style>
+ </h:head>
+ <h:body>
+ <h1 id="qunit-header">QUnit example</h1>
+ <h2 id="qunit-banner"></h2>
+ <h2 id="qunit-userAgent"></h2>
+ <ol id="qunit-tests"></ol>
+ <div id="qunit-fixture">test markup, will be hidden</div>
+
+ <h:panelGroup styleClass="additionTestClass" layout="block"></h:panelGroup>
+ <h:panelGroup styleClass="removalTestClass" layout="block"></h:panelGroup>
+
+ <script type="text/javascript">/* <![CDATA[ */
+ function addCss(eltId, cssText) {
+ var style = jQuery("<style></style>").attr({type: 'text/css', id: eltId}).appendTo("head");
+ try {
+ style.html(cssText);
+ } catch (e) {
+ //IE
+ style[0].styleSheet.cssText = cssText;
+ }
+ }
+
+ jQuery(document).ready(function() {
+ module("rf-9392");
+
+ var additionTestElt = jQuery(".additionTestClass");
+ var removalTestElt = jQuery(".removalTestClass");
+
+ test("class addition", function() {
+ expect(2);
+ equals(additionTestElt.height(), 0);
+
+ addCss("additionTest", ".additionTestClass { height: 140px; }");
+
+ equals(additionTestElt.height(), 140);
+ });
+
+ test("class removal", function() {
+ expect(2);
+ equals(removalTestElt.height(), 180);
+
+ jQuery("#removalTest").remove();
+
+ equals(removalTestElt.height(), 0);
+ });
+ });
+ /* ]]> */</script>
+ </h:body>
+</f:view>
+</html>
\ No newline at end of file
14 years, 3 months
JBoss Rich Faces SVN: r19699 - in branches/RF-7817/cdk: generator/src/main/java/org/richfaces/cdk/templatecompiler and 7 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-10-27 11:58:31 -0400 (Wed, 27 Oct 2010)
New Revision: 19699
Added:
branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/builder/model/JavaImportImpl.java
branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/CdkScriptObjectElement.java
branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/CdkScriptOptionElement.java
branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/ClassImport.java
branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/AddAttributesToScriptHashStatement.java
branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/PassThrough.java
branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/ScriptObjectStatement.java
branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/ScriptOptionStatement.java
Removed:
branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/builder/model/ClassImport.java
branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/builder/model/RuntimeImport.java
Modified:
branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/model/validator/ValidatorImpl.java
branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/JavaClassModelWrapper.java
branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/RendererClassVisitor.java
branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/builder/model/JavaClass.java
branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/builder/model/JavaImport.java
branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/builder/model/RequireImports.java
branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/el/node/AstFunctionTreeNode.java
branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/el/node/AstNotTreeNode.java
branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/el/types/PlainClassType.java
branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/el/types/TypesFactoryImpl.java
branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/CompositeInterface.java
branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/ModelFragment.java
branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/TemplateVisitor.java
branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/AttributesStatement.java
branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/FreeMarkerTemplateStatementBase.java
branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/HelperMethod.java
branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/HelperMethodFactoryImpl.java
branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/RendererUtilsMethod.java
branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/TemplateStatement.java
branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/WriteAttributesSetStatement.java
branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/util/JavaUtils.java
branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/util/Strings.java
branches/RF-7817/cdk/parent/pom.xml
Log:
Merged revisions 19156-19157,19159-19160,19176,19186-19187,19190,19194,19196,19199,19203-19204,19231-19234,19248-19249,19255-19256,19258-19262,19276,19279-19281,19283,19285,19291-19299,19307,19312,19315,19318-19319,19325,19341-19342,19345-19351,19353-19355,19358-19359,19364,19367-19369,19371,19374-19377,19379-19385,19387,19393-19394,19400,19402-19404,19418-19422,19426,19430-19431,19434-19441,19443-19444,19446,19468,19470,19477,19491,19498-19499,19501,19504,19506-19507,19517-19519,19525,19542-19543,19548,19550,19555,19557,19560-19561,19565-19566,19571-19573,19582-19585,19592-19593,19599,19601-19602,19613,19646,19657-19659,19665,19671-19674 via svnmerge from
https://svn.jboss.org/repos/richfaces/trunk
Modified: branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/model/validator/ValidatorImpl.java
===================================================================
--- branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/model/validator/ValidatorImpl.java 2010-10-27 15:55:50 UTC (rev 19698)
+++ branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/model/validator/ValidatorImpl.java 2010-10-27 15:58:31 UTC (rev 19699)
@@ -373,9 +373,7 @@
for (PropertyBase parentAttribute : parentComponent.getAttributes()) {
PropertyBase attribute = component.getOrCreateAttribute(parentAttribute.getName());
attribute.merge(parentAttribute);
- // TODO Check generate status. Attribute should not be generated if the parent component
- // represents
- // concrete class.
+ // already exists in parent component.
attribute.setGenerate(false);
}
} catch (NoSuchElementException e) {
Modified: branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/JavaClassModelWrapper.java
===================================================================
--- branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/JavaClassModelWrapper.java 2010-10-27 15:55:50 UTC (rev 19698)
+++ branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/JavaClassModelWrapper.java 2010-10-27 15:58:31 UTC (rev 19699)
@@ -19,7 +19,6 @@
@Override
public TemplateModel wrap(Object obj) throws TemplateModelException {
- // TODO wrap specified model classes.
TemplateModel templateModel;
if (obj instanceof JavaStatement) {
Modified: branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/RendererClassVisitor.java
===================================================================
--- branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/RendererClassVisitor.java 2010-10-27 15:55:50 UTC (rev 19698)
+++ branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/RendererClassVisitor.java 2010-10-27 15:58:31 UTC (rev 19699)
@@ -25,6 +25,7 @@
import java.io.IOException;
import java.lang.reflect.Type;
+import java.text.MessageFormat;
import java.util.Collection;
import java.util.EnumSet;
import java.util.List;
@@ -58,13 +59,17 @@
import org.richfaces.cdk.templatecompiler.model.CdkIfElement;
import org.richfaces.cdk.templatecompiler.model.CdkObjectElement;
import org.richfaces.cdk.templatecompiler.model.CdkOtherwiseElement;
+import org.richfaces.cdk.templatecompiler.model.CdkScriptObjectElement;
+import org.richfaces.cdk.templatecompiler.model.CdkScriptOptionElement;
import org.richfaces.cdk.templatecompiler.model.CdkSwitchElement;
import org.richfaces.cdk.templatecompiler.model.CdkWhenElement;
+import org.richfaces.cdk.templatecompiler.model.ClassImport;
import org.richfaces.cdk.templatecompiler.model.CompositeImplementation;
import org.richfaces.cdk.templatecompiler.model.CompositeInterface;
import org.richfaces.cdk.templatecompiler.model.ResourceDependency;
import org.richfaces.cdk.templatecompiler.model.Template;
import org.richfaces.cdk.templatecompiler.model.TemplateVisitor;
+import org.richfaces.cdk.templatecompiler.statements.AddAttributesToScriptHashStatement;
import org.richfaces.cdk.templatecompiler.statements.AttributesStatement;
import org.richfaces.cdk.templatecompiler.statements.CaseStatement;
import org.richfaces.cdk.templatecompiler.statements.ConstantReturnMethodBodyStatement;
@@ -76,6 +81,8 @@
import org.richfaces.cdk.templatecompiler.statements.HelperMethodFactory;
import org.richfaces.cdk.templatecompiler.statements.IfElseStatement;
import org.richfaces.cdk.templatecompiler.statements.IfStatement;
+import org.richfaces.cdk.templatecompiler.statements.ScriptObjectStatement;
+import org.richfaces.cdk.templatecompiler.statements.ScriptOptionStatement;
import org.richfaces.cdk.templatecompiler.statements.StartElementStatement;
import org.richfaces.cdk.templatecompiler.statements.StatementsContainer;
import org.richfaces.cdk.templatecompiler.statements.SwitchStatement;
@@ -85,6 +92,7 @@
import org.richfaces.cdk.util.Strings;
import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.Lists;
import com.google.inject.Injector;
/**
@@ -131,11 +139,6 @@
*/
static final String CLIENT_ID_VARIABLE = "clientId";
- /**
- *
- */
- private static final String PASS_THROUGH_ATTRIBUTES_FIELD_NAME = "PASS_THROUGH_ATTRIBUTES";
-
private final Logger log;
private final Injector injector;
@@ -148,8 +151,6 @@
private JavaClass generatedClass;
private Set<HelperMethod> addedHelperMethods = EnumSet.noneOf(HelperMethod.class);
- private int passThroughCounter;
-
public RendererClassVisitor(CompositeInterface compositeInterface, Collection<PropertyBase> attributes, Logger log,
Injector injector, TypesFactory typesFactory, HelperMethodFactory helperFactory) {
this.compositeInterface = compositeInterface;
@@ -170,6 +171,18 @@
this.generatedClass.addImport(ResponseWriter.class);
this.generatedClass.addImport(UIComponent.class);
+ for (ClassImport classImport: compositeInterface.getClassImports()) {
+ List<String> importedNames = classImport.getNames();
+ if (importedNames == null || importedNames.isEmpty()) {
+ importedNames = Lists.newArrayList("*");
+ }
+
+ for (String importedName : importedNames) {
+ this.generatedClass.addImport(Strings.DOT_JOINER.join(classImport.getPackage(), importedName),
+ classImport.isStatic());
+ }
+ }
+
// TODO - make this JavaDoc - Generated annotation is present since JDK6
// this.generatedClass.addAnnotation(Generated.class, "\"RichFaces CDK\"");
// TODO remove this after improving Java model
@@ -603,7 +616,6 @@
*/
public void preProcess(CompositeImplementation impl) {
initializeJavaClass();
- passThroughCounter = -1;
}
/**
@@ -614,4 +626,51 @@
createRendersChildrenMethod();
}
+ @Override
+ public void startElement(CdkScriptObjectElement cdkScriptObjectElement) {
+ ScriptObjectStatement scriptObjectStatement = pushStatement(ScriptObjectStatement.class);
+ scriptObjectStatement.setObject(cdkScriptObjectElement.getName(), cdkScriptObjectElement.getBase());
+ }
+
+ @Override
+ public void endElement(CdkScriptObjectElement cdkScriptObjectElement) {
+ popStatement();
+ }
+
+ private void addScriptHashAttributesPassthroughStatement(List<String> attributeNames, String wrapper) {
+ if (attributeNames == null || attributeNames.isEmpty()) {
+ return;
+ }
+
+ AddAttributesToScriptHashStatement statement = addStatement(AddAttributesToScriptHashStatement.class);
+ statement.setWrapper(wrapper);
+ statement.setAttributes(attributeNames, attributes);
+ }
+
+ private void addScriptOptionStatement(String name, String value, String defaultValue, String wrapper) {
+ ScriptOptionStatement scriptOptionStatement = addStatement(ScriptOptionStatement.class);
+ scriptOptionStatement.setName(name);
+ scriptOptionStatement.setValueExpression(value);
+ scriptOptionStatement.setDefaultValue(defaultValue);
+ scriptOptionStatement.setWrapper(wrapper);
+ }
+
+ @Override
+ public void visitElement(CdkScriptOptionElement cdkScriptOptionElement) {
+ addScriptHashAttributesPassthroughStatement(cdkScriptOptionElement.getAttributes(), cdkScriptOptionElement.getWrapper());
+
+ for (String variableName : cdkScriptOptionElement.getVariables()) {
+ addScriptOptionStatement(variableName,
+ MessageFormat.format("#'{'{0}'}'", variableName),
+ cdkScriptOptionElement.getDefaultValue(),
+ cdkScriptOptionElement.getWrapper());
+ }
+
+ if (!Strings.isEmpty(cdkScriptOptionElement.getName())) {
+ addScriptOptionStatement(cdkScriptOptionElement.getName(),
+ cdkScriptOptionElement.getValue(),
+ cdkScriptOptionElement.getDefaultValue(),
+ cdkScriptOptionElement.getWrapper());
+ }
+ }
}
Deleted: branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/builder/model/ClassImport.java
===================================================================
--- branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/builder/model/ClassImport.java 2010-10-27 15:55:50 UTC (rev 19698)
+++ branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/builder/model/ClassImport.java 2010-10-27 15:58:31 UTC (rev 19699)
@@ -1,48 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.cdk.templatecompiler.builder.model;
-
-/**
- * @author Maksim Kaszynski
- */
-public class ClassImport implements JavaImport {
- private Class<?> clazz;
-
- public ClassImport(Class<?> clazz) {
- super();
- this.clazz = clazz;
- }
-
- public String getName() {
- return clazz.getName();
- }
-
- @Override
- public boolean isDefault() {
- if(clazz.isPrimitive()){
- return true;
- } else if("java.lang".equals(clazz.getPackage().getName())){
- return true;
- }
- return false;
- }
-}
Modified: branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/builder/model/JavaClass.java
===================================================================
--- branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/builder/model/JavaClass.java 2010-10-27 15:55:50 UTC (rev 19698)
+++ branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/builder/model/JavaClass.java 2010-10-27 15:58:31 UTC (rev 19699)
@@ -71,18 +71,20 @@
public void addImport(String name) {
- addImport(new RuntimeImport(name));
+ addImport(new JavaImportImpl(name));
}
- public void addImport(JavaImport javaImport) {
- imports.add(javaImport);
+ public void addImport(String name, boolean _static) {
+ addImport(new JavaImportImpl(name, _static));
}
public void addImport(Class<?> claz) {
- if (shouldAddToImports(claz.getName())) {
- imports.add(new ClassImport(claz));
- }
+ addImport(claz.getName());
}
+
+ public void addImport(JavaImport javaImport) {
+ imports.add(javaImport);
+ }
public void addImports(Iterable<JavaImport> imports) {
for (JavaImport elType : imports) {
@@ -141,20 +143,4 @@
return simpleName;
}
- private boolean shouldAddToImports(String className) {
- if (className == null || className.length() == 0) {
- return false;
- }
-
- // default package & primitive types
- if (className.indexOf('.') == -1) {
- return false;
- }
-
- if (className.matches("^java\\.lang\\.[^\\.]+$")) {
- return false;
- }
-
- return true;
- }
}
Modified: branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/builder/model/JavaImport.java
===================================================================
--- branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/builder/model/JavaImport.java 2010-10-27 15:55:50 UTC (rev 19698)
+++ branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/builder/model/JavaImport.java 2010-10-27 15:58:31 UTC (rev 19699)
@@ -27,12 +27,17 @@
* @author Maksim Kaszynski
*/
public interface JavaImport {
+
public Comparator<? super JavaImport> COMPARATOR = new Comparator<JavaImport>() {
public int compare(JavaImport o1, JavaImport o2) {
return o1.getName().compareTo(o2.getName());
}
};
- String getName();
-
- boolean isDefault();
+
+ public String getName();
+
+ public boolean isStatic();
+
+ public boolean isDefault();
+
}
Copied: branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/builder/model/JavaImportImpl.java (from rev 19674, trunk/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/builder/model/JavaImportImpl.java)
===================================================================
--- branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/builder/model/JavaImportImpl.java (rev 0)
+++ branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/builder/model/JavaImportImpl.java 2010-10-27 15:58:31 UTC (rev 19699)
@@ -0,0 +1,111 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.cdk.templatecompiler.builder.model;
+
+import java.util.regex.Pattern;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+public class JavaImportImpl implements JavaImport {
+
+ private static final Pattern JAVA_LANG_PATTERN = Pattern.compile("^java\\.lang\\.[^\\.]+$");
+
+ private String name;
+
+ private boolean _static;
+
+ public JavaImportImpl(String name) {
+ this(name, false);
+ }
+
+ public JavaImportImpl(Class<?> clazz) {
+ this(clazz.getName());
+ }
+
+ public JavaImportImpl(String name, boolean _static) {
+ super();
+ this.name = name;
+ this._static = _static;
+ }
+
+ public JavaImportImpl(Class<?> clazz, boolean _static) {
+ this(clazz.getName(), _static);
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public boolean isStatic() {
+ return _static;
+ }
+
+ public boolean isDefault() {
+ String name = getName();
+
+ if (!name.contains(".")) {
+ return true;
+ }
+
+ if (JAVA_LANG_PATTERN.matcher(name).matches()) {
+ return true;
+ }
+
+ return false;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + (isStatic() ? 1231 : 1237);
+ result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ JavaImport other = (JavaImport) obj;
+ if (isStatic() != other.isStatic()) {
+ return false;
+ }
+ if (getName() == null) {
+ if (other.getName() != null) {
+ return false;
+ }
+ } else if (!getName().equals(other.getName())) {
+ return false;
+ }
+ return true;
+ }
+}
Modified: branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/builder/model/RequireImports.java
===================================================================
--- branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/builder/model/RequireImports.java 2010-10-27 15:55:50 UTC (rev 19698)
+++ branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/builder/model/RequireImports.java 2010-10-27 15:58:31 UTC (rev 19699)
@@ -6,6 +6,7 @@
import com.google.common.base.Function;
public interface RequireImports {
+
public static final Function<RequireImports, Iterable<JavaImport>> IMPORTS_TRANSFORM = new Function<RequireImports, Iterable<JavaImport>>() {
@Override
Deleted: branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/builder/model/RuntimeImport.java
===================================================================
--- branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/builder/model/RuntimeImport.java 2010-10-27 15:55:50 UTC (rev 19698)
+++ branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/builder/model/RuntimeImport.java 2010-10-27 15:58:31 UTC (rev 19699)
@@ -1,59 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.cdk.templatecompiler.builder.model;
-
-import java.util.regex.Pattern;
-
-/**
- * Implementation of import taht cannot be resolved in design time
- *
- * @author Maksim Kaszynski
- */
-public class RuntimeImport implements JavaImport {
-
- private static final Pattern JAVA_LANG_PATTERN = Pattern.compile("^java\\.lang\\.[^\\.]+$");
-
- private String name;
-
- public RuntimeImport(String name) {
- super();
- this.name = name;
- }
-
- public String getName() {
- return name;
- }
-
- @Override
- public boolean isDefault() {
- // default package & primitive types
- if (name.indexOf('.') == -1) {
- return true;
- }
-
- if (JAVA_LANG_PATTERN.matcher(name).matches()) {
- return true;
- }
-
- return false;
- }
-}
Modified: branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/el/node/AstFunctionTreeNode.java
===================================================================
--- branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/el/node/AstFunctionTreeNode.java 2010-10-27 15:55:50 UTC (rev 19698)
+++ branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/el/node/AstFunctionTreeNode.java 2010-10-27 15:58:31 UTC (rev 19699)
@@ -22,12 +22,18 @@
package org.richfaces.cdk.templatecompiler.el.node;
+import static org.richfaces.cdk.templatecompiler.el.ELNodeConstants.COMMA;
+import static org.richfaces.cdk.templatecompiler.el.ELNodeConstants.LEFT_BRACKET;
+import static org.richfaces.cdk.templatecompiler.el.ELNodeConstants.RIGHT_BRACKET;
+import static org.richfaces.cdk.templatecompiler.el.ELNodeConstants.THIS_PREFIX;
+
import org.jboss.el.parser.AstFunction;
import org.jboss.el.parser.Node;
-import org.richfaces.cdk.templatecompiler.el.ELNodeConstants;
import org.richfaces.cdk.templatecompiler.el.ELVisitor;
import org.richfaces.cdk.templatecompiler.el.ParsingException;
import org.richfaces.cdk.templatecompiler.el.types.ELType;
+import org.richfaces.cdk.templatecompiler.el.types.TypesFactory;
+import org.richfaces.cdk.templatecompiler.statements.HelperMethod;
import org.richfaces.cdk.util.Strings;
/**
@@ -45,23 +51,68 @@
@Override
public void visit(StringBuilder sb, ELVisitor visitor) throws ParsingException {
AstFunction functionNode = (AstFunction) getNode();
- String functionPrefix = functionNode.getPrefix();
- String functionName = functionNode.getLocalName();
-
- String identifierName;
- if (!Strings.isEmpty(functionPrefix)) {
- // TODO: this should be a property getter, not property name. NB: 'this' & 'super' keywords
- identifierName = functionPrefix;
+
+ HelperMethod helperMethod = findMatchingHelperMethod(functionNode);
+ if (helperMethod != null) {
+ visitHelperMethod(sb, visitor, helperMethod, functionNode);
} else {
- identifierName = ELNodeConstants.THIS_PREFIX;
+ visitObjectMethod(sb, visitor, functionNode);
}
+ }
+ /**
+ * @param sb
+ * @param visitor
+ * @param helperMethod
+ * @param functionNode
+ * @throws ParsingException
+ */
+ private void visitHelperMethod(StringBuilder sb, ELVisitor visitor, HelperMethod helperMethod,
+ AstFunction functionNode) throws ParsingException {
+ visitor.addHelperMethods(helperMethod);
+
+ visitor.setLiteral(false);
+
+ //TODO - helper method doesn't provide this info
+ visitor.setExpressionType(TypesFactory.OBJECT_TYPE);
+
+ sb.append(helperMethod.getName());
+ sb.append(LEFT_BRACKET);
+
+ for (int i = 0; i < functionNode.jjtGetNumChildren(); i++) {
+ if (i != 0) {
+ sb.append(COMMA);
+ }
+
+ String childOutput = getChildOutput(i, visitor);
+ sb.append(childOutput);
+ }
+
+ sb.append(RIGHT_BRACKET);
+ }
+
+ private HelperMethod findMatchingHelperMethod(AstFunction functionNode) {
+ if (Strings.isEmpty(functionNode.getPrefix())) {
+ for (HelperMethod helperMethod: HelperMethod.values()) {
+ if (helperMethod.getName().equals(functionNode.getLocalName())) {
+ return helperMethod;
+ }
+ }
+ }
+
+ return null;
+ }
+
+ private void visitObjectMethod(StringBuilder sb, ELVisitor visitor, AstFunction functionNode)
+ throws ParsingException {
+
+ String identifierName = Strings.firstNonEmpty(functionNode.getPrefix(), THIS_PREFIX);
sb.append(identifierName);
ELType identifierType = visitor.getVariable(identifierName);
visitor.setExpressionType(identifierType);
- visitMethod(sb, visitor, functionName);
+ visitMethod(sb, visitor, functionNode.getLocalName());
visitor.setLiteral(false);
}
}
Modified: branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/el/node/AstNotTreeNode.java
===================================================================
--- branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/el/node/AstNotTreeNode.java 2010-10-27 15:55:50 UTC (rev 19698)
+++ branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/el/node/AstNotTreeNode.java 2010-10-27 15:58:31 UTC (rev 19699)
@@ -19,11 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
-
package org.richfaces.cdk.templatecompiler.el.node;
-
import org.jboss.el.parser.Node;
import org.richfaces.cdk.templatecompiler.el.ELNodeConstants;
import org.richfaces.cdk.templatecompiler.el.ELVisitor;
@@ -33,7 +30,6 @@
* This class extend AbstractTreeNode and wrap AstNot node.
*
* @author amarkhel
- *
*/
public class AstNotTreeNode extends AbstractTreeNode {
public AstNotTreeNode(Node node) {
@@ -44,11 +40,11 @@
public void visit(StringBuilder sb, ELVisitor visitor) throws ParsingException {
sb.append(ELNodeConstants.LEFT_BRACKET);
sb.append(ELNodeConstants.EXCLAMATION_MARK);
- String childOutput = coerceToBoolean(getChildOutput(0, visitor), visitor);
+ String childOutput = coerceToBoolean(getChildOutput(0, visitor), visitor);
sb.append(childOutput);
sb.append(ELNodeConstants.RIGHT_BRACKET);
-
+
//variable type has been already set by getChildOuput()
}
-
+
}
Modified: branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/el/types/PlainClassType.java
===================================================================
--- branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/el/types/PlainClassType.java 2010-10-27 15:55:50 UTC (rev 19698)
+++ branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/el/types/PlainClassType.java 2010-10-27 15:58:31 UTC (rev 19699)
@@ -25,8 +25,8 @@
import java.util.Collections;
import java.util.Set;
-import org.richfaces.cdk.templatecompiler.builder.model.ClassImport;
import org.richfaces.cdk.templatecompiler.builder.model.JavaImport;
+import org.richfaces.cdk.templatecompiler.builder.model.JavaImportImpl;
/**
* @author Nick Belaevski
@@ -48,7 +48,7 @@
}
this.clazz = clazz;
- this.imports = Collections.<JavaImport>singleton(new ClassImport(clazz));
+ this.imports = Collections.<JavaImport>singleton(new JavaImportImpl(clazz));
}
public Class<?> getPlainJavaClass(){
Modified: branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/el/types/TypesFactoryImpl.java
===================================================================
--- branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/el/types/TypesFactoryImpl.java 2010-10-27 15:55:50 UTC (rev 19698)
+++ branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/el/types/TypesFactoryImpl.java 2010-10-27 15:58:31 UTC (rev 19699)
@@ -79,7 +79,8 @@
static final ImmutableMap<Class<?>, Class<?>> PRIMITIVE_TO_WRAPPER_CLASSES_MAP = ImmutableMap
.<Class<?>, Class<?>> builder().put(Boolean.TYPE, Boolean.class).put(Float.TYPE, Float.class)
.put(Long.TYPE, Long.class).put(Integer.TYPE, Integer.class).put(Short.TYPE, Short.class)
- .put(Byte.TYPE, Byte.class).put(Double.TYPE, Double.class).put(Character.TYPE, Character.class).build();
+ .put(Byte.TYPE, Byte.class).put(Double.TYPE, Double.class).put(Character.TYPE, Character.class)
+ .put(Void.TYPE, Void.class).build();
static final ImmutableMap<String, Class<?>> PRIMITIVE_CLASSES_MAP;
Copied: branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/CdkScriptObjectElement.java (from rev 19674, trunk/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/CdkScriptObjectElement.java)
===================================================================
--- branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/CdkScriptObjectElement.java (rev 0)
+++ branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/CdkScriptObjectElement.java 2010-10-27 15:58:31 UTC (rev 19699)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.cdk.templatecompiler.model;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.richfaces.cdk.CdkException;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+@XmlRootElement(name = "scriptObject", namespace = Template.CDK_NAMESPACE)
+public class CdkScriptObjectElement extends ModelFragment {
+
+ @XmlAttribute(required = true)
+ @XmlJavaTypeAdapter(NormalizedStringAdapter.class)
+ private String name;
+
+ @XmlAttribute
+ private String base;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getBase() {
+ return base;
+ }
+
+ public void setBase(String base) {
+ this.base = base;
+ }
+
+ @Override
+ public void beforeVisit(TemplateVisitor visitor) throws CdkException {
+ visitor.startElement(this);
+ }
+
+ @Override
+ public void afterVisit(TemplateVisitor visitor) throws CdkException {
+ visitor.endElement(this);
+ }
+}
Copied: branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/CdkScriptOptionElement.java (from rev 19674, trunk/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/CdkScriptOptionElement.java)
===================================================================
--- branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/CdkScriptOptionElement.java (rev 0)
+++ branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/CdkScriptOptionElement.java 2010-10-27 15:58:31 UTC (rev 19699)
@@ -0,0 +1,110 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.cdk.templatecompiler.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.richfaces.cdk.CdkException;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+@XmlRootElement(name = "scriptOption", namespace = Template.CDK_NAMESPACE)
+public class CdkScriptOptionElement implements ModelElement {
+
+ @XmlAttribute
+ private List<String> variables = new ArrayList<String>();
+
+ @XmlAttribute
+ private List<String> attributes = new ArrayList<String>();
+
+ @XmlAttribute
+ private String name;
+
+ @XmlAttribute
+ private String value;
+
+ @XmlAttribute
+ private String defaultValue;
+
+ @XmlAttribute
+ private String wrapper;
+
+ public List<String> getVariables() {
+ return variables;
+ }
+
+ public void setVariables(List<String> variables) {
+ this.variables = variables;
+ }
+
+ public List<String> getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(List<String> attributes) {
+ this.attributes = attributes;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public String getDefaultValue() {
+ return defaultValue;
+ }
+
+ public void setDefaultValue(String defaultValue) {
+ this.defaultValue = defaultValue;
+ }
+
+ public String getWrapper() {
+ return wrapper;
+ }
+
+ public void setWrapper(String wrapper) {
+ this.wrapper = wrapper;
+ }
+
+ @Override
+ public void visit(TemplateVisitor visitor) throws CdkException {
+ visitor.visitElement(this);
+ }
+
+}
Copied: branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/ClassImport.java (from rev 19674, trunk/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/ClassImport.java)
===================================================================
--- branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/ClassImport.java (rev 0)
+++ branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/ClassImport.java 2010-10-27 15:58:31 UTC (rev 19699)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.cdk.templatecompiler.model;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+public class ClassImport {
+
+ @XmlAttribute(required = true)
+ @XmlJavaTypeAdapter(NormalizedStringAdapter.class)
+ private String _package;
+
+ @XmlAttribute
+ private boolean _static;
+
+ @XmlAttribute
+ private List<String> names;
+
+ /**
+ * @return the package_
+ */
+ public String getPackage() {
+ return _package;
+ }
+
+ /**
+ * @param _package the package_ to set
+ */
+ public void setPackage(String _package) {
+ this._package = _package;
+ }
+
+ /**
+ * @return the static_
+ */
+ public boolean isStatic() {
+ return _static;
+ }
+
+ /**
+ * @param static_ the static_ to set
+ */
+ public void setStatic(boolean _static) {
+ this._static = _static;
+ }
+
+ /**
+ * @return the classes
+ */
+ public List<String> getNames() {
+ return names;
+ }
+
+ /**
+ * @param classes the classes to set
+ */
+ public void setNames(List<String> classes) {
+ this.names = classes;
+ }
+
+}
Modified: branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/CompositeInterface.java
===================================================================
--- branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/CompositeInterface.java 2010-10-27 15:55:50 UTC (rev 19698)
+++ branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/CompositeInterface.java 2010-10-27 15:58:31 UTC (rev 19699)
@@ -67,6 +67,8 @@
private Boolean rendersChildren = null;
+ private List<ClassImport> classImports = Lists.newArrayList();
+
/**
* <p class="changed_added_4_0"></p>
*
@@ -243,4 +245,18 @@
this.attributesImports = attributesImports;
}
+ /**
+ * @return the classImports
+ */
+ @XmlElement(name = "import", namespace = Template.CDK_NAMESPACE)
+ public List<ClassImport> getClassImports() {
+ return classImports;
+ }
+
+ /**
+ * @param classImports the classImports to set
+ */
+ public void setClassImports(List<ClassImport> classImports) {
+ this.classImports = classImports;
+ }
}
Modified: branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/ModelFragment.java
===================================================================
--- branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/ModelFragment.java 2010-10-27 15:55:50 UTC (rev 19698)
+++ branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/ModelFragment.java 2010-10-27 15:58:31 UTC (rev 19699)
@@ -19,7 +19,8 @@
*/
@XmlSeeAlso( { CdkCallElement.class, CdkBodyElement.class, CdkIfElement.class, CdkObjectElement.class,
CdkChooseElement.class, CdkWhenElement.class, CdkOtherwiseElement.class, CdkForEachElement.class,
- CdkSwitchElement.class, CdkCaseElement.class, CdkDefaultElement.class })
+ CdkSwitchElement.class, CdkCaseElement.class, CdkDefaultElement.class,
+ CdkScriptObjectElement.class, CdkScriptOptionElement.class })
public class ModelFragment implements LeafModelElement {
private List<Object> children = Lists.newArrayList();
Modified: branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/TemplateVisitor.java
===================================================================
--- branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/TemplateVisitor.java 2010-10-27 15:55:50 UTC (rev 19698)
+++ branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/TemplateVisitor.java 2010-10-27 15:58:31 UTC (rev 19699)
@@ -82,4 +82,10 @@
void postProcess(CompositeImplementation compositeImplementation);
+ void startElement(CdkScriptObjectElement cdkScriptObjectElement);
+
+ void endElement(CdkScriptObjectElement cdkScriptObjectElement);
+
+ void visitElement(CdkScriptOptionElement cdkScriptOptionElement);
+
}
Copied: branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/AddAttributesToScriptHashStatement.java (from rev 19674, trunk/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/AddAttributesToScriptHashStatement.java)
===================================================================
--- branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/AddAttributesToScriptHashStatement.java (rev 0)
+++ branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/AddAttributesToScriptHashStatement.java 2010-10-27 15:58:31 UTC (rev 19699)
@@ -0,0 +1,142 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.cdk.templatecompiler.statements;
+
+import java.util.Collection;
+import java.util.NoSuchElementException;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import javax.xml.namespace.QName;
+
+import org.richfaces.cdk.attributes.Attribute.Kind;
+import org.richfaces.cdk.generate.freemarker.FreeMarkerRenderer;
+import org.richfaces.cdk.model.EventName;
+import org.richfaces.cdk.model.Named.NamePredicate;
+import org.richfaces.cdk.model.PropertyBase;
+import org.richfaces.cdk.templatecompiler.TemplateModel;
+
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+import com.google.inject.Inject;
+
+/**
+ * @author Nick Belaevski
+ */
+public class AddAttributesToScriptHashStatement extends FreeMarkerTemplateStatementBase {
+
+ /**
+ *
+ */
+ private static final String ATTRIBUTES_FIELD_NAME = "ATTRIBUTES_FOR_SCRIPT_HASH";
+
+ private static AtomicInteger fieldCounter = new AtomicInteger(0);
+
+ private String fieldName;
+
+ private String wrapper;
+
+ private Collection<PassThrough> attributes = Lists.newArrayList();
+
+ private Collection<PropertyBase> componentAttributes;
+
+ @Inject
+ public AddAttributesToScriptHashStatement(@TemplateModel FreeMarkerRenderer renderer) {
+ super(renderer, "add-attributes-to-script-hash");
+ fieldName = ATTRIBUTES_FIELD_NAME + fieldCounter.getAndIncrement();
+ }
+
+ /**
+ * @return the fieldName
+ */
+ public String getFieldName() {
+ return fieldName;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param fieldName the fieldName to set
+ */
+ public void setFieldName(String fieldName) {
+ this.fieldName = fieldName;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the attributes
+ */
+ public Collection<PassThrough> getAttributes() {
+ return this.attributes;
+ }
+
+ /**
+ * @return the wrapper
+ */
+ public String getWrapper() {
+ return wrapper;
+ }
+
+ /**
+ * @param wrapper the wrapper to set
+ */
+ public void setWrapper(String wrapper) {
+ this.wrapper = wrapper;
+ }
+
+ /**
+ * @param attributeNames
+ * @param attributes
+ */
+ public void setAttributes(Collection<String> attributeNames, Collection<PropertyBase> componentAttributes) {
+ this.componentAttributes = componentAttributes;
+
+ for (String attributeName : attributeNames) {
+ PassThrough passThrough = new PassThrough();
+ passThrough.name = QName.valueOf(attributeName);
+ passThrough.componentAttribute = attributeName;
+
+ try {
+ PropertyBase componentAttribute = findComponentAttribute(attributeName);
+ for (EventName event : componentAttribute.getEventNames()) {
+ passThrough.behaviors.add(event.getName());
+ }
+ passThrough.defaultValue = componentAttribute.getDefaultValue();
+ passThrough.type = componentAttribute.getType().getSimpleName();
+
+ } catch (NoSuchElementException e) {
+ passThrough.type = Object.class.getName();
+ }
+
+ if (Boolean.TYPE.equals(passThrough.type) || Boolean.class.equals(passThrough.type)) {
+ passThrough.kind = Kind.BOOLEAN;
+ } else {
+ passThrough.kind = Kind.GENERIC;
+ }
+
+ attributes.add(passThrough);
+ }
+ }
+ private PropertyBase findComponentAttribute(final String name)
+ throws NoSuchElementException {
+
+ return Iterables.find(componentAttributes, new NamePredicate(name));
+ }
+}
Modified: branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/AttributesStatement.java
===================================================================
--- branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/AttributesStatement.java 2010-10-27 15:55:50 UTC (rev 19698)
+++ branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/AttributesStatement.java 2010-10-27 15:58:31 UTC (rev 19699)
@@ -15,13 +15,12 @@
import org.richfaces.cdk.attributes.Element;
import org.richfaces.cdk.attributes.Schema;
import org.richfaces.cdk.model.EventName;
+import org.richfaces.cdk.model.Named.NamePredicate;
import org.richfaces.cdk.model.PropertyBase;
import org.richfaces.cdk.templatecompiler.model.AnyElement;
import org.richfaces.cdk.templatecompiler.model.Template;
-import org.richfaces.cdk.templatecompiler.statements.WriteAttributesSetStatement.PassThrough;
import org.richfaces.cdk.util.Strings;
-import com.google.common.base.Predicate;
import com.google.common.base.Splitter;
import com.google.common.collect.Iterables;
import com.google.common.collect.Sets;
@@ -66,7 +65,7 @@
public void processAttributes(AnyElement element, Collection<PropertyBase> componentAttributes) {
this.componentAttributes = componentAttributes;
Set<String> processedAttributes = Sets.newHashSet();
- TreeSet<WriteAttributesSetStatement.PassThrough> passThroughAttributes = Sets.newTreeSet();
+ TreeSet<PassThrough> passThroughAttributes = Sets.newTreeSet();
this.elementName = element.getName();
processRegularAttributes(element, processedAttributes, passThroughAttributes);
String passThrough = element.getPassThrough();
@@ -81,7 +80,7 @@
}
private void processPassThroughWithExclusions(Set<String> processedAttributes,
- TreeSet<WriteAttributesSetStatement.PassThrough> passThroughAttributes, String passThroughWithExclusions) {
+ TreeSet<PassThrough> passThroughAttributes, String passThroughWithExclusions) {
if (null != passThroughWithExclusions) {
// cdk:passThroughWithExclusions="id,class,style"
Map<String, Element> elements = attributesSchema.getElements();
@@ -101,7 +100,7 @@
}
private void processPassThrough(Set<String> processedAttributes,
- TreeSet<WriteAttributesSetStatement.PassThrough> passThroughAttributes, String passThrough) {
+ TreeSet<PassThrough> passThroughAttributes, String passThrough) {
if (null != passThrough) {
// cdk:passThrough="class:styleClass,style , id:clientId"
Iterable<String> split = PASS_THGOUGH_SPLITTER.split(passThrough);
@@ -117,7 +116,7 @@
}
private void processRegularAttributes(AnyElement element, Set<String> processedAttributes,
- TreeSet<WriteAttributesSetStatement.PassThrough> passThroughAttributes) {
+ TreeSet<PassThrough> passThroughAttributes) {
for (Map.Entry<QName, Object> entry : element.getAttributes().entrySet()) {
QName qName = entry.getKey();
if (Template.CDK_NAMESPACE.equals(qName.getNamespaceURI())) {
@@ -174,13 +173,7 @@
private PropertyBase findComponentAttribute(final String name)
throws NoSuchElementException {
- return Iterables.find(componentAttributes, new Predicate<PropertyBase>() {
- @Override
- public boolean apply(PropertyBase input) {
- return name.equals(input.getName());
- }
- });
-
+ return Iterables.find(componentAttributes, new NamePredicate(name));
}
private WriteAttributeStatement setupAttributeStatement(QName qName, Object value, Attribute schemaAttribute) {
Modified: branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/FreeMarkerTemplateStatementBase.java
===================================================================
--- branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/FreeMarkerTemplateStatementBase.java 2010-10-27 15:55:50 UTC (rev 19698)
+++ branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/FreeMarkerTemplateStatementBase.java 2010-10-27 15:58:31 UTC (rev 19699)
@@ -28,8 +28,8 @@
import org.richfaces.cdk.generate.freemarker.FreeMarkerRenderer;
import org.richfaces.cdk.templatecompiler.builder.model.JavaField;
import org.richfaces.cdk.templatecompiler.builder.model.JavaImport;
+import org.richfaces.cdk.templatecompiler.builder.model.JavaImportImpl;
import org.richfaces.cdk.templatecompiler.builder.model.JavaModifier;
-import org.richfaces.cdk.templatecompiler.builder.model.RuntimeImport;
import org.richfaces.cdk.templatecompiler.el.types.ReferencedType;
import org.richfaces.cdk.util.Strings;
@@ -121,7 +121,7 @@
}
public void addImport(String name) {
- imports.add(new RuntimeImport(name));
+ imports.add(new JavaImportImpl(name));
}
protected void addImports(Iterable<JavaImport> requiredImports) {
Modified: branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/HelperMethod.java
===================================================================
--- branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/HelperMethod.java 2010-10-27 15:55:50 UTC (rev 19698)
+++ branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/HelperMethod.java 2010-10-27 15:58:31 UTC (rev 19699)
@@ -21,11 +21,20 @@
*/
package org.richfaces.cdk.templatecompiler.statements;
-import static org.richfaces.cdk.templatecompiler.el.ELNodeConstants.*;
+import static com.google.common.collect.Iterators.forArray;
+import static com.google.common.collect.Iterators.toArray;
+import static com.google.common.collect.Iterators.transform;
+import static org.richfaces.cdk.templatecompiler.el.ELNodeConstants.CONVERT_TO_BOOLEAN_FUNCTION;
+import static org.richfaces.cdk.templatecompiler.el.ELNodeConstants.CONVERT_TO_STRING_FUNCTION;
+import static org.richfaces.cdk.templatecompiler.el.ELNodeConstants.IS_EMPTY_FUNCTION;
+import static org.richfaces.cdk.templatecompiler.el.ELNodeConstants.IS_EQUAL_FUNCTION;
+import static org.richfaces.cdk.util.JavaUtils.CLASS_TO_CLASS_NAME;
import java.util.Collection;
import java.util.EnumMap;
import java.util.EnumSet;
+import java.util.Iterator;
+import java.util.Map;
import java.util.Set;
import javax.faces.component.UIComponent;
@@ -46,7 +55,14 @@
SHOULD_RENDER_ATTRIBUTE("shouldRenderAttribute", Boolean.TYPE, Object.class),
CREATE_ATTRIBUTES("attributes", "Attributes"),
RENDER_ATTRIBUTES_SET("renderPassThroughAttributes", Void.TYPE,FacesContext.class,UIComponent.class,Collection.class),
- RENDER_ATTRIBUTE("renderAttribute",Void.TYPE,FacesContext.class,String.class,Object.class);
+ RENDER_ATTRIBUTE("renderAttribute",Void.TYPE,FacesContext.class,String.class,Object.class),
+ ADD_TO_SCRIPT_HASH("addToScriptHash", Void.TYPE.getName(), Map.class.getName(), String.class.getName(),
+ Object.class.getName(), Object.class.getName(), "ScriptHashVariableWrapper"),
+ ADD_TO_SCRIPT_HASH_ATTRIBUTES("addToScriptHash", Void.TYPE.getName(), Map.class.getName(),
+ FacesContext.class.getName(), UIComponent.class.getName(),
+ "Attributes", "ScriptHashVariableWrapper"),
+ TO_SCRIPT_ARGS("toScriptArgs", String.class, Object[].class),
+ CONCAT("concat", String.class, String[].class);
public static final EnumMap<HelperMethod, String> METHOD_NAMES = Maps.newEnumMap(HelperMethod.class);
@@ -56,7 +72,7 @@
private final String returnType;
- private final Class<?>[] argumentTypes;
+ private final String[] argumentTypes;
static {
for (HelperMethod method : HelperMethod.values()) {
@@ -64,14 +80,19 @@
}
}
- private HelperMethod(String name, String returnType, Class<?>... argumentTypes) {
+ private static String[] transformClassesToClassNames(Class<?>[] s) {
+ Iterator<String> transformed = transform(forArray(s), CLASS_TO_CLASS_NAME);
+ return toArray(transformed, String.class);
+ }
+
+ private HelperMethod(String name, String returnType, String... argumentTypes) {
this.name = name;
this.returnType = returnType;
this.argumentTypes = argumentTypes;
}
private HelperMethod(String name, Class<?> returnType, Class<?>... argumentTypes) {
- this(name,returnType.getName(),argumentTypes);
+ this(name, CLASS_TO_CLASS_NAME.apply(returnType), transformClassesToClassNames(argumentTypes));
}
public String getName() {
@@ -82,7 +103,7 @@
return returnType;
}
- public Class<?>[] getArgumentTypes() {
+ public String[] getArgumentTypes() {
return argumentTypes;
}
Modified: branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/HelperMethodFactoryImpl.java
===================================================================
--- branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/HelperMethodFactoryImpl.java 2010-10-27 15:55:50 UTC (rev 19698)
+++ branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/HelperMethodFactoryImpl.java 2010-10-27 15:58:31 UTC (rev 19699)
@@ -91,6 +91,10 @@
arguments.add(new Argument("attributes",typesFactory.getType("Attributes")));
renderAttributes.getExceptions().add(typesFactory.getType(IOException.class));
buildHelperMethod(HelperMethod.CREATE_ATTRIBUTES, true, "create-attributes");
+ buildHelperMethod(HelperMethod.ADD_TO_SCRIPT_HASH, true, null);
+ buildHelperMethod(HelperMethod.ADD_TO_SCRIPT_HASH_ATTRIBUTES, true, null);
+ buildHelperMethod(HelperMethod.TO_SCRIPT_ARGS, true, null);
+ buildHelperMethod(HelperMethod.CONCAT, true, null);
}
private JavaMethod buildHelperMethod(HelperMethod helperMethod, boolean utilsMethod, String templateName,
@@ -99,7 +103,7 @@
if (utilsMethod && !RendererUtilsMethod.BUILT_IN.equals(rendererUtilsClass)) {
helperJavaMethod = new RendererUtilsMethod(helperMethod, rendererUtilsClass);
} else {
- Class<?>[] argumentTypes = helperMethod.getArgumentTypes();
+ String[] argumentTypes = helperMethod.getArgumentTypes();
Argument[] arguments = new Argument[argumentNames.length];
for (int i = 0; i < argumentNames.length; i++) {
arguments[i] = new Argument(argumentNames[i], typesFactory.getType(argumentTypes[i]));
Copied: branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/PassThrough.java (from rev 19674, trunk/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/PassThrough.java)
===================================================================
--- branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/PassThrough.java (rev 0)
+++ branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/PassThrough.java 2010-10-27 15:58:31 UTC (rev 19699)
@@ -0,0 +1,78 @@
+package org.richfaces.cdk.templatecompiler.statements;
+
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+
+import org.richfaces.cdk.attributes.Attribute.Kind;
+
+import com.google.common.collect.Sets;
+
+/**
+ * <p class="changed_added_4_0">object contains information about attribute</p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public final class PassThrough implements Comparable<PassThrough> {
+ QName name;
+ Kind kind = Kind.GENERIC;
+ String componentAttribute;
+ String type;
+ Object defaultValue;
+ Set<String> behaviors = Sets.newHashSet();
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the name
+ */
+ public QName getName() {
+ return this.name;
+ }
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the kind
+ */
+ public Kind getKind() {
+ return this.kind;
+ }
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the componentAttribute
+ */
+ public String getComponentAttribute() {
+ return this.componentAttribute;
+ }
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the type
+ */
+ public String getType() {
+ return this.type;
+ }
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the defaultValue
+ */
+ public Object getDefaultValue() {
+ return this.defaultValue;
+ }
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the behaviors
+ */
+ public Set<String> getBehaviors() {
+ return this.behaviors;
+ }
+ public String getBuilderMethod() {
+ if(Kind.BOOLEAN.equals(kind)){
+ return "bool";
+ } else {
+ return kind.toString().toLowerCase();
+ }
+ }
+ @Override
+
+ public int compareTo(PassThrough o) {
+ return name.toString().compareTo(o.name.toString());
+ }
+}
\ No newline at end of file
Modified: branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/RendererUtilsMethod.java
===================================================================
--- branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/RendererUtilsMethod.java 2010-10-27 15:55:50 UTC (rev 19698)
+++ branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/RendererUtilsMethod.java 2010-10-27 15:58:31 UTC (rev 19699)
@@ -26,8 +26,8 @@
import java.util.TreeSet;
import org.richfaces.cdk.templatecompiler.builder.model.JavaImport;
+import org.richfaces.cdk.templatecompiler.builder.model.JavaImportImpl;
import org.richfaces.cdk.templatecompiler.builder.model.JavaMethod;
-import org.richfaces.cdk.templatecompiler.builder.model.RuntimeImport;
import com.google.common.collect.Iterables;
import com.google.common.collect.Sets;
@@ -45,9 +45,10 @@
public RendererUtilsMethod(HelperMethod helper,String rendererUtilsClassName) {
super(helper.getName());
- this.runtimeImport.add(new RuntimeImport("static " +rendererUtilsClassName+".*"));
- this.runtimeImport.add(new RuntimeImport(rendererUtilsClassName));
- this.runtimeImport.add(new RuntimeImport(rendererUtilsClassName+".Attributes"));
+ this.runtimeImport.add(new JavaImportImpl(rendererUtilsClassName + ".*", true));
+ this.runtimeImport.add(new JavaImportImpl(rendererUtilsClassName));
+ this.runtimeImport.add(new JavaImportImpl(rendererUtilsClassName+".Attributes"));
+ this.runtimeImport.add(new JavaImportImpl(rendererUtilsClassName+".ScriptHashVariableWrapper"));
}
@Override
Copied: branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/ScriptObjectStatement.java (from rev 19674, trunk/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/ScriptObjectStatement.java)
===================================================================
--- branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/ScriptObjectStatement.java (rev 0)
+++ branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/ScriptObjectStatement.java 2010-10-27 15:58:31 UTC (rev 19699)
@@ -0,0 +1,131 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.cdk.templatecompiler.statements;
+
+import static org.richfaces.cdk.templatecompiler.builder.model.RequireImports.IMPORTS_TRANSFORM;
+import static org.richfaces.cdk.templatecompiler.statements.TemplateStatement.FIELDS_TRANSFORM;
+
+import org.richfaces.cdk.Logger;
+import org.richfaces.cdk.generate.freemarker.FreeMarkerRenderer;
+import org.richfaces.cdk.templatecompiler.ELParser;
+import org.richfaces.cdk.templatecompiler.TemplateModel;
+import org.richfaces.cdk.templatecompiler.builder.model.JavaField;
+import org.richfaces.cdk.templatecompiler.builder.model.JavaImport;
+import org.richfaces.cdk.templatecompiler.el.ParsingException;
+import org.richfaces.cdk.templatecompiler.el.types.ELType;
+import org.richfaces.cdk.templatecompiler.el.types.TypesFactory;
+
+import com.google.common.base.Strings;
+import com.google.common.collect.Iterables;
+import com.google.inject.Inject;
+
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+//TODO - configure initial map size
+public class ScriptObjectStatement extends FreeMarkerTemplateStatementBase {
+
+ private String name;
+
+ private ELParser parser;
+
+ private TypedTemplateStatement base;
+
+ private Logger logger;
+
+ private TypesFactory typesFactory;
+
+ private ELType mapType;
+
+ private ELType mapImplementationType;
+
+ @Inject
+ public ScriptObjectStatement(@TemplateModel FreeMarkerRenderer renderer, ELParser parser, Logger logger,
+ TypesFactory typesFactory) {
+
+ super(renderer, "script-object");
+
+ this.parser = parser;
+ this.logger = logger;
+ this.typesFactory = typesFactory;
+ }
+
+ /**
+ * @return the keyExpression
+ */
+ public TemplateStatement getBaseExpression() {
+ return base;
+ }
+
+ /**
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+
+ public ELType getType() {
+ return mapType;
+ }
+
+ public ELType getImplementationType() {
+ return mapImplementationType;
+ }
+
+ public void setObject(String name, String baseExpression) {
+ this.mapType = typesFactory.getType("Map<String, Object>");
+ this.mapImplementationType = typesFactory.getType("LinkedHashMap<String, Object>");
+ this.name = name;
+
+ if (!Strings.isNullOrEmpty(baseExpression)) {
+ try {
+ this.base = parser.parse(baseExpression, this, getType());
+ base.setParent(this);
+ } catch (ParsingException e) {
+ logger.error("Error parse scriptObject statement expression", e);
+ }
+ }
+
+ setVariable(name, getType());
+ }
+
+ @Override
+ public Iterable<JavaImport> getRequiredImports() {
+ return Iterables.concat(super.getRequiredImports(), mapImplementationType.getRequiredImports(),
+ mapType.getRequiredImports(),
+ IMPORTS_TRANSFORM.apply(base));
+ }
+
+ @Override
+ public Iterable<HelperMethod> getRequiredMethods() {
+ return Iterables.concat(super.getRequiredMethods(),
+ METHODS_TRANSFORM.apply(base));
+ }
+
+ @Override
+ public Iterable<JavaField> getRequiredFields() {
+ return Iterables.concat(super.getRequiredFields(),
+ FIELDS_TRANSFORM.apply(base));
+ }
+}
Copied: branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/ScriptOptionStatement.java (from rev 19674, trunk/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/ScriptOptionStatement.java)
===================================================================
--- branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/ScriptOptionStatement.java (rev 0)
+++ branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/ScriptOptionStatement.java 2010-10-27 15:58:31 UTC (rev 19699)
@@ -0,0 +1,147 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.cdk.templatecompiler.statements;
+
+import static org.richfaces.cdk.templatecompiler.builder.model.RequireImports.IMPORTS_TRANSFORM;
+import static org.richfaces.cdk.templatecompiler.statements.TemplateStatement.FIELDS_TRANSFORM;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.richfaces.cdk.Logger;
+import org.richfaces.cdk.generate.freemarker.FreeMarkerRenderer;
+import org.richfaces.cdk.templatecompiler.ELParser;
+import org.richfaces.cdk.templatecompiler.TemplateModel;
+import org.richfaces.cdk.templatecompiler.builder.model.JavaField;
+import org.richfaces.cdk.templatecompiler.builder.model.JavaImport;
+import org.richfaces.cdk.templatecompiler.el.ParsingException;
+import org.richfaces.cdk.templatecompiler.el.types.TypesFactory;
+
+import com.google.common.collect.Iterables;
+import com.google.inject.Inject;
+/**
+ * @author Nick Belaevski
+ *
+ */
+public class ScriptOptionStatement extends FreeMarkerTemplateStatementBase {
+
+ private String name;
+
+ private String defaultValue;
+
+ private TypedTemplateStatement value;
+
+ private String wrapper;
+
+ private ELParser parser;
+
+ private Logger logger;
+
+ @Inject
+ public ScriptOptionStatement(@TemplateModel FreeMarkerRenderer renderer, ELParser parser, Logger logger) {
+ super(renderer, "script-option");
+
+ this.parser = parser;
+ this.logger = logger;
+ }
+
+ /**
+ * @param defaultValue the defaultValue to set
+ */
+ public void setDefaultValue(String defaultValue) {
+ this.defaultValue = defaultValue;
+ }
+
+ /**
+ * @param name the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * @param value the value to set
+ */
+ public void setValueExpression(String valueExpression) {
+ try {
+ this.value = parser.parse(valueExpression, this, TypesFactory.OBJECT_TYPE);
+ } catch (ParsingException e) {
+ logger.error("Error parse scriptOption value expression: " + valueExpression, e);
+ }
+ }
+
+ /**
+ * @param wrapper the wrapper to set
+ */
+ public void setWrapper(String wrapper) {
+ this.wrapper = wrapper;
+ }
+
+ @Override
+ public List<TemplateStatement> getStatements() {
+ return value != null ? Collections.<TemplateStatement>singletonList(value) :
+ Collections.<TemplateStatement>emptyList();
+ }
+
+ /**
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @return the value
+ */
+ public TypedTemplateStatement getValue() {
+ return value;
+ }
+
+ /**
+ * @return the defaultValue
+ */
+ public String getDefaultValue() {
+ return defaultValue;
+ }
+
+ /**
+ * @return the wrapper
+ */
+ public String getWrapper() {
+ return wrapper;
+ }
+
+ @Override
+ public Iterable<JavaField> getRequiredFields() {
+ return Iterables.concat(super.getRequiredFields(), FIELDS_TRANSFORM.apply(value));
+ }
+
+ @Override
+ public Iterable<JavaImport> getRequiredImports() {
+ return Iterables.concat(super.getRequiredImports(), IMPORTS_TRANSFORM.apply(value));
+ }
+
+ @Override
+ public Iterable<HelperMethod> getRequiredMethods() {
+ return Iterables.concat(super.getRequiredMethods(), METHODS_TRANSFORM.apply(value));
+ }
+}
Modified: branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/TemplateStatement.java
===================================================================
--- branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/TemplateStatement.java 2010-10-27 15:55:50 UTC (rev 19698)
+++ branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/TemplateStatement.java 2010-10-27 15:58:31 UTC (rev 19699)
@@ -3,17 +3,40 @@
*/
package org.richfaces.cdk.templatecompiler.statements;
+import java.util.Collections;
+
import org.richfaces.cdk.templatecompiler.builder.model.JavaField;
import org.richfaces.cdk.templatecompiler.builder.model.JavaStatement;
import org.richfaces.cdk.templatecompiler.builder.model.RequireImports;
+import com.google.common.base.Function;
+
/**
* @author asmirnov
*
*/
public interface TemplateStatement extends JavaStatement, RequireImports {
+ public static final Function<TemplateStatement, Iterable<JavaField>> FIELDS_TRANSFORM = new Function<TemplateStatement, Iterable<JavaField>>() {
+ public Iterable<JavaField> apply(TemplateStatement from) {
+ if (from == null) {
+ return Collections.emptyList();
+ }
+
+ return from.getRequiredFields();
+ };
+ };
+ public static final Function<TemplateStatement, Iterable<HelperMethod>> METHODS_TRANSFORM = new Function<TemplateStatement, Iterable<HelperMethod>>() {
+ public Iterable<HelperMethod> apply(TemplateStatement from) {
+ if (from == null) {
+ return Collections.emptyList();
+ }
+
+ return from.getRequiredMethods();
+ };
+ };
+
Iterable<JavaField> getRequiredFields();
Iterable<HelperMethod> getRequiredMethods();
Modified: branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/WriteAttributesSetStatement.java
===================================================================
--- branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/WriteAttributesSetStatement.java 2010-10-27 15:55:50 UTC (rev 19698)
+++ branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/WriteAttributesSetStatement.java 2010-10-27 15:58:31 UTC (rev 19699)
@@ -22,17 +22,12 @@
package org.richfaces.cdk.templatecompiler.statements;
import java.util.Collection;
-import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
-import javax.xml.namespace.QName;
-
-import org.richfaces.cdk.attributes.Attribute.Kind;
import org.richfaces.cdk.generate.freemarker.FreeMarkerRenderer;
import org.richfaces.cdk.templatecompiler.TemplateModel;
import com.google.inject.Inject;
-import com.google.inject.internal.Sets;
/**
* @author Nick Belaevski
@@ -40,75 +35,6 @@
public class WriteAttributesSetStatement extends FreeMarkerTemplateStatementBase {
/**
- * <p class="changed_added_4_0">object contains information about attribute</p>
- * @author asmirnov(a)exadel.com
- *
- */
- public static final class PassThrough implements Comparable<PassThrough> {
- QName name;
- Kind kind = Kind.GENERIC;
- String componentAttribute;
- String type;
- Object defaultValue;
- Set<String> behaviors = Sets.newHashSet();
-
- /**
- * <p class="changed_added_4_0"></p>
- * @return the name
- */
- public QName getName() {
- return this.name;
- }
- /**
- * <p class="changed_added_4_0"></p>
- * @return the kind
- */
- public Kind getKind() {
- return this.kind;
- }
- /**
- * <p class="changed_added_4_0"></p>
- * @return the componentAttribute
- */
- public String getComponentAttribute() {
- return this.componentAttribute;
- }
- /**
- * <p class="changed_added_4_0"></p>
- * @return the type
- */
- public String getType() {
- return this.type;
- }
- /**
- * <p class="changed_added_4_0"></p>
- * @return the defaultValue
- */
- public Object getDefaultValue() {
- return this.defaultValue;
- }
- /**
- * <p class="changed_added_4_0"></p>
- * @return the behaviors
- */
- public Set<String> getBehaviors() {
- return this.behaviors;
- }
- public String getBuilderMethod() {
- if(Kind.BOOLEAN.equals(kind)){
- return "bool";
- } else {
- return kind.toString().toLowerCase();
- }
- }
- @Override
-
- public int compareTo(PassThrough o) {
- return name.toString().compareTo(o.name.toString());
- }
- }
-
- /**
*
*/
private static final String PASS_THROUGH_ATTRIBUTES_FIELD_NAME = "PASS_THROUGH_ATTRIBUTES";
Modified: branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/util/JavaUtils.java
===================================================================
--- branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/util/JavaUtils.java 2010-10-27 15:55:50 UTC (rev 19698)
+++ branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/util/JavaUtils.java 2010-10-27 15:58:31 UTC (rev 19699)
@@ -31,6 +31,7 @@
import org.richfaces.cdk.CdkException;
import org.richfaces.cdk.xmlconfig.JAXBBinding;
+import com.google.common.base.Function;
import com.google.common.collect.ImmutableMap;
/**
@@ -43,6 +44,12 @@
Character.class).put(Byte.TYPE, Byte.class).put(Short.TYPE, Short.class).put(Integer.TYPE, Integer.class)
.put(Long.TYPE, Long.class).put(Float.TYPE, Float.class).put(Double.TYPE, Double.class).build();
+ public static final Function<Class<?>, String> CLASS_TO_CLASS_NAME = new Function<Class<?>, String>() {
+ public String apply(java.lang.Class<?> from) {
+ return from.getName();
+ }
+ };
+
private JavaUtils() {
// private constructor
}
Modified: branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/util/Strings.java
===================================================================
--- branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/util/Strings.java 2010-10-27 15:55:50 UTC (rev 19698)
+++ branches/RF-7817/cdk/generator/src/main/java/org/richfaces/cdk/util/Strings.java 2010-10-27 15:58:31 UTC (rev 19699)
@@ -23,12 +23,20 @@
package org.richfaces.cdk.util;
+import java.util.NoSuchElementException;
+
+import com.google.common.base.Joiner;
+
+
/**
* <p class="changed_added_4_0">String manipulation utils.</p>
*
* @author asmirnov(a)exadel.com
*/
public final class Strings {
+
+ public static final Joiner DOT_JOINER = Joiner.on('.');
+
private Strings() {
// this is utility class with static methods only.
@@ -88,4 +96,14 @@
public static boolean isEmpty(String type) {
return type == null || type.length() == 0;
}
+
+ public static String firstNonEmpty(String... strings) {
+ for (String s : strings) {
+ if (!isEmpty(s)) {
+ return s;
+ }
+ }
+
+ throw new NoSuchElementException();
+ }
}
Modified: branches/RF-7817/cdk/parent/pom.xml
===================================================================
--- branches/RF-7817/cdk/parent/pom.xml 2010-10-27 15:55:50 UTC (rev 19698)
+++ branches/RF-7817/cdk/parent/pom.xml 2010-10-27 15:58:31 UTC (rev 19699)
@@ -350,10 +350,7 @@
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.5</version>
<configuration>
- <configLocation>richfaces-checkstyle/richfaces-checkstyle.xml
- </configLocation>
- <suppressionsLocation>checkstyle-suppressions.xml
- </suppressionsLocation>
+ <configLocation>richfaces-checkstyle/richfaces-checkstyle.xml</configLocation>
</configuration>
</plugin>
</plugins>
14 years, 3 months
JBoss Rich Faces SVN: r19698 - trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2010-10-27 11:55:50 -0400 (Wed, 27 Oct 2010)
New Revision: 19698
Modified:
trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml
Log:
https://jira.jboss.org/browse/RF-9243
Modified: trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2010-10-27 15:54:21 UTC (rev 19697)
+++ trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2010-10-27 15:55:50 UTC (rev 19698)
@@ -9,7 +9,7 @@
<name>Ajax Action</name>
<demos>
<demo>
- <id>ajax</id>
+ <id>ajax</id>
<name>a4j:ajax</name>
<samples>
<sample>
@@ -401,6 +401,16 @@
</sample>
</samples>
</demo>
+ <!--demo>
+ <id>calendar</id>
+ <name>rich:calendar</name>
+ <samples>
+ <sample>
+ <id>calendar</id>
+ <name>Simple Calendar</name>
+ </sample>
+ </samples>
+ </demo-->
<demo>
<id>inputNumberSlider</id>
<name>rich:inputNumberSlider</name>
@@ -430,7 +440,27 @@
<name>Inplace Inputs samples</name>
</sample>
</samples>
- </demo>
+ </demo>
+ <demo new="true">
+ <id>inplaceSelect</id>
+ <name>rich:inplaceSelect</name>
+ <samples>
+ <sample>
+ <id>inplaceSelect</id>
+ <name>Inplace Selects samples</name>
+ </sample>
+ </samples>
+ </demo>
+ <demo new="true">
+ <id>select</id>
+ <name>rich:select</name>
+ <samples>
+ <sample>
+ <id>select</id>
+ <name>Selects samples</name>
+ </sample>
+ </samples>
+ </demo>
</demos>
</group>
<group>
14 years, 3 months
JBoss Rich Faces SVN: r19697 - in trunk/examples/richfaces-showcase/src/main/webapp/richfaces: select and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2010-10-27 11:54:21 -0400 (Wed, 27 Oct 2010)
New Revision: 19697
Added:
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/select/
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/select/samples/
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/select/samples/select-sample.xhtml
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/select/select.xhtml
Log:
https://jira.jboss.org/browse/RF-9243
Added: trunk/examples/richfaces-showcase/src/main/webapp/richfaces/select/samples/select-sample.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/select/samples/select-sample.xhtml (rev 0)
+++ trunk/examples/richfaces-showcase/src/main/webapp/richfaces/select/samples/select-sample.xhtml 2010-10-27 15:54:21 UTC (rev 19697)
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition 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"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+ <h:form>
+ <p>DESC</p>
+ <rich:panel style="width:220px;">
+ <f:facet name="header">
+ <h:outputText value="Simples select"></h:outputText>
+ </f:facet>
+ <rich:select>
+ <f:selectItem itemValue="0" itemLabel="Option 1" />
+ <f:selectItem itemValue="1" itemLabel="Option 2" />
+ <f:selectItem itemValue="2" itemLabel="Option 3" />
+ <f:selectItem itemValue="3" itemLabel="Option 4" />
+ <f:selectItem itemValue="4" itemLabel="Option 5" />
+ </rich:select>
+ </rich:panel>
+ </h:form>
+</ui:composition>
\ No newline at end of file
Added: trunk/examples/richfaces-showcase/src/main/webapp/richfaces/select/select.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/select/select.xhtml (rev 0)
+++ trunk/examples/richfaces-showcase/src/main/webapp/richfaces/select/select.xhtml 2010-10-27 15:54:21 UTC (rev 19697)
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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">
+
+<ui:composition>
+ <p>DESC</p>
+
+ <ui:include src="#{demoNavigator.sampleIncludeURI}" />
+ <ui:include src="/templates/includes/source-view.xhtml">
+ <ui:param name="src" value="#{demoNavigator.sampleIncludeURI}" />
+ <ui:param name="sourceType" value="xhtml" />
+ <ui:param name="openLabel" value="View Source" />
+ <ui:param name="hideLabel" value="Hide Source" />
+ </ui:include>
+</ui:composition>
+
+</html>
\ No newline at end of file
14 years, 3 months