JBoss Rich Faces SVN: r18294 - root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-07-30 09:23:25 -0400 (Fri, 30 Jul 2010)
New Revision: 18294
Modified:
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java
Log:
set the currentConfiguration in each state of test (start, sucess, failure, skip) to be available in test attributes
Modified: root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java
===================================================================
--- root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java 2010-07-30 12:38:54 UTC (rev 18293)
+++ root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java 2010-07-30 13:23:25 UTC (rev 18294)
@@ -93,10 +93,6 @@
}
}
- public void onTestStart(ITestResult result) {
- result.setAttribute("matrix-configuration", currentConfiguration);
- }
-
private boolean isAfterConfiguration(ITestNGMethod m) {
return m.isAfterClassConfiguration() || m.isAfterGroupsConfiguration() || m.isAfterMethodConfiguration()
|| m.isAfterSuiteConfiguration() || m.isAfterTestConfiguration();
@@ -414,34 +410,34 @@
throw new UnsupportedOperationException();
}
}
+
+ public void onTestStart(ITestResult result) {
+ setCurrentConfigurationToTestResultAttributes(result);
+ }
public void onTestSuccess(ITestResult result) {
- // TODO Auto-generated method stub
-
+ setCurrentConfigurationToTestResultAttributes(result);
}
public void onTestFailure(ITestResult result) {
- // TODO Auto-generated method stub
-
+ setCurrentConfigurationToTestResultAttributes(result);
}
public void onTestSkipped(ITestResult result) {
- // TODO Auto-generated method stub
-
+ setCurrentConfigurationToTestResultAttributes(result);
}
public void onTestFailedButWithinSuccessPercentage(ITestResult result) {
- // TODO Auto-generated method stub
-
+ setCurrentConfigurationToTestResultAttributes(result);
}
+
+ private void setCurrentConfigurationToTestResultAttributes(ITestResult result) {
+ result.setAttribute("matrix-configuration", currentConfiguration);
+ }
public void onStart(ITestContext context) {
- // TODO Auto-generated method stub
-
}
public void onFinish(ITestContext context) {
- // TODO Auto-generated method stub
-
}
}
14 years, 5 months
JBoss Rich Faces SVN: r18293 - in root/core/trunk: impl/src/main/java/org/richfaces/skin and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-07-30 08:38:54 -0400 (Fri, 30 Jul 2010)
New Revision: 18293
Modified:
root/core/trunk/api/src/main/java/org/richfaces/skin/Skin.java
root/core/trunk/impl/src/main/java/org/richfaces/skin/AbstractSkinFactory.java
root/core/trunk/impl/src/main/java/org/richfaces/skin/CompositeSkinImpl.java
root/core/trunk/impl/src/main/java/org/richfaces/skin/SkinBean.java
root/core/trunk/impl/src/main/java/org/richfaces/skin/SkinImpl.java
Log:
Added getName() method to skins
Modified: root/core/trunk/api/src/main/java/org/richfaces/skin/Skin.java
===================================================================
--- root/core/trunk/api/src/main/java/org/richfaces/skin/Skin.java 2010-07-30 12:30:53 UTC (rev 18292)
+++ root/core/trunk/api/src/main/java/org/richfaces/skin/Skin.java 2010-07-30 12:38:54 UTC (rev 18293)
@@ -323,6 +323,8 @@
*/
public int hashCode(FacesContext context);
+ public String getName();
+
// Preferable parameters
/**
Modified: root/core/trunk/impl/src/main/java/org/richfaces/skin/AbstractSkinFactory.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/skin/AbstractSkinFactory.java 2010-07-30 12:30:53 UTC (rev 18292)
+++ root/core/trunk/impl/src/main/java/org/richfaces/skin/AbstractSkinFactory.java 2010-07-30 12:38:54 UTC (rev 18293)
@@ -124,7 +124,7 @@
Properties skinParams = loadProperties(name, SKINS_PATHS);
processProperties(context, skinParams);
- return new SkinImpl(skinParams);
+ return new SkinImpl(skinParams, name);
}
/**
Modified: root/core/trunk/impl/src/main/java/org/richfaces/skin/CompositeSkinImpl.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/skin/CompositeSkinImpl.java 2010-07-30 12:30:53 UTC (rev 18292)
+++ root/core/trunk/impl/src/main/java/org/richfaces/skin/CompositeSkinImpl.java 2010-07-30 12:38:54 UTC (rev 18293)
@@ -55,6 +55,18 @@
return false;
}
+ public String getName() {
+ for (Skin skin : skinsChain) {
+ if (skin == null) {
+ continue;
+ }
+
+ return skin.getName();
+ }
+
+ throw new IllegalStateException();
+ }
+
public int hashCode(FacesContext context) {
int hash = hashCode;
Modified: root/core/trunk/impl/src/main/java/org/richfaces/skin/SkinBean.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/skin/SkinBean.java 2010-07-30 12:30:53 UTC (rev 18292)
+++ root/core/trunk/impl/src/main/java/org/richfaces/skin/SkinBean.java 2010-07-30 12:38:54 UTC (rev 18293)
@@ -163,4 +163,8 @@
public Integer getIntegerParameter(FacesContext context, String name, Object defaultValue) {
return getSkin().getIntegerParameter(context, name, defaultValue);
}
+
+ public String getName() {
+ return getSkin().getName();
+ }
}
Modified: root/core/trunk/impl/src/main/java/org/richfaces/skin/SkinImpl.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/skin/SkinImpl.java 2010-07-30 12:30:53 UTC (rev 18292)
+++ root/core/trunk/impl/src/main/java/org/richfaces/skin/SkinImpl.java 2010-07-30 12:38:54 UTC (rev 18293)
@@ -50,6 +50,8 @@
}
}
+ private String name;
+
private MutableInteger getCounter(FacesContext context) {
Map<Object, Object> attr = context.getAttributes();
@@ -120,8 +122,9 @@
*
* @param skinName
*/
- SkinImpl(Map<Object, Object> properties) {
+ SkinImpl(Map<Object, Object> properties, String name) {
this.skinParams = properties;
+ this.name = name;
}
protected Map<Object, Object> getSkinParams() {
@@ -223,6 +226,10 @@
return containsProperty(facesContext, name);
}
+ public String getName() {
+ return name;
+ }
+
public int hashCode(FacesContext context) {
int hash = 0;
for (Map.Entry<Object, Object> entry : skinParams.entrySet()) {
@@ -243,5 +250,5 @@
return hash;
}
-
+
}
14 years, 5 months
JBoss Rich Faces SVN: r18292 - root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-07-30 08:30:53 -0400 (Fri, 30 Jul 2010)
New Revision: 18292
Modified:
root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/VersionBean.java
Log:
* fixed method toString in VersionBean
Modified: root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/VersionBean.java
===================================================================
--- root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/VersionBean.java 2010-07-30 12:29:04 UTC (rev 18291)
+++ root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/VersionBean.java 2010-07-30 12:30:53 UTC (rev 18292)
@@ -104,6 +104,6 @@
@Override
public String toString() {
- return getVersion();
+ return getFullVersion();
}
}
Property changes on: root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/VersionBean.java
___________________________________________________________________
Name: svn:keywords
+ Revision
14 years, 5 months
JBoss Rich Faces SVN: r18291 - in root/tests/metamer/trunk/application: src/main/java/org/richfaces/tests/metamer/bean and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-07-30 08:29:04 -0400 (Fri, 30 Jul 2010)
New Revision: 18291
Added:
root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/VersionBean.java
root/tests/metamer/trunk/application/src/main/resources/version.properties
Modified:
root/tests/metamer/trunk/application/pom.xml
root/tests/metamer/trunk/application/src/main/webapp/index.xhtml
root/tests/metamer/trunk/application/src/main/webapp/templates/list.xhtml
root/tests/metamer/trunk/application/src/main/webapp/templates/template.xhtml
Log:
* added version bean so that application's version can be shown on pages
Modified: root/tests/metamer/trunk/application/pom.xml
===================================================================
--- root/tests/metamer/trunk/application/pom.xml 2010-07-30 12:10:15 UTC (rev 18290)
+++ root/tests/metamer/trunk/application/pom.xml 2010-07-30 12:29:04 UTC (rev 18291)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
- <!--
+<!--
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
@@ -117,19 +117,30 @@
<build>
<finalName>metamer</finalName>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+
<plugins>
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
</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>
- <attachClasses>true</attachClasses>
- </configuration>
- </plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <attachClasses>true</attachClasses>
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
@@ -144,6 +155,41 @@
</connectors>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>buildnumber-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <doCheck>false</doCheck>
+ <doUpdate>false</doUpdate>
+ <revisionOnScmFailure>unknown</revisionOnScmFailure>
+ <timestampFormat>{0,date,MMM dd, yyyy H:mm:ss zzz}</timestampFormat>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <attachClasses>true</attachClasses>
+ <archive>
+ <manifest>
+ <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+ <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
+ </manifest>
+ <manifestEntries>
+ <SCM-Revision>${buildNumber}</SCM-Revision>
+ <SCM-Timestamp>${timestamp}</SCM-Timestamp>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
</plugins>
</build>
@@ -304,3 +350,4 @@
+
Added: root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/VersionBean.java
===================================================================
--- root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/VersionBean.java (rev 0)
+++ root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/VersionBean.java 2010-07-30 12:29:04 UTC (rev 18291)
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * 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.tests.metamer.bean;
+
+import java.io.InputStream;
+import java.util.Properties;
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ApplicationScoped;
+import javax.faces.bean.ManagedBean;
+
+import org.richfaces.log.RichfacesLogger;
+import org.slf4j.Logger;
+
+/**
+ * Vendor and version information for project Metamer.
+ *
+ * @author asmirnov(a)exadel.com, <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "metamer")
+@ApplicationScoped
+public final class VersionBean {
+
+ private static final Logger LOGGER = RichfacesLogger.APPLICATION.getLogger();
+ private String implementationVendor;
+ private String implementationVersion;
+ private String implementationTitle;
+ private String scmRevision;
+ private String scmTimestamp;
+ private String fullVersion;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ Properties properties = new Properties();
+ try {
+ InputStream inStream = getClass().getClassLoader().getResourceAsStream("version.properties");
+ properties.load(inStream);
+ } catch (Exception e) {
+ LOGGER.warn("Unable to load version.properties using PomVersion.class.getClassLoader().getResourceAsStream(...)", e);
+ }
+
+ implementationTitle = properties.getProperty("Implementation-Title");
+ implementationVendor = properties.getProperty("Implementation-Vendor");
+ implementationVersion = properties.getProperty("Implementation-Version");
+ scmRevision = properties.getProperty("SCM-Revision");
+ scmTimestamp = properties.getProperty("SCM-Timestamp");
+ }
+
+ public String getVendor() {
+ return implementationVendor;
+ }
+
+ public String getTitle() {
+ return implementationTitle;
+ }
+
+ public String getRevision() {
+ return scmRevision;
+ }
+
+ public String getTimestamp() {
+ return scmTimestamp;
+ }
+
+ public String getVersion() {
+ return implementationVersion;
+ }
+
+ public String getFullVersion() {
+ if (fullVersion != null) {
+ return fullVersion;
+ }
+
+ if (implementationVersion == null) {
+ implementationVersion = "Metamer: RichFaces Testing Application, version unknown";
+ return implementationVersion;
+ }
+
+ fullVersion = implementationTitle + " by " + implementationVendor + ", version " + implementationVersion + " SVN r. " + scmRevision;
+ return fullVersion;
+ }
+
+ @Override
+ public String toString() {
+ return getVersion();
+ }
+}
Added: root/tests/metamer/trunk/application/src/main/resources/version.properties
===================================================================
--- root/tests/metamer/trunk/application/src/main/resources/version.properties (rev 0)
+++ root/tests/metamer/trunk/application/src/main/resources/version.properties 2010-07-30 12:29:04 UTC (rev 18291)
@@ -0,0 +1,6 @@
+Implementation-Title=${project.name}
+Implementation-Version=${project.version}
+Implementation-Vendor-Id=${groupId}
+Implementation-Vendor=${project.organization.name}
+SCM-Revision=${buildNumber}
+SCM-Timestamp=${timestamp}
Modified: root/tests/metamer/trunk/application/src/main/webapp/index.xhtml
===================================================================
--- root/tests/metamer/trunk/application/src/main/webapp/index.xhtml 2010-07-30 12:10:15 UTC (rev 18290)
+++ root/tests/metamer/trunk/application/src/main/webapp/index.xhtml 2010-07-30 12:29:04 UTC (rev 18291)
@@ -61,6 +61,9 @@
<hr style="width: 900px; margin-left: 0px;"/>
#{a4j.version}
+ <br/>
+ #{metamer.fullVersion}
+
</h:form>
</h:body>
</html>
\ No newline at end of file
Modified: root/tests/metamer/trunk/application/src/main/webapp/templates/list.xhtml
===================================================================
--- root/tests/metamer/trunk/application/src/main/webapp/templates/list.xhtml 2010-07-30 12:10:15 UTC (rev 18290)
+++ root/tests/metamer/trunk/application/src/main/webapp/templates/list.xhtml 2010-07-30 12:29:04 UTC (rev 18291)
@@ -49,5 +49,7 @@
<hr style="width: 900px; margin-left: 0px;"/>
#{a4j.version}
+ <br/>
+ #{metamer.fullVersion}
</h:body>
</html>
Modified: root/tests/metamer/trunk/application/src/main/webapp/templates/template.xhtml
===================================================================
--- root/tests/metamer/trunk/application/src/main/webapp/templates/template.xhtml 2010-07-30 12:10:15 UTC (rev 18290)
+++ root/tests/metamer/trunk/application/src/main/webapp/templates/template.xhtml 2010-07-30 12:29:04 UTC (rev 18291)
@@ -53,10 +53,14 @@
<a4j:log id="a4jLog" height="300px" rendered="#{richBean.log}" />
</h:panelGroup>
- <div class="footer"><ui:insert name="footer">
+ <div class="footer">
+ <ui:insert name="footer">
<hr />
#{a4j.version}
- </ui:insert></div>
+ <br/>
+ #{metamer.fullVersion}
+ </ui:insert>
+ </div>
</h:form>
</h:body>
14 years, 5 months
JBoss Rich Faces SVN: r18290 - root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2010-07-30 08:10:15 -0400 (Fri, 30 Jul 2010)
New Revision: 18290
Modified:
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoCompleteBase.js
Log:
https://jira.jboss.org/browse/RF-8875
bug fixes
Modified: root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js
===================================================================
--- root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js 2010-07-30 11:40:03 UTC (rev 18289)
+++ root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js 2010-07-30 12:10:15 UTC (rev 18290)
@@ -28,7 +28,6 @@
}
if ((!this.lastKey || key.indexOf(this.lastKey)!=0) && newCache.length > 0) {
- //console && console.log && console.log("added key:"+key+" length:" + newCache.length)
this.cache[key] = newCache;
if (newCache.length==1) {
this.lastKey = key;
@@ -130,7 +129,6 @@
};
var onMouseAction = function(event) {
- console && console.log && console.log("mouseAction:" + event.type);
var element = $(event.target).closest(".rf-ac-i", event.currentTarget).get(0);
if (element) {
Modified: root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoCompleteBase.js
===================================================================
--- root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoCompleteBase.js 2010-07-30 11:40:03 UTC (rev 18289)
+++ root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoCompleteBase.js 2010-07-30 12:10:15 UTC (rev 18290)
@@ -86,17 +86,13 @@
var onSelectMouseDown = function () {
this.isMouseDown = true;
- //console && console.log && console.log("onMouseDown");
};
var onSelectMouseUp = function () {
- //this.isMouseDown = false;
rf.getDomElement(this.fieldId).focus();
- //console && console.log && console.log("onMouseUp");
};
var onButtonShow = function (event) {
this.isMouseDown = true;
- //console && console.log && console.log("onButtonShow - "+this.timeoutId);
if (this.timeoutId) {
window.clearTimeout(this.timeoutId);
this.timeoutId = null;
@@ -111,16 +107,13 @@
};
var onFocus = function (event) {
- //console && console.log && console.log("onFocus");
};
var onBlur = function (event) {
- //console && console.log && console.log("onBlur");
if (this.isMouseDown) {
rf.getDomElement(this.fieldId).focus();
this.isMouseDown = false;
- //console && console.log && console.log("---------> and focus");
- } else if (this.isVisible && !this.isMouseDown/*&& checkOnBlur.call(this, event)*/) {
+ } else if (this.isVisible && !this.isMouseDown) {
var _this = this;
this.timeoutId = window.setTimeout(function(){_this.hide();}, 200);
}
@@ -178,7 +171,6 @@
this.__onPageDown(event);
}
break;
- case rf.KEYS.TAB:
case rf.KEYS.RETURN:
event.preventDefault();
14 years, 5 months
JBoss Rich Faces SVN: r18289 - root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2010-07-30 07:40:03 -0400 (Fri, 30 Jul 2010)
New Revision: 18289
Modified:
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js
Log:
https://jira.jboss.org/browse/RF-8875
bug fixes
Modified: root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js
===================================================================
--- root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js 2010-07-30 11:21:50 UTC (rev 18288)
+++ root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js 2010-07-30 11:40:03 UTC (rev 18289)
@@ -307,9 +307,9 @@
var afterCursorStr = inputValue.substring(cursorPosition);
var pos = beforeCursorStr.search(REGEXP_TOKEN_LEFT);
- var startPos = pos!=-1 ? pos : 0;
+ var startPos = pos!=-1 ? pos : beforeCursorStr.length;
pos = afterCursorStr.search(REGEXP_TOKEN_RIGHT);
- var endPos = pos!=-1 ? pos : inputValue.length;
+ var endPos = pos!=-1 ? pos : afterCursorStr.length;
var beginNewValue = inputValue.substring(0, startPos) + value;
cursorPosition = beginNewValue.length;
14 years, 5 months
JBoss Rich Faces SVN: r18288 - root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2010-07-30 07:21:50 -0400 (Fri, 30 Jul 2010)
New Revision: 18288
Modified:
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoCompleteBase.js
Log:
https://jira.jboss.org/browse/RF-8875
right,left, backspace keys fixes
Modified: root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js
===================================================================
--- root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js 2010-07-29 23:17:51 UTC (rev 18287)
+++ root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js 2010-07-30 11:21:50 UTC (rev 18288)
@@ -262,7 +262,7 @@
if (event.which == rf.KEYS.RETURN || event.type == "click") {
this.setInputValue(subValue);
} else {
- selectItem.call(this, 0, false, event.which == rf.KEYS.BACKSPACE);
+ selectItem.call(this, 0, false, event.which == rf.KEYS.BACKSPACE || event.which == rf.KEYS.LEFT || event.which == rf.KEYS.RIGHT);
}
}
};
Modified: root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoCompleteBase.js
===================================================================
--- root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoCompleteBase.js 2010-07-29 23:17:51 UTC (rev 18287)
+++ root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoCompleteBase.js 2010-07-30 11:21:50 UTC (rev 18288)
@@ -135,8 +135,11 @@
//TODO: is it needed to chesk keys?
//TODO: we need to set value when autoFill used when LEFT or RIGHT was pressed
if (event.which == rf.KEYS.LEFT || event.which == rf.KEYS.RIGHT || flag) {
+ if (flag || this.isVisible) {
+ this.__onChangeValue(event);
+ }
if (flag) {
- this.__onChangeValue(event);
+ this.currentValue = this.getInputValue();
onShow.call(this, event);
}
}
14 years, 5 months
JBoss Rich Faces SVN: r18287 - in root/examples-sandbox/trunk/richfaces-showcase-gae: src/main/java/org/richfaces and 74 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-07-29 19:17:51 -0400 (Thu, 29 Jul 2010)
New Revision: 18287
Added:
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/SelectsBean.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/SkinBean.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/UserBean.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/data/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/data/RandomHelper.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/navigation/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/navigation/BaseDescriptor.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/navigation/DemoDescriptor.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/navigation/DemoNavigator.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/navigation/GroupDescriptor.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/navigation/NavigationParser.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/navigation/SampleDescriptor.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/function/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/function/FunctionBean.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/images/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/images/PageFooterGradient.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/images/PageHeaderGradient.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/images/PanelGradient.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/lists/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/lists/ListBean.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/mediaOutput/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/mediaOutput/MediaBean.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/mediaOutput/MediaData.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/outputPanel/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/outputPanel/OutputPanelBean.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/param/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/param/ParamBean.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/poll/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/poll/PollBean.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/push/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/push/Choice.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/push/ChoicesBean.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/queue/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/queue/QueueBean.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/region/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/region/RegionBean.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/CapitalsBean.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/CapitalsSortingBean.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/CarsBean.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/CarsFilteringBean.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/ReportBean.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/SlidesBean.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/capitals/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/capitals/Capital.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/capitals/CapitalsParser.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/cars/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/cars/InventoryItem.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/cars/InventoryVendorItem.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/cars/InventoryVendorList.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/expenses/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/expenses/ExpenseReport.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/expenses/ExpenseReportRecord.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/expenses/ExpenseReportRecordItem.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/slides/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/slides/Picture.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/view/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/view/SampleToolBarItem.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/view/ViewController.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/resource/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/resource/DictionaryResourceHandlerImpl.java
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/resources/META-INF/resources/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/resources/META-INF/resources/rich/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/resources/META-INF/resources/rich/css/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/resources/META-INF/resources/rich/css/page.ecss
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/resources/META-INF/resources/rich/css/panel.ecss
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/resources/log4j.xml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/resources/org/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/resources/org/richfaces/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/resources/org/richfaces/demo/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/resources/org/richfaces/demo/data/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/resources/org/richfaces/demo/data/capitals/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/resources/org/richfaces/demo/data/capitals/capitals.xml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/resources/org/richfaces/demo/data/common/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/resources/org/richfaces/demo/data/common/navigation.xml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/resources/org/richfaces/demo/mediaOutput/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/resources/org/richfaces/demo/mediaOutput/text.swf
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/WEB-INF/faces-config.xml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/WEB-INF/lib/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/ai.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/alabama.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/alaska.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/arizona.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/arkansas.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/california.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/colorado.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/connecticut.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/delaware.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/florida.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/georgia.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/hawaii.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/idaho.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/illinois.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/indiana.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/iowa.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/kansas.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/kentucky.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/louisiana.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/maine.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/maryland.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/massachusetts.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/michigan.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/minnesota.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/mississippi.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/missouri.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/montana.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/nebraska.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/nevada.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/newhampshire.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/newjersey.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/newmexico.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/newyork.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/northcarolina.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/northdakota.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/ohio.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/oklahoma.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/oregon.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/pennsylvania.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/rhodeisland.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/southcarolina.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/southdakota.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/tennessee.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/texas.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/utah.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/vermont.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/virginia.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/washington.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/westvirginia.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/wisconsin.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/wyoming.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/icons/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/icons/common/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/icons/common/rf.png
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/icons/scroller/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/icons/scroller/arr_left.png
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/icons/scroller/arr_right.png
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/nature/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/nature/pic1.jpg
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/nature/pic2.jpg
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/nature/pic3.jpg
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/nature/pic4.jpg
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/nature/pic5.jpg
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/nature/pic6.jpg
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/nature/pic7.jpg
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/nature/pic8.jpg
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/nature/pic9.jpg
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/note_bg.gif
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/richfaces-banner.png
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/resources/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/resources/rich/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/resources/rich/css/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/resources/rich/css/message.css
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/resources/rich/css/messages.css
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/resources/rich/message.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/resources/rich/messages.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/resources/rich/page.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/resources/rich/panel.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/resources/rich/toolBar.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/ajax/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/ajax/ajax.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/ajax/selectsUpdates.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/attachQueue/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/attachQueue/attachQueue.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/commandButton/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/commandButton/commandButton.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/commandLink/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/commandLink/commandLink.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/component-sample.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/componentControl/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/componentControl/tableFilteringAPI.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataGrid/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataGrid/grid.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataScroller/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataScroller/dataScrollerAPI.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataScroller/simpleScrolling.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataTable/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataTable/dataTableEdit.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataTable/simpleTable.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataTable/tableFiltering.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataTable/tableSorting.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataTable/tableStyling.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/extendedDataTable/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/extendedDataTable/simpleTable.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/functions/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/functions/functions.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/jsFunction/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/jsFunction/jsFunction.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/list/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/list/lists.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/log/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/log/log.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/mediaOutput/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/mediaOutput/flashUsage.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/mediaOutput/imgUsage.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/outputPanel/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/outputPanel/compositemessages.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/outputPanel/simple.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/panel/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/panel/lookCustomization.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/panel/simple.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/param/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/param/clientParam.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/param/param.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/param/skinChange.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/poll/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/poll/poll.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/push/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/push/push.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/queue/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/queue/queue.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/region/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/region/region.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/repeat/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/repeat/simpleGrid.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/skin.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/standardSkinning/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/standardSkinning/standardSkinning.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/status/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/status/referencedusage.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/status/simple.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/status/viewusage.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/subTableToggleControl/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/subTableToggleControl/subTableToggleControl.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/script/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/script/swfobject.js
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/templates/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/templates/includes/
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/templates/includes/navigation.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/templates/includes/skin-chooser.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/templates/main.xhtml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/welcome.xhtml
Modified:
root/examples-sandbox/trunk/richfaces-showcase-gae/pom.xml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/WEB-INF/appengine-web.xml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/WEB-INF/web.xml
root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/index.jsp
Log:
Latest changes in richfaces-showcase-gae
Modified: root/examples-sandbox/trunk/richfaces-showcase-gae/pom.xml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/pom.xml 2010-07-29 18:42:27 UTC (rev 18286)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/pom.xml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -121,38 +121,49 @@
<artifactId>jsf-impl</artifactId>
<version>2.0.2</version>
</dependency>
+
<dependency>
- <groupId>org.jboss.el</groupId>
- <artifactId>jboss-el</artifactId>
- <version>2.0.2.CR1</version>
- <type>jar</type>
- </dependency>
- <dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
- <type>jar</type>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.richfaces.examples</groupId>
- <artifactId>richfaces-showcase</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- <type>war</type>
- </dependency>
- <dependency>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
<version>2.7.1</version>
- <type>jar</type>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.9.1</version>
- <type>jar</type>
</dependency>
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ <version>2.0.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>richfaces-components-ui</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <version>1.5.8</version>
+ </dependency>
+ <dependency>
+ <groupId>el-impl</groupId>
+ <artifactId>el-impl</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <version>1.0</version>
+ </dependency>
</dependencies>
<!-- Build Settings -->
@@ -182,6 +193,80 @@
</testResources>
<plugins>
<plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>maven-jetty-plugin</artifactId>
+ <version>6.1.18</version>
+ <configuration>
+ <scanIntervalSeconds>10</scanIntervalSeconds>
+ <connectors>
+ <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
+ <port>${jetty.port}</port>
+ <maxIdleTime>60000</maxIdleTime>
+ </connector>
+ </connectors>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <webResources>
+ <resource>
+ <directory>src/main/webapp</directory>
+ </resource>
+ <resource>
+ <directory>${project.build.directory}/generated-resources</directory>
+ <targetPath>resources</targetPath>
+ </resource>
+ </webResources>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>4.0.0-SNAPSHOT</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>text/javascript</include>
+ <include>text/css</include>
+ <include>image/.+</include>
+ </includedContentTypes>
+ <fileNameMappings>
+ <property>
+ <name>^org\.richfaces\.renderkit\.html\.(images\.)?</name>
+ <value>org.richfaces/images/</value>
+ </property>
+ <property>
+ <name>^org\.richfaces\.demo\.images\.</name>
+ <value>org.richfaces.demo/images/</value>
+ </property>
+ <property>
+ <name>^css/</name>
+ <value>org.richfaces/css/</value>
+ </property>
+ </fileNameMappings>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptor>src/assembly/assembly.xml</descriptor>
@@ -189,18 +274,19 @@
<executions>
<execution>
<id>assemble</id>
+ <phase>generate-sources</phase>
<goals>
<goal>directory-single</goal>
</goals>
</execution>
</executions>
- </plugin>
+ </plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
- <source>1.5</source>
- <target>1.5</target>
+ <source>1.6</source>
+ <target>1.6</target>
</configuration>
</plugin>
<plugin>
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/SelectsBean.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/SelectsBean.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/SelectsBean.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,88 @@
+package org.richfaces.demo.common;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.RequestScoped;
+import javax.faces.event.ValueChangeEvent;
+import javax.faces.model.SelectItem;
+
+/**
+ * @author Ilya Shaikovsky
+ *
+ */
+@ManagedBean(name = "selectsBean")
+@RequestScoped
+public class SelectsBean {
+ private static final String[] FRUITS = {"", "Banana", "Cranberry", "Blueberry", "Orange"};
+ private static final String[] VEGETABLES = {"", "Potatoes", "Broccoli", "Garlic", "Carrot"};
+ private String currentItem = "";
+ private String currentType = "";
+ private List<SelectItem> firstList = new ArrayList<SelectItem>();
+ private List<SelectItem> secondList = new ArrayList<SelectItem>();
+
+ public SelectsBean() {
+ SelectItem item = new SelectItem("", "");
+
+ firstList.add(item);
+ item = new SelectItem("fruits", "Fruits");
+ firstList.add(item);
+ item = new SelectItem("vegetables", "Vegetables");
+ firstList.add(item);
+
+ for (int i = 0; i < FRUITS.length; i++) {
+ item = new SelectItem(FRUITS[i]);
+ }
+ }
+
+ public List<SelectItem> getFirstList() {
+ return firstList;
+ }
+
+ public List<SelectItem> getSecondList() {
+ return secondList;
+ }
+
+ public static String[] getFRUITS() {
+ return FRUITS;
+ }
+
+ public static String[] getVEGETABLES() {
+ return VEGETABLES;
+ }
+
+ public void valueChanged(ValueChangeEvent event) {
+ secondList.clear();
+
+ String[] currentItems;
+
+ if (((String) event.getNewValue()).equals("fruits")) {
+ currentItems = FRUITS;
+ } else {
+ currentItems = VEGETABLES;
+ }
+
+ for (int i = 0; i < currentItems.length; i++) {
+ SelectItem item = new SelectItem(currentItems[i]);
+
+ secondList.add(item);
+ }
+ }
+
+ public String getCurrentType() {
+ return currentType;
+ }
+
+ public void setCurrentType(String currentType) {
+ this.currentType = currentType;
+ }
+
+ public String getCurrentItem() {
+ return currentItem;
+ }
+
+ public void setCurrentItem(String currentItem) {
+ this.currentItem = currentItem;
+ }
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/SkinBean.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/SkinBean.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/SkinBean.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,70 @@
+/**
+ *
+ */
+package org.richfaces.demo.common;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ManagedProperty;
+import javax.faces.bean.SessionScoped;
+import javax.faces.context.FacesContext;
+
+/**
+ * @author ishaikovsky
+ */
+@ManagedBean(name = "skinBean")
+@SessionScoped
+public class SkinBean implements Serializable {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -2399884208294434812L;
+ private static final String SKIN_VIEW_PARAMETER = "skin";
+ @ManagedProperty(value = "blueSky")
+ private String skin;
+ private List<String> skins;
+
+ @PostConstruct
+ public void initialize() {
+ skins = new ArrayList<String>();
+ skins.add("blueSky");
+ skins.add("classic");
+ skins.add("deepMarine");
+ skins.add("emeraldTown");
+ skins.add("japanCherry");
+ skins.add("ruby");
+ skins.add("wine");
+ }
+
+ // TODO: move to utility class. used in navigator also.
+ private String getViewParameter(String name) {
+ FacesContext fc = FacesContext.getCurrentInstance();
+ String param = (String) fc.getExternalContext().getRequestParameterMap().get(name);
+ if (param != null && param.trim().length() > 0) {
+ return param;
+ } else {
+ return null;
+ }
+ }
+
+ public String getSkin() {
+ String currentSkin = getViewParameter(SKIN_VIEW_PARAMETER);
+ if (currentSkin != null){
+ skin = currentSkin;
+ }
+ return skin;
+ }
+
+ public void setSkin(String skin) {
+ this.skin = skin;
+ }
+
+ public List<String> getSkins() {
+ return skins;
+ }
+
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/UserBean.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/UserBean.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/UserBean.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,116 @@
+package org.richfaces.demo.common;
+
+import java.io.Serializable;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.RequestScoped;
+
+@ManagedBean(name = "userBean")
+@RequestScoped
+public class UserBean implements Serializable {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -1302624685391683020L;
+ private String name = "";
+ private String email = "";
+ private String password = "";
+ private String address;
+ private Integer age;
+ private String city;
+ private String job;
+ private String recordStatus;
+ private String zip;
+
+ public UserBean() {
+ super();
+ }
+
+ public void store() {
+ this.recordStatus = "User " + this.name + " stored succesfully";
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ public String getRecordStatus() {
+ return recordStatus;
+ }
+
+ public void setRecordStatus(String recordStatus) {
+ this.recordStatus = recordStatus;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String nameItJohn() {
+ setName("John");
+
+ return null;
+ }
+
+ public String nameItMark() {
+ setName("Mark");
+
+ return null;
+ }
+
+ public String getJob() {
+ return job;
+ }
+
+ public void setJob(String job) {
+ this.job = job;
+ }
+
+ public String getAddress() {
+ return address;
+ }
+
+ public void setAddress(String address) {
+ this.address = address;
+ }
+
+ public String getCity() {
+ return city;
+ }
+
+ public void setCity(String city) {
+ this.city = city;
+ }
+
+ public String getZip() {
+ return zip;
+ }
+
+ public void setZip(String zip) {
+ this.zip = zip;
+ }
+
+ public Integer getAge() {
+ return age;
+ }
+
+ public void setAge(Integer age) {
+ this.age = age;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/data/RandomHelper.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/data/RandomHelper.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/data/RandomHelper.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,37 @@
+package org.richfaces.demo.common.data;
+
+import java.util.Random;
+
+public final class RandomHelper {
+
+ private RandomHelper() {
+
+ }
+
+ public static int genRand() {
+ return rand(1, 10000);
+ }
+
+ public static int rand(int lo, int hi) {
+ Random rn2 = new Random();
+ int n = hi - lo + 1;
+ int i = rn2.nextInt() % n;
+
+ if (i < 0) {
+ i = -i;
+ }
+
+ return lo + i;
+ }
+
+ public static String randomstring(int lo, int hi) {
+ int n = rand(lo, hi);
+ byte[] b = new byte[n];
+
+ for (int i = 0; i < n; i++) {
+ b[i] = (byte) rand('A', 'Z');
+ }
+
+ return new String(b);
+ }
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/navigation/BaseDescriptor.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/navigation/BaseDescriptor.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/navigation/BaseDescriptor.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,51 @@
+package org.richfaces.demo.common.navigation;
+
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+
+public class BaseDescriptor implements Serializable {
+
+ private static final long serialVersionUID = 5614594358147757458L;
+
+ private String id;
+ private String name;
+ private boolean newItem;
+ private boolean currentItem;
+
+ @XmlElement
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @XmlAttribute(name = "new")
+ public boolean isNewItem() {
+ return newItem;
+ }
+
+ public void setNewItem(boolean newItem) {
+ this.newItem = newItem;
+ }
+
+ public boolean isCurrentItem() {
+ return currentItem;
+ }
+
+ public void setCurrentItem(boolean currentItem) {
+ this.currentItem = currentItem;
+ }
+
+ @XmlElement
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/navigation/DemoDescriptor.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/navigation/DemoDescriptor.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/navigation/DemoDescriptor.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,35 @@
+package org.richfaces.demo.common.navigation;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+
+public class DemoDescriptor extends BaseDescriptor {
+
+ private static final long serialVersionUID = 6822187362271025752L;
+
+ private static final String BASE_SAMPLES_DIR = "/richfaces/";
+
+ private List<SampleDescriptor> samples;
+
+ public SampleDescriptor getSampleById(String id) {
+ for (SampleDescriptor sample : getSamples()) {
+ if (sample.getId().equals(id)) {
+ return sample;
+ }
+ }
+ return samples.get(0);
+ }
+
+ @XmlElementWrapper(name = "samples")
+ @XmlElement(name = "sample")
+ public List<SampleDescriptor> getSamples() {
+ return samples;
+ }
+
+ public void setSamples(List<SampleDescriptor> samples) {
+ this.samples = samples;
+ }
+
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/navigation/DemoNavigator.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/navigation/DemoNavigator.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/navigation/DemoNavigator.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,134 @@
+package org.richfaces.demo.common.navigation;
+
+import java.io.Serializable;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.annotation.PostConstruct;
+import javax.faces.application.ConfigurableNavigationHandler;
+import javax.faces.application.NavigationCase;
+import javax.faces.application.NavigationHandler;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ManagedProperty;
+import javax.faces.bean.SessionScoped;
+import javax.faces.context.FacesContext;
+
+@ManagedBean
+@SessionScoped
+public class DemoNavigator implements Serializable {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 3970933260901989658L;
+ private static final String DEMO_VIEW_PARAMETER = "demo";
+ private static final String SAMPLE_VIEW_PARAMETER = "sample";
+ private static final String SEPARATOR = "/";
+
+ @ManagedProperty(value = "#{navigationParser.groupsList}")
+ private List<GroupDescriptor> groups;
+ private DemoDescriptor currentDemo;
+ private SampleDescriptor currentSample;
+ private String sample;
+ private String demo;
+
+ @PostConstruct
+ public void init() {
+ currentDemo =null;
+ currentSample = null;
+ }
+
+ public DemoDescriptor getCurrentDemo() {
+ String id = getViewParameter(DEMO_VIEW_PARAMETER);
+ if (currentDemo == null || !currentDemo.getId().equals(id)) {
+ if (id != null) {
+ currentDemo = findDemoById(id);
+ currentSample = null;
+ }
+ if (currentDemo == null) {
+ currentDemo = groups.get(0).getDemos().get(0);
+ currentSample = null;
+ }
+ }
+ return currentDemo;
+ }
+
+ public SampleDescriptor getCurrentSample() {
+ String id = getViewParameter(SAMPLE_VIEW_PARAMETER);
+ if (currentSample == null || !currentSample.getId().equals(id)) {
+ if (id != null) {
+ currentSample = getCurrentDemo().getSampleById(id);
+ }
+ if (currentSample == null) {
+ currentSample = getCurrentDemo().getSamples().get(0);
+ }
+ }
+ return currentSample;
+ }
+
+ private String getViewParameter(String name) {
+ FacesContext fc = FacesContext.getCurrentInstance();
+ String param = (String) fc.getExternalContext().getRequestParameterMap().get(name);
+ if (param != null && param.trim().length() > 0) {
+ return param;
+ } else {
+ return null;
+ }
+ }
+
+ public DemoDescriptor findDemoById(String id) {
+ Iterator<GroupDescriptor> it = groups.iterator();
+ while (it.hasNext()) {
+ GroupDescriptor group = it.next();
+ Iterator<DemoDescriptor> dit = group.getDemos().iterator();
+ while (dit.hasNext()) {
+ DemoDescriptor demo = (DemoDescriptor) dit.next();
+ if (demo.getId().equals(id)) {
+ return demo;
+ }
+ }
+ }
+ return null;
+ }
+
+ public String getSampleURI() {
+ DemoDescriptor currentDemo = getCurrentDemo();
+ FacesContext context = FacesContext.getCurrentInstance();
+
+ NavigationHandler handler = context.getApplication().getNavigationHandler();
+
+ if (handler instanceof ConfigurableNavigationHandler) {
+ ConfigurableNavigationHandler navigationHandler = (ConfigurableNavigationHandler) handler;
+
+ NavigationCase navCase = navigationHandler.getNavigationCase(context, null, getCurrentDemo().getId()
+ + SEPARATOR + getCurrentSample().getId());
+
+ return navCase.getToViewId(context);
+ }
+
+ return null;
+ }
+
+ public List<GroupDescriptor> getGroups() {
+ return groups;
+ }
+
+ public void setGroups(List<GroupDescriptor> groups) {
+ this.groups = groups;
+ }
+
+ public String getSample() {
+ return sample;
+ }
+
+ public void setSample(String sample) {
+ this.sample = sample;
+ }
+
+ public String getDemo() {
+ return demo;
+ }
+
+ public void setDemo(String demo) {
+ this.demo = demo;
+ }
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/navigation/GroupDescriptor.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/navigation/GroupDescriptor.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/navigation/GroupDescriptor.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,24 @@
+package org.richfaces.demo.common.navigation;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+
+public class GroupDescriptor extends BaseDescriptor {
+
+ private static final long serialVersionUID = -3481702232804120885L;
+
+ private List<DemoDescriptor> demos;
+
+ @XmlElementWrapper(name="demos")
+ @XmlElement(name="demo")
+ public List<DemoDescriptor> getDemos() {
+ return demos;
+ }
+
+ public void setDemos(List<DemoDescriptor> demos) {
+ this.demos = demos;
+ }
+
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/navigation/NavigationParser.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/navigation/NavigationParser.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/navigation/NavigationParser.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,52 @@
+package org.richfaces.demo.common.navigation;
+
+import java.net.URL;
+import java.util.List;
+
+import javax.faces.FacesException;
+import javax.faces.bean.ApplicationScoped;
+import javax.faces.bean.ManagedBean;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+@ManagedBean
+@ApplicationScoped
+public class NavigationParser {
+
+ private List<GroupDescriptor> groupsList;
+
+ @XmlRootElement(name = "root")
+ private static final class CapitalsHolder {
+
+ private List<GroupDescriptor> groups;
+
+ @XmlElement(name = "group")
+ public List<GroupDescriptor> getGroups() {
+ return groups;
+ }
+
+ @SuppressWarnings("unused")
+ public void setGroups(List<GroupDescriptor> groups) {
+ this.groups = groups;
+ }
+ }
+
+ public synchronized List<GroupDescriptor> getGroupsList() {
+ if (groupsList == null) {
+ ClassLoader ccl = Thread.currentThread().getContextClassLoader();
+ URL resource = ccl.getResource("org/richfaces/demo/data/common/navigation.xml");
+ JAXBContext context;
+ try {
+ context = JAXBContext.newInstance(CapitalsHolder.class);
+ CapitalsHolder capitalsHolder = (CapitalsHolder) context.createUnmarshaller().unmarshal(resource);
+ groupsList = capitalsHolder.getGroups();
+ } catch (JAXBException e) {
+ throw new FacesException(e.getMessage(), e);
+ }
+ }
+
+ return groupsList;
+ }
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/navigation/SampleDescriptor.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/navigation/SampleDescriptor.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/common/navigation/SampleDescriptor.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,8 @@
+package org.richfaces.demo.common.navigation;
+
+
+public class SampleDescriptor extends BaseDescriptor {
+
+ private static final long serialVersionUID = 2704627392818039062L;
+
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/function/FunctionBean.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/function/FunctionBean.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/function/FunctionBean.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,23 @@
+package org.richfaces.demo.function;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.RequestScoped;
+import javax.faces.context.FacesContext;
+
+@ManagedBean(name = "functionBean")
+@RequestScoped
+public class FunctionBean {
+ private String text;
+
+ public void processHover() {
+ setText(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("name"));
+ }
+
+ public String getText() {
+ return text;
+ }
+
+ public void setText(String text) {
+ this.text = text;
+ }
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/images/PageFooterGradient.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/images/PageFooterGradient.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/images/PageFooterGradient.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,27 @@
+package org.richfaces.demo.images;
+
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.geom.AffineTransform;
+
+import org.richfaces.renderkit.html.BaseGradient;
+import org.richfaces.skin.Skin;
+
+public class PageFooterGradient extends BaseGradient {
+
+ private static final int HEIGHT = 96;
+
+ public PageFooterGradient() {
+ super(1, HEIGHT, -1, Skin.HEADER_BACKGROUND_COLOR, Skin.GENERAL_BACKGROUND_COLOR);
+ }
+
+ @Override
+ protected void paintGradient(Graphics2D g2d, Dimension dim) {
+ Dimension halfHeightDim = new Dimension();
+ halfHeightDim.setSize(dim.getWidth(), dim.getHeight() / 2);
+ super.paintGradient(g2d, halfHeightDim);
+ AffineTransform transform = new AffineTransform(1, 0, 0, -1, 0, HEIGHT);
+ g2d.transform(transform);
+ super.paintGradient(g2d, halfHeightDim);
+ }
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/images/PageHeaderGradient.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/images/PageHeaderGradient.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/images/PageHeaderGradient.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,10 @@
+package org.richfaces.demo.images;
+
+import org.richfaces.renderkit.html.BaseGradient;
+import org.richfaces.skin.Skin;
+
+public class PageHeaderGradient extends BaseGradient {
+ public PageHeaderGradient() {
+ super(1, 80, 30, Skin.HEADER_BACKGROUND_COLOR, Skin.HEADER_GRADIENT_COLOR);
+ }
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/images/PanelGradient.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/images/PanelGradient.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/images/PanelGradient.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,10 @@
+package org.richfaces.demo.images;
+
+import org.richfaces.renderkit.html.BaseGradient;
+import org.richfaces.skin.Skin;
+
+public class PanelGradient extends BaseGradient {
+ public PanelGradient() {
+ super(30, 50, 20, Skin.HEADER_GRADIENT_COLOR, Skin.HEADER_BACKGROUND_COLOR);
+ }
+}
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/lists/ListBean.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/lists/ListBean.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/lists/ListBean.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,18 @@
+package org.richfaces.demo.lists;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.RequestScoped;
+
+@ManagedBean
+@RequestScoped
+public class ListBean {
+ private String listType = "ordered";
+
+ public String getListType() {
+ return listType;
+ }
+
+ public void setListType(String listType) {
+ this.listType = listType;
+ }
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/mediaOutput/MediaBean.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/mediaOutput/MediaBean.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/mediaOutput/MediaBean.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,92 @@
+package org.richfaces.demo.mediaOutput;
+
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Graphics2D;
+import java.awt.geom.AffineTransform;
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.Serializable;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+import javax.imageio.ImageIO;
+
+@ManagedBean(name = "mediaBean")
+@SessionScoped
+public class MediaBean implements Serializable {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -4483889108870388747L;
+
+ public void paint(OutputStream out, Object data) throws IOException {
+ if (data instanceof MediaData) {
+ MediaData paintData = (MediaData) data;
+ BufferedImage img = new BufferedImage(paintData.width, paintData.height, BufferedImage.TYPE_INT_RGB);
+ Graphics2D g2d = img.createGraphics();
+
+ g2d.setColor(Color.WHITE);
+ g2d.fillRect(0, 0, 300, 120);
+
+ int testLenght = paintData.text.length();
+ int fontSize = testLenght < 8 ? 40 : 40 - (testLenght - 8);
+
+ if (fontSize < 12) {
+ fontSize = 12;
+ }
+
+ Font font = new Font("Serif", Font.HANGING_BASELINE, fontSize);
+
+ g2d.setFont(font);
+
+ int x = 10;
+ int y = fontSize * 5 / 2;
+
+ g2d.translate(x, y);
+
+ Color color = new Color(paintData.color);
+
+ g2d.setPaint(new Color(color.getRed(), color.getGreen(), color.getBlue(), 30));
+
+ AffineTransform origTransform = g2d.getTransform();
+
+ g2d.shear(-0.5 * paintData.scale, 0);
+ g2d.scale(1, paintData.scale);
+ g2d.drawString(paintData.text, 0, 0);
+ g2d.setTransform(origTransform);
+ g2d.setPaint(color);
+ g2d.drawString(paintData.text, 0, 0);
+ ImageIO.write(img, "jpeg", out);
+ }
+ }
+
+ private void copy(InputStream in, OutputStream out) throws IOException {
+ byte[] buffer = new byte[2048];
+ int read;
+
+ while ((read = in.read(buffer)) != -1) {
+ out.write(buffer, 0, read);
+ }
+ }
+
+ public void paintFlash(OutputStream out, Object data) throws IOException {
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+
+ if (loader == null) {
+ loader = getClass().getClassLoader();
+ }
+
+ InputStream stream = loader.getResourceAsStream("org/richfaces/demo/mediaOutput/text.swf");
+
+ if (stream != null) {
+ try {
+ copy(stream, out);
+ } finally {
+ stream.close();
+ }
+ }
+ }
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/mediaOutput/MediaData.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/mediaOutput/MediaData.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/mediaOutput/MediaData.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,68 @@
+package org.richfaces.demo.mediaOutput;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+
+import java.io.Serializable;
+
+@ManagedBean(name = "mediaData")
+@SessionScoped
+public class MediaData implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+ int height = 120;
+ int width = 300;
+ Integer color;
+ float scale;
+ String text;
+
+ public MediaData() {
+ setText("RichFaces 4.0");
+ setColor(1000);
+ setScale(2);
+ System.out.println("MediaData instantiated");
+ }
+
+ public Integer getColor() {
+ return color;
+ }
+
+ public void setColor(Integer color) {
+ this.color = color;
+ }
+
+ public float getScale() {
+ return scale;
+ }
+
+ public void setScale(float scale) {
+ this.scale = scale;
+ }
+
+ public String getText() {
+ return text;
+ }
+
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ public int getWidth() {
+ return width;
+ }
+
+ public void setWidth(int width) {
+ this.width = width;
+ }
+
+ public int getHeight() {
+ return height;
+ }
+
+ public void setHeight(int height) {
+ this.height = height;
+ }
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/outputPanel/OutputPanelBean.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/outputPanel/OutputPanelBean.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/outputPanel/OutputPanelBean.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,13 @@
+package org.richfaces.demo.outputPanel;
+
+public class OutputPanelBean {
+ private String text;
+
+ public String getText() {
+ return text;
+ }
+
+ public void setText(String text) {
+ this.text = text;
+ }
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/param/ParamBean.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/param/ParamBean.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/param/ParamBean.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,34 @@
+package org.richfaces.demo.param;
+
+import java.io.Serializable;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.RequestScoped;
+
+@ManagedBean
+@RequestScoped
+public class ParamBean implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -5704132574704883576L;
+ private String screenWidth;
+ private String screenHeight;
+
+ public String getScreenWidth() {
+ return screenWidth;
+ }
+
+ public void setScreenWidth(String screenWidth) {
+ this.screenWidth = screenWidth;
+ }
+
+ public String getScreenHeight() {
+ return screenHeight;
+ }
+
+ public void setScreenHeight(String screenHeight) {
+ this.screenHeight = screenHeight;
+ }
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/poll/PollBean.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/poll/PollBean.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/poll/PollBean.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,62 @@
+/**
+ *
+ */
+package org.richfaces.demo.poll;
+
+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 PollBean implements Serializable{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 7871292328251171957L;
+ private Date pollStartTime;
+ private boolean pollEnabled;
+
+ public PollBean() {
+ pollEnabled = true;
+ }
+
+ public Date getDate() {
+ Date date = new Date();
+ if (null == pollStartTime) {
+ pollStartTime = new Date();
+ return date;
+ }
+ if ((date.getTime() - pollStartTime.getTime()) >= 60000) {
+ setPollEnabled(false);
+ }
+ return date;
+ }
+
+ public boolean getPollEnabled() {
+ return pollEnabled;
+ }
+
+ public void setPollEnabled(boolean pollEnabled) {
+ if (pollEnabled) {
+ setPollStartTime(null);
+ }
+ this.pollEnabled = pollEnabled;
+ }
+
+ public Date getPollStartTime() {
+ return pollStartTime;
+ }
+
+ public void setPollStartTime(Date pollStartTime) {
+ this.pollStartTime = pollStartTime;
+ }
+
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/push/Choice.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/push/Choice.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/push/Choice.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,37 @@
+package org.richfaces.demo.push;
+
+import java.io.Serializable;
+
+public class Choice implements Serializable {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -2607532067110473166L;
+ private String label;
+ private int votesCount;
+
+ public Choice(String label) {
+ this.label = label;
+ this.votesCount = 0;
+ }
+
+ public void increment(int i) {
+ this.votesCount += i;
+ }
+
+ public String getLabel() {
+ return label;
+ }
+
+ public void setLabel(String label) {
+ this.label = label;
+ }
+
+ public int getVotesCount() {
+ return votesCount;
+ }
+
+ public void setVotesCount(int votesCount) {
+ this.votesCount = votesCount;
+ }
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/push/ChoicesBean.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/push/ChoicesBean.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/push/ChoicesBean.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,167 @@
+package org.richfaces.demo.push;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.EventListener;
+import java.util.EventObject;
+import java.util.List;
+import java.util.Random;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+
+import org.ajax4jsf.event.PushEventListener;
+
+@ManagedBean(name = "choicesBean")
+@SessionScoped
+public class ChoicesBean implements Runnable, Serializable {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 4734010583616555915L;
+
+ transient PushEventListener listener;
+
+ private boolean enabled = false;
+ private List<Choice> choices;
+ private List<Choice> lastVotes;
+ private Date startDate;
+ private transient Thread thread;
+ private String updateInfo;
+
+ public ChoicesBean() {
+ choices = new ArrayList<Choice>();
+ lastVotes = new ArrayList<Choice>();
+ choices.add(new Choice("Orange"));
+ choices.add(new Choice("Pineapple"));
+ choices.add(new Choice("Banana"));
+ choices.add(new Choice("Kiwifruit"));
+ choices.add(new Choice("Apple"));
+ lastVotes.add(new Choice("Orange"));
+ lastVotes.add(new Choice("Pineapple"));
+ lastVotes.add(new Choice("Banana"));
+ lastVotes.add(new Choice("Kiwifruit"));
+ lastVotes.add(new Choice("Apple"));
+ }
+
+ public List<Choice> getChoices() {
+ return choices;
+ }
+
+ public void setChoices(List<Choice> choices) {
+ this.choices = choices;
+ }
+
+ public void addListener(EventListener listener) {
+ if (this.listener != listener) {
+ this.listener = (PushEventListener) listener;
+ }
+ }
+
+ public Date getTimeStamp() {
+ return new Date();
+ }
+
+ public synchronized void start() {
+ if (thread == null) {
+ setStartDate(new Date());
+ setEnabled(true);
+ thread = new Thread(this);
+ thread.setDaemon(true);
+ thread.start();
+ }
+ }
+
+ public synchronized void stop() {
+ if (thread != null) {
+ setStartDate(null);
+ setEnabled(false);
+ thread = null;
+ }
+ }
+
+ public static int rand(int lo, int hi) {
+ Random rn2 = new Random();
+ int n = hi - lo + 1;
+ int i = rn2.nextInt() % n;
+
+ if (i < 0) {
+ i = -i;
+ }
+
+ return lo + i;
+ }
+
+ public void run() {
+ while (thread != null) {
+ try {
+ if (((new Date()).getTime() - startDate.getTime()) >= 60000) {
+ stop();
+ }
+
+ // changing votes count
+ for (Choice choice : lastVotes) {
+ choice.setVotesCount(rand(0, 3));
+ }
+
+ // System.out.println("New Event!");
+ listener.onEvent(new EventObject(this));
+ Thread.sleep(5000);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ public void processUpdates() {
+ for (Choice choice : lastVotes) {
+ if (choice.getVotesCount() > 0) {
+ int index = lastVotes.indexOf(choice);
+
+ choices.get(index).increment(choice.getVotesCount());
+ }
+ }
+
+ updateInfo = "[ ";
+
+ for (Choice choice : lastVotes) {
+ updateInfo += choice.getVotesCount() + " ";
+ }
+
+ updateInfo += "] ";
+
+ // System.out.println("ChoicesBean.processUpdates()");
+ }
+
+ public Thread getThread() {
+ return thread;
+ }
+
+ public boolean isEnabled() {
+
+ // System.out.println("ChoicesBean.isEnabled()");
+ // System.out.println(enabled);
+ return enabled;
+ }
+
+ public void setEnabled(boolean enabled) {
+ this.enabled = enabled;
+ }
+
+ public Date getStartDate() {
+ return startDate;
+ }
+
+ public void setStartDate(Date startDate) {
+ this.startDate = startDate;
+ }
+
+ public String getUpdateInfo() {
+ return updateInfo;
+ }
+
+ public List<Choice> getLastVotes() {
+ return lastVotes;
+ }
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/queue/QueueBean.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/queue/QueueBean.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/queue/QueueBean.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,65 @@
+package org.richfaces.demo.queue;
+
+import java.io.Serializable;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+@ManagedBean
+@ViewScoped
+public class QueueBean implements Serializable {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 7503791626510224913L;
+ private Long requestDelay = new Long(500);
+ private boolean ignoreDupResponces = false;
+ private String text = "";
+ private int requests = 0;
+ private int events = 0;
+
+ public void resetText() {
+ setText("");
+ }
+
+ public Long getRequestDelay() {
+ return requestDelay;
+ }
+
+ public void setRequestDelay(Long requestDelay) {
+ this.requestDelay = requestDelay;
+ }
+
+ public boolean isIgnoreDupResponces() {
+ return ignoreDupResponces;
+ }
+
+ public void setIgnoreDupResponces(boolean ignoreDupResponces) {
+ this.ignoreDupResponces = ignoreDupResponces;
+ }
+
+ public String getText() {
+ return text;
+ }
+
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ public int getRequests() {
+ return requests;
+ }
+
+ public void setRequests(int reuqests) {
+ this.requests = reuqests;
+ }
+
+ public int getEvents() {
+ return events;
+ }
+
+ public void setEvents(int events) {
+ this.events = events;
+ }
+
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/region/RegionBean.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/region/RegionBean.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/region/RegionBean.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,37 @@
+package org.richfaces.demo.region;
+
+import java.io.Serializable;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.demo.common.UserBean;
+
+@ManagedBean
+@ViewScoped
+public class RegionBean implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -3844974441732156513L;
+ private UserBean user1 = new UserBean();
+ private UserBean user2 = new UserBean();
+
+ public UserBean getUser1() {
+ return user1;
+ }
+
+ public UserBean getUser2() {
+ return user2;
+ }
+
+ public void setUser1(UserBean user1) {
+ this.user1 = user1;
+ }
+
+ public void setUser2(UserBean user2) {
+ this.user2 = user2;
+ }
+
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/CapitalsBean.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/CapitalsBean.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/CapitalsBean.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,34 @@
+package org.richfaces.demo.tables;
+
+import java.io.Serializable;
+import java.util.List;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ManagedProperty;
+import javax.faces.bean.SessionScoped;
+
+import org.richfaces.demo.tables.model.capitals.Capital;
+
+@ManagedBean
+@SessionScoped
+public class CapitalsBean implements Serializable{
+ /**
+ *
+ */
+ private static final long serialVersionUID = -1509108399715814302L;
+ @ManagedProperty(value = "#{capitalsParser.capitalsList}")
+ private List<Capital> capitals;
+
+ public CapitalsBean() {
+ // TODO Auto-generated constructor stub
+ }
+
+ public List<Capital> getCapitals() {
+ return capitals;
+ }
+
+ public void setCapitals(List<Capital> capitals) {
+ this.capitals = capitals;
+ }
+
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/CapitalsSortingBean.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/CapitalsSortingBean.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/CapitalsSortingBean.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,97 @@
+package org.richfaces.demo.tables;
+
+import java.io.Serializable;
+import java.util.Comparator;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.SortOrder;
+import org.richfaces.demo.tables.model.capitals.Capital;
+
+@ManagedBean
+@ViewScoped
+public class CapitalsSortingBean implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -6237417487105926855L;
+ private static final String TIMEZONE_GMT_SEPARATOR = "-";
+ private SortOrder capitalsOrder = SortOrder.unsorted;
+ private SortOrder statesOrder = SortOrder.unsorted;
+ private SortOrder timeZonesOrder = SortOrder.unsorted;
+
+ public void sortByCapitals() {
+ statesOrder = SortOrder.unsorted;
+ timeZonesOrder = SortOrder.unsorted;
+ if (capitalsOrder.equals(SortOrder.ascending)) {
+ setCapitalsOrder(SortOrder.descending);
+ } else {
+ setCapitalsOrder(SortOrder.ascending);
+ }
+ }
+
+ public void sortByStates() {
+ capitalsOrder = SortOrder.unsorted;
+ timeZonesOrder = SortOrder.unsorted;
+ if (statesOrder.equals(SortOrder.ascending)) {
+ setStatesOrder(SortOrder.descending);
+ } else {
+ setStatesOrder(SortOrder.ascending);
+ }
+ }
+
+ public void sortByTimeZones() {
+ statesOrder = SortOrder.unsorted;
+ capitalsOrder = SortOrder.unsorted;
+ if (timeZonesOrder.equals(SortOrder.ascending)) {
+ setTimeZonesOrder(SortOrder.descending);
+ } else {
+ setTimeZonesOrder(SortOrder.ascending);
+ }
+ }
+
+ public Comparator<Capital> getTimeZoneComparator() {
+ return new Comparator<Capital>() {
+
+ public int compare(Capital o1, Capital o2) {
+ int tz1Int = Integer.valueOf(o1.getTimeZone().split(TIMEZONE_GMT_SEPARATOR)[1]);
+ int tz2Int = Integer.valueOf(o2.getTimeZone().split(TIMEZONE_GMT_SEPARATOR)[1]);
+ if (tz1Int == tz2Int) {
+ return 0;
+ }
+ if (tz1Int > tz2Int) {
+ return -1;
+ } else {
+ return 1;
+ }
+ }
+ };
+ }
+
+ public SortOrder getCapitalsOrder() {
+ return capitalsOrder;
+ }
+
+ public void setCapitalsOrder(SortOrder capitalsOrder) {
+ this.capitalsOrder = capitalsOrder;
+ }
+
+ public SortOrder getStatesOrder() {
+ return statesOrder;
+ }
+
+ public void setStatesOrder(SortOrder statesOrder) {
+ this.statesOrder = statesOrder;
+ }
+
+ public SortOrder getTimeZonesOrder() {
+ return timeZonesOrder;
+ }
+
+ public void setTimeZonesOrder(SortOrder timeZonesOrder) {
+ this.timeZonesOrder = timeZonesOrder;
+ }
+
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/CarsBean.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/CarsBean.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/CarsBean.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,196 @@
+/**
+ *
+ */
+package org.richfaces.demo.tables;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+import javax.faces.model.SelectItem;
+
+import org.richfaces.demo.common.data.RandomHelper;
+import org.richfaces.demo.tables.model.cars.InventoryItem;
+import org.richfaces.demo.tables.model.cars.InventoryVendorItem;
+import org.richfaces.demo.tables.model.cars.InventoryVendorList;
+
+@ManagedBean(name = "carsBean")
+@SessionScoped
+public class CarsBean implements Serializable{
+ /**
+ *
+ */
+ private static final long serialVersionUID = -3832235132261771583L;
+ private static final int DECIMALS = 1;
+ private static final int ROUNDING_MODE = BigDecimal.ROUND_HALF_UP;
+ private List<InventoryItem> allInventoryItems = null;
+ private List<InventoryVendorList> inventoryVendorLists = null;
+
+ public List<SelectItem> getVendorOptions() {
+ List<SelectItem> result = new ArrayList<SelectItem>();
+ result.add(new SelectItem("",""));
+ for (InventoryVendorList vendorList : getInventoryVendorLists()) {
+ result.add(new SelectItem(vendorList.getVendor()));
+ }
+ return result;
+ }
+
+ public List<String> getAllVendors() {
+ List<String> result = new ArrayList<String>();
+ for (InventoryVendorList vendorList : getInventoryVendorLists()) {
+ result.add(vendorList.getVendor());
+ }
+ return result;
+ }
+
+ public List<InventoryVendorList> getInventoryVendorLists() {
+ synchronized (this) {
+ if (inventoryVendorLists == null) {
+ inventoryVendorLists = new ArrayList<InventoryVendorList>();
+ List<InventoryItem> inventoryItems = getAllInventoryItems();
+
+ Collections.sort(inventoryItems, new Comparator<InventoryItem>() {
+ public int compare(InventoryItem o1, InventoryItem o2) {
+ return o1.getVendor().compareTo(o2.getVendor());
+ }
+ });
+ Iterator<InventoryItem> iterator = inventoryItems.iterator();
+ InventoryVendorList vendorList = new InventoryVendorList();
+ vendorList.setVendor(inventoryItems.get(0).getVendor());
+ while (iterator.hasNext()) {
+ InventoryItem item = iterator.next();
+ InventoryVendorItem newItem = new InventoryVendorItem();
+ itemToVendorItem(item, newItem);
+ if (!item.getVendor().equals(vendorList.getVendor())) {
+ inventoryVendorLists.add(vendorList);
+ vendorList = new InventoryVendorList();
+ vendorList.setVendor(item.getVendor());
+ }
+ vendorList.getVendorItems().add(newItem);
+ }
+ inventoryVendorLists.add(vendorList);
+ }
+ }
+ return inventoryVendorLists;
+ }
+
+ private void itemToVendorItem(InventoryItem item, InventoryVendorItem newItem) {
+ newItem.setActivity(item.getActivity());
+ newItem.setChangePrice(item.getChangePrice());
+ newItem.setChangeSearches(item.getChangeSearches());
+ newItem.setDaysLive(item.getDaysLive());
+ newItem.setExposure(item.getExposure());
+ newItem.setInquiries(item.getInquiries());
+ newItem.setMileage(item.getMileage());
+ newItem.setMileageMarket(item.getMileageMarket());
+ newItem.setModel(item.getModel());
+ newItem.setPrice(item.getPrice());
+ newItem.setPriceMarket(item.getPriceMarket());
+ newItem.setPrinted(item.getPrinted());
+ newItem.setStock(item.getStock());
+ newItem.setVin(item.getVin());
+ }
+
+ public List<InventoryItem> getAllInventoryItems() {
+ synchronized (this) {
+ if (allInventoryItems == null) {
+ allInventoryItems = new ArrayList<InventoryItem>();
+
+ for (int k = 0; k <= 5; k++) {
+ try {
+ switch (k) {
+ case 0:
+ allInventoryItems.addAll(createCar("Chevrolet", "Corvette", 5));
+ allInventoryItems.addAll(createCar("Chevrolet", "Malibu", 8));
+ allInventoryItems.addAll(createCar("Chevrolet", "Tahoe", 6));
+
+ break;
+
+ case 1:
+ allInventoryItems.addAll(createCar("Ford", "Taurus", 12));
+ allInventoryItems.addAll(createCar("Ford", "Explorer", 11));
+
+ break;
+
+ case 2:
+ allInventoryItems.addAll(createCar("Nissan", "Maxima", 9));
+ allInventoryItems.addAll(createCar("Nissan", "Frontier", 6));
+
+ break;
+
+ case 3:
+ allInventoryItems.addAll(createCar("Toyota", "4-Runner", 7));
+ allInventoryItems.addAll(createCar("Toyota", "Camry", 15));
+ allInventoryItems.addAll(createCar("Toyota", "Avalon", 13));
+
+ break;
+
+ case 4:
+ allInventoryItems.addAll(createCar("GMC", "Sierra", 8));
+ allInventoryItems.addAll(createCar("GMC", "Yukon", 10));
+
+ break;
+
+ case 5:
+ allInventoryItems.addAll(createCar("Infiniti", "G35", 6));
+ allInventoryItems.addAll(createCar("Infiniti", "EX35", 5));
+
+ break;
+
+ default:
+ break;
+ }
+ } catch (Exception e) {
+ System.out.println("!!!!!!loadallInventoryItems Error: " + e.getMessage());
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+ return allInventoryItems;
+ }
+
+ public List<InventoryItem> createCar(String vendor, String model, int count) {
+ ArrayList<InventoryItem> iiList = null;
+
+ try {
+ int arrayCount = count;
+ InventoryItem[] demoInventoryItemArrays = new InventoryItem[arrayCount];
+
+ for (int j = 0; j < demoInventoryItemArrays.length; j++) {
+ InventoryItem ii = new InventoryItem();
+
+ ii.setVendor(vendor);
+ ii.setModel(model);
+ ii.setStock(RandomHelper.randomstring(6, 7));
+ ii.setVin(RandomHelper.randomstring(14, 15));
+ ii.setMileage(new BigDecimal(RandomHelper.rand(5000, 80000)).setScale(DECIMALS, ROUNDING_MODE));
+ ii.setMileageMarket(new BigDecimal(RandomHelper.rand(25000, 45000)).setScale(DECIMALS, ROUNDING_MODE));
+ ii.setPrice(new Integer(RandomHelper.rand(15000, 55000)));
+ ii.setPriceMarket(new BigDecimal(RandomHelper.rand(15000, 55000)).setScale(DECIMALS, ROUNDING_MODE));
+ ii.setDaysLive(RandomHelper.rand(1, 90));
+ ii.setChangeSearches(new BigDecimal(RandomHelper.rand(0, 5)).setScale(DECIMALS, ROUNDING_MODE));
+ ii.setChangePrice(new BigDecimal(RandomHelper.rand(0, 5)).setScale(DECIMALS, ROUNDING_MODE));
+ ii.setExposure(new BigDecimal(RandomHelper.rand(0, 5)).setScale(DECIMALS, ROUNDING_MODE));
+ ii.setActivity(new BigDecimal(RandomHelper.rand(0, 5)).setScale(DECIMALS, ROUNDING_MODE));
+ ii.setPrinted(new BigDecimal(RandomHelper.rand(0, 5)).setScale(DECIMALS, ROUNDING_MODE));
+ ii.setInquiries(new BigDecimal(RandomHelper.rand(0, 5)).setScale(DECIMALS, ROUNDING_MODE));
+ demoInventoryItemArrays[j] = ii;
+ }
+
+ iiList = new ArrayList<InventoryItem>(Arrays.asList(demoInventoryItemArrays));
+ } catch (Exception e) {
+ System.out.println("!!!!!!createCategory Error: " + e.getMessage());
+ e.printStackTrace();
+ }
+
+ return iiList;
+ }
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/CarsFilteringBean.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/CarsFilteringBean.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/CarsFilteringBean.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,68 @@
+package org.richfaces.demo.tables;
+
+import java.io.Serializable;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+
+import org.richfaces.demo.tables.model.cars.InventoryItem;
+import org.richfaces.model.Filter;
+
+@ManagedBean
+@SessionScoped
+public class CarsFilteringBean implements Serializable {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -5680001353441022183L;
+ private String vinFilter;
+ private String vendorFilter;
+ private Long mileageFilter;
+
+ public Filter<?> getMileageFilterImpl() {
+ return new Filter<InventoryItem>() {
+ public boolean accept(InventoryItem item) {
+ Long mileage = getMileageFilter();
+ if (mileage == null || mileage==0 || mileage.compareTo(item.getMileage().longValue()) >= 0) {
+ return true;
+ }
+ return false;
+ }
+ };
+ }
+ public Filter<?> getFilterVendor(){
+ return new Filter<InventoryItem>() {
+ public boolean accept(InventoryItem t) {
+ String vendor = getVendorFilter();
+ if (vendor == null || vendor.length() == 0 || vendor.equals(t.getVendor())) {
+ return true;
+ }
+ return false;
+ }
+ };
+ }
+
+ public Long getMileageFilter() {
+ return mileageFilter;
+ }
+
+ public void setMileageFilter(Long mileageFilter) {
+ this.mileageFilter = mileageFilter;
+ }
+
+ public String getVendorFilter() {
+ return vendorFilter;
+ }
+
+ public void setVendorFilter(String vendorFilter) {
+ this.vendorFilter = vendorFilter;
+ }
+
+ public String getVinFilter() {
+ return vinFilter;
+ }
+
+ public void setVinFilter(String vinFilter) {
+ this.vinFilter = vinFilter;
+ }
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/ReportBean.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/ReportBean.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/ReportBean.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,23 @@
+package org.richfaces.demo.tables;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.RequestScoped;
+
+import org.richfaces.demo.tables.model.expenses.ExpenseReport;
+
+@ManagedBean
+@RequestScoped
+public class ReportBean {
+ ExpenseReport expReport;
+
+ public ExpenseReport getExpReport() {
+ if (expReport == null) {
+ expReport = new ExpenseReport();
+ }
+ return expReport;
+ }
+
+ public void setExpReport(ExpenseReport expReport) {
+ this.expReport = expReport;
+ }
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/SlidesBean.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/SlidesBean.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/SlidesBean.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,53 @@
+package org.richfaces.demo.tables;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.demo.tables.model.slides.Picture;
+
+/**
+ * @author Ilya Shaikovsky
+ *
+ */
+@ManagedBean
+@ViewScoped
+public class SlidesBean implements Serializable{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -6498592143189891265L;
+ private static final String FILE_EXT = ".jpg";
+ private static final int FILES_COUNT = 9;
+ private static final String PATH_PREFIX = "/images/nature/";
+ private static final String PIC_NAME = "pic";
+ private List<Picture> pictures;
+ private int currentIndex = 1;
+
+ public SlidesBean() {
+ pictures = new ArrayList<Picture>();
+ for (int i = 1; i <= FILES_COUNT; i++) {
+ pictures.add(new Picture(PATH_PREFIX + PIC_NAME + i + FILE_EXT, PIC_NAME + i));
+ }
+ }
+
+ public int getCurrentIndex() {
+ return currentIndex;
+ }
+
+ public void setCurrentIndex(int currentIndex) {
+ this.currentIndex = currentIndex;
+ }
+
+ public List<Picture> getPictures() {
+ return pictures;
+ }
+
+ public void setPictures(List<Picture> pictures) {
+ this.pictures = pictures;
+ }
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/capitals/Capital.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/capitals/Capital.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/capitals/Capital.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,56 @@
+package org.richfaces.demo.tables.model.capitals;
+
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlElement;
+
+public class Capital implements Serializable {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -1042449580199397136L;
+
+ private static final String FILE_EXT = ".gif";
+
+ private String name;
+ private String state;
+ private String timeZone;
+
+ public Capital() {
+ }
+
+ @XmlElement
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @XmlElement
+ public String getState() {
+ return state;
+ }
+
+ public void setState(String state) {
+ this.state = state;
+ }
+
+ private String stateNameToFileName() {
+ return state.replaceAll("\\s", "").toLowerCase();
+ }
+
+ public String getStateFlag() {
+ return "/images/capitals/" + stateNameToFileName() + FILE_EXT;
+ }
+
+ @XmlElement
+ public String getTimeZone() {
+ return timeZone;
+ }
+
+ public void setTimeZone(String timeZone) {
+ this.timeZone = timeZone;
+ }
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/capitals/CapitalsParser.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/capitals/CapitalsParser.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/capitals/CapitalsParser.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,53 @@
+package org.richfaces.demo.tables.model.capitals;
+
+import java.net.URL;
+import java.util.List;
+
+import javax.faces.FacesException;
+import javax.faces.bean.ApplicationScoped;
+import javax.faces.bean.ManagedBean;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+
+@ManagedBean
+@ApplicationScoped
+public class CapitalsParser {
+
+ private List<Capital> capitalsList;
+
+ @XmlRootElement(name = "capitals")
+ private static final class CapitalsHolder {
+
+ private List<Capital> capitals;
+
+ @XmlElement(name = "capital")
+ public List<Capital> getCapitals() {
+ return capitals;
+ }
+
+ @SuppressWarnings("unused")
+ public void setCapitals(List<Capital> capitals) {
+ this.capitals = capitals;
+ }
+ }
+
+ public synchronized List<Capital> getCapitalsList() {
+ if (capitalsList == null) {
+ ClassLoader ccl = Thread.currentThread().getContextClassLoader();
+ URL resource = ccl.getResource("org/richfaces/demo/data/capitals/capitals.xml");
+ JAXBContext context;
+ try {
+ context = JAXBContext.newInstance(CapitalsHolder.class);
+ CapitalsHolder capitalsHolder = (CapitalsHolder) context.createUnmarshaller().unmarshal(resource);
+ capitalsList = capitalsHolder.getCapitals();
+ } catch (JAXBException e) {
+ throw new FacesException(e.getMessage(), e);
+ }
+ }
+
+ return capitalsList;
+ }
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/cars/InventoryItem.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/cars/InventoryItem.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/cars/InventoryItem.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,19 @@
+package org.richfaces.demo.tables.model.cars;
+
+import java.io.Serializable;
+
+public class InventoryItem extends InventoryVendorItem implements Serializable{
+ /**
+ *
+ */
+ private static final long serialVersionUID = 2052446469750935597L;
+ private String vendor;
+
+ public String getVendor() {
+ return vendor;
+ }
+
+ public void setVendor(String vendor) {
+ this.vendor = vendor;
+ }
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/cars/InventoryVendorItem.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/cars/InventoryVendorItem.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/cars/InventoryVendorItem.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,136 @@
+package org.richfaces.demo.tables.model.cars;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+public class InventoryVendorItem implements Serializable {
+
+ private static final long serialVersionUID = -5424674835711375626L;
+
+ BigDecimal activity;
+ BigDecimal changePrice;
+ BigDecimal changeSearches;
+ int daysLive;
+ BigDecimal exposure;
+ BigDecimal inquiries;
+ BigDecimal mileage;
+ BigDecimal mileageMarket;
+ String model;
+ Integer price;
+ BigDecimal priceMarket;
+ BigDecimal printed;
+ String stock;
+ String vin;
+
+ public String getModel() {
+ return model;
+ }
+
+ public void setModel(String model) {
+ this.model = model;
+ }
+
+ public String getStock() {
+ return stock;
+ }
+
+ public void setStock(String stock) {
+ this.stock = stock;
+ }
+
+ public String getVin() {
+ return vin;
+ }
+
+ public void setVin(String vin) {
+ this.vin = vin;
+ }
+
+ public BigDecimal getMileage() {
+ return mileage;
+ }
+
+ public void setMileage(BigDecimal mileage) {
+ this.mileage = mileage;
+ }
+
+ public BigDecimal getMileageMarket() {
+ return mileageMarket;
+ }
+
+ public void setMileageMarket(BigDecimal mileageMarket) {
+ this.mileageMarket = mileageMarket;
+ }
+
+ public Integer getPrice() {
+ return price;
+ }
+
+ public void setPrice(Integer price) {
+ this.price = price;
+ }
+
+ public BigDecimal getPriceMarket() {
+ return priceMarket;
+ }
+
+ public void setPriceMarket(BigDecimal priceMarket) {
+ this.priceMarket = priceMarket;
+ }
+
+ public int getDaysLive() {
+ return daysLive;
+ }
+
+ public void setDaysLive(int daysLive) {
+ this.daysLive = daysLive;
+ }
+
+ public BigDecimal getChangeSearches() {
+ return changeSearches;
+ }
+
+ public void setChangeSearches(BigDecimal changeSearches) {
+ this.changeSearches = changeSearches;
+ }
+
+ public BigDecimal getChangePrice() {
+ return changePrice;
+ }
+
+ public void setChangePrice(BigDecimal changePrice) {
+ this.changePrice = changePrice;
+ }
+
+ public BigDecimal getExposure() {
+ return exposure;
+ }
+
+ public void setExposure(BigDecimal exposure) {
+ this.exposure = exposure;
+ }
+
+ public BigDecimal getActivity() {
+ return activity;
+ }
+
+ public void setActivity(BigDecimal activity) {
+ this.activity = activity;
+ }
+
+ public BigDecimal getPrinted() {
+ return printed;
+ }
+
+ public void setPrinted(BigDecimal printed) {
+ this.printed = printed;
+ }
+
+ public BigDecimal getInquiries() {
+ return inquiries;
+ }
+
+ public void setInquiries(BigDecimal inquiries) {
+ this.inquiries = inquiries;
+ }
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/cars/InventoryVendorList.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/cars/InventoryVendorList.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/cars/InventoryVendorList.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,40 @@
+package org.richfaces.demo.tables.model.cars;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+public class InventoryVendorList implements Serializable {
+ private static final long serialVersionUID = -6547391197128734913L;
+
+ private String vendor;
+ private List<InventoryVendorItem> vendorItems;
+
+ public InventoryVendorList() {
+ vendorItems = new ArrayList<InventoryVendorItem>();
+ }
+
+ public long getCount() {
+ if (vendorItems != null) {
+ return vendorItems.size();
+ } else {
+ return 0;
+ }
+ }
+
+ public String getVendor() {
+ return vendor;
+ }
+
+ public void setVendor(String vendor) {
+ this.vendor = vendor;
+ }
+
+ public List<InventoryVendorItem> getVendorItems() {
+ return vendorItems;
+ }
+
+ public void setVendorItems(List<InventoryVendorItem> vendorItems) {
+ this.vendorItems = vendorItems;
+ }
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/expenses/ExpenseReport.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/expenses/ExpenseReport.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/expenses/ExpenseReport.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,74 @@
+package org.richfaces.demo.tables.model.expenses;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+public class ExpenseReport {
+ private List<ExpenseReportRecord> records = null;
+
+ public List<ExpenseReportRecord> getRecords() {
+ if (records == null) {
+ initRecords();
+ }
+ return records;
+ }
+
+ public void setRecords(List<ExpenseReportRecord> records) {
+ this.records = records;
+ }
+
+ public double getTotalMeals() {
+ double ret = 0.0;
+ Iterator<ExpenseReportRecord> it = getRecords().iterator();
+ while (it.hasNext()) {
+ ExpenseReportRecord record = (ExpenseReportRecord) it.next();
+ ret += record.getTotalMeals();
+ }
+ return ret;
+ }
+
+ public double getTotalHotels() {
+ double ret = 0.0;
+ Iterator<ExpenseReportRecord> it = getRecords().iterator();
+ while (it.hasNext()) {
+ ExpenseReportRecord record = (ExpenseReportRecord) it.next();
+ ret += record.getTotalHotels();
+ }
+ return ret;
+ }
+
+ public double getTotalTransport() {
+ double ret = 0.0;
+ Iterator<ExpenseReportRecord> it = getRecords().iterator();
+ while (it.hasNext()) {
+ ExpenseReportRecord record = (ExpenseReportRecord) it.next();
+ ret += record.getTotalTransport();
+ }
+ return ret;
+ }
+
+ public double getGrandTotal() {
+ return getTotalMeals() + getTotalHotels() + getTotalTransport();
+ }
+
+ public int getRecordsCount() {
+ return getRecords().size();
+ }
+
+ private void initRecords() {
+ records = new ArrayList<ExpenseReportRecord>();
+ ExpenseReportRecord rec;
+ rec = new ExpenseReportRecord();
+ rec.setCity("San Jose");
+ rec.getItems().add(new ExpenseReportRecordItem("25-Aug-97", 37.74, 112.0, 45.0, "San Jose"));
+ rec.getItems().add(new ExpenseReportRecordItem("26-Aug-97", 27.28, 112.0, 45.0, "San Jose"));
+ records.add(rec);
+ rec = new ExpenseReportRecord();
+ rec.setCity("Seattle");
+ rec.getItems().add(new ExpenseReportRecordItem("27-Aug-97", 96.25, 109.0, 36.00, "Seattle"));
+ rec.getItems().add(new ExpenseReportRecordItem("28-Aug-97", 35.0, 109.0, 36.0, "Seattle"));
+ records.add(rec);
+ }
+
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/expenses/ExpenseReportRecord.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/expenses/ExpenseReportRecord.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/expenses/ExpenseReportRecord.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,64 @@
+package org.richfaces.demo.tables.model.expenses;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+public class ExpenseReportRecord {
+ private String city;
+ private List<ExpenseReportRecordItem> items = new ArrayList<ExpenseReportRecordItem>();
+
+ public String getCity() {
+ return city;
+ }
+
+ public void setCity(String city) {
+ this.city = city;
+ }
+
+ public List<ExpenseReportRecordItem> getItems() {
+ return this.items;
+ }
+
+ public void setItems(List<ExpenseReportRecordItem> items) {
+ this.items = items;
+ }
+
+ public double getTotalMeals() {
+ double ret = 0.0;
+ Iterator<ExpenseReportRecordItem> it = items.iterator();
+ while (it.hasNext()) {
+ ExpenseReportRecordItem item = (ExpenseReportRecordItem) it.next();
+ ret += item.getMeals();
+ }
+ return ret;
+ }
+
+ public double getTotalHotels() {
+ double ret = 0.0;
+ Iterator<ExpenseReportRecordItem> it = items.iterator();
+ while (it.hasNext()) {
+ ExpenseReportRecordItem item = (ExpenseReportRecordItem) it.next();
+ ret += item.getHotels();
+ }
+ return ret;
+ }
+
+ public double getTotalTransport() {
+ double ret = 0.0;
+ Iterator<ExpenseReportRecordItem> it = items.iterator();
+ while (it.hasNext()) {
+ ExpenseReportRecordItem item = (ExpenseReportRecordItem) it.next();
+ ret += item.getTransport();
+ }
+ return ret;
+ }
+
+ public double getTotal() {
+ return getTotalMeals() + getTotalHotels() + getTotalTransport();
+ }
+
+ public int getItemsCount() {
+ return getItems().size();
+ }
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/expenses/ExpenseReportRecordItem.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/expenses/ExpenseReportRecordItem.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/expenses/ExpenseReportRecordItem.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,62 @@
+package org.richfaces.demo.tables.model.expenses;
+
+public class ExpenseReportRecordItem {
+
+ private String city;
+ private String day;
+ private double meals;
+ private double hotels;
+ private double transport;
+
+ public ExpenseReportRecordItem(String day, double meals, double hotels, double transport, String city) {
+ this.city = city;
+ this.day = day;
+ this.meals = meals;
+ this.hotels = hotels;
+ this.transport = transport;
+ }
+
+ public String getCity() {
+ return city;
+ }
+
+ public void setCity(String city) {
+ this.city = city;
+ }
+
+ public String getDay() {
+ return day;
+ }
+
+ public void setDay(String day) {
+ this.day = day;
+ }
+
+ public double getHotels() {
+ return hotels;
+ }
+
+ public void setHotels(double hotels) {
+ this.hotels = hotels;
+ }
+
+ public double getMeals() {
+ return meals;
+ }
+
+ public void setMeals(double meals) {
+ this.meals = meals;
+ }
+
+ public double getTransport() {
+ return transport;
+ }
+
+ public void setTransport(double transport) {
+ this.transport = transport;
+ }
+
+ public double getTotal() {
+ return meals + hotels + transport;
+ }
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/slides/Picture.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/slides/Picture.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/tables/model/slides/Picture.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,34 @@
+package org.richfaces.demo.tables.model.slides;
+
+import java.io.Serializable;
+
+public class Picture implements Serializable {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -248567945955339619L;
+ private String name;
+ private String uri;
+
+ public Picture(String uri, String name) {
+ this.name = name;
+ this.uri = uri;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getUri() {
+ return uri;
+ }
+
+ public void setUri(String uri) {
+ this.uri = uri;
+ }
+
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/view/SampleToolBarItem.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/view/SampleToolBarItem.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/view/SampleToolBarItem.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,28 @@
+package org.richfaces.demo.view;
+
+public class SampleToolBarItem {
+ private String name;
+ private String outcome;
+
+ public SampleToolBarItem(String name, String outcome) {
+ this.name = name;
+ this.outcome = outcome;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getOutcome() {
+ return outcome;
+ }
+
+ public void setOutcome(String outcome) {
+ this.outcome = outcome;
+ }
+
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/view/ViewController.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/view/ViewController.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/demo/view/ViewController.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,22 @@
+package org.richfaces.demo.view;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+@ManagedBean
+@ViewScoped
+public class ViewController {
+
+ public List<SampleToolBarItem> getTableToolBarItems() {
+ List<SampleToolBarItem> items = new ArrayList<SampleToolBarItem>();
+ SampleToolBarItem item = new SampleToolBarItem("Simple", "/richfaces/dataTable/simpleTable.jsf");
+ items.add(item);
+ item = new SampleToolBarItem("Complex layouts", "/richfaces/dataTable/subtables.jsf");
+ items.add(item);
+ return items;
+ }
+
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/resource/DictionaryResourceHandlerImpl.java
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/resource/DictionaryResourceHandlerImpl.java (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/java/org/richfaces/resource/DictionaryResourceHandlerImpl.java 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,219 @@
+/*
+ * 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.resource;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Map;
+import java.util.Properties;
+
+import javax.faces.FacesException;
+import javax.faces.application.Resource;
+import javax.faces.application.ResourceHandler;
+import javax.faces.application.ResourceHandlerWrapper;
+import javax.faces.context.FacesContext;
+
+import org.richfaces.component.util.ViewUtil;
+import org.richfaces.skin.SkinFactory;
+
+import com.google.common.base.Strings;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+public class DictionaryResourceHandlerImpl extends ResourceHandlerWrapper {
+
+ private static final String MAPPINGS_FILE = "org.richfaces/resource-mappings.properties";
+
+ private static final class WebResource extends Resource {
+
+ private String contextPath;
+
+ protected void setContextPath(String contextPath) {
+ this.contextPath = contextPath;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.application.Resource#getInputStream()
+ */
+ @Override
+ public InputStream getInputStream() throws IOException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.application.Resource#getResponseHeaders()
+ */
+ @Override
+ public Map<String, String> getResponseHeaders() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.application.Resource#getRequestPath()
+ */
+ @Override
+ public String getRequestPath() {
+ // TODO Auto-generated method stub
+ return ViewUtil.getResourceURL(contextPath, FacesContext.getCurrentInstance());
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.application.Resource#getURL()
+ */
+ @Override
+ public URL getURL() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.application.Resource#userAgentNeedsUpdate(javax.faces.context.FacesContext)
+ */
+ @Override
+ public boolean userAgentNeedsUpdate(FacesContext context) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ }
+
+ private ResourceHandler resourceHandler;
+
+ private Properties mappings = new Properties();
+
+ private void readMappingURL(URL url) throws IOException {
+ InputStream is = null;
+ try {
+ is = url.openStream();
+ mappings.load(is);
+ } finally {
+ if (is != null) {
+ try {
+ is.close();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+
+ private void readMappings() {
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+
+ try {
+ URL resource = facesContext.getExternalContext().getResource("/resources/" + MAPPINGS_FILE);
+ if (resource != null) {
+ readMappingURL(resource);
+ }
+
+ } catch (Exception e) {
+ throw new FacesException(e.getMessage(), e);
+ }
+ }
+
+ public DictionaryResourceHandlerImpl(ResourceHandler resourceHandler) {
+ super();
+ this.resourceHandler = resourceHandler;
+
+ readMappings();
+ }
+
+ private String getQualifiedName(String libraryName, String resourceName) {
+ if (Strings.isNullOrEmpty(libraryName)) {
+ return resourceName;
+ } else {
+ return libraryName + "/" + resourceName;
+ }
+ }
+
+ private Resource createDictionaryResource(String libraryName, String resourceName) {
+ String qualifiedName = getQualifiedName(libraryName, resourceName);
+ String mappedName = (String) mappings.get(qualifiedName);
+ if (mappedName == null) {
+ return null;
+ }
+
+ FacesContext context = FacesContext.getCurrentInstance();
+ String skinName = SkinFactory.getInstance(context).getSkin(context).getName();
+
+ WebResource webResource = new WebResource();
+ webResource.setLibraryName(libraryName);
+ webResource.setResourceName(resourceName);
+ webResource.setContextPath("/resources/" + skinName + '/' + mappedName);
+
+ return webResource;
+ }
+
+ @Override
+ public ResourceHandler getWrapped() {
+ return resourceHandler;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.application.ResourceHandlerWrapper#createResource(java.lang.String)
+ */
+ @Override
+ public Resource createResource(String resourceName) {
+ Resource resource = createDictionaryResource(null, resourceName);
+ if (resource != null) {
+ return resource;
+ }
+
+ // TODO Auto-generated method stub
+ return super.createResource(resourceName);
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.application.ResourceHandlerWrapper#createResource(java.lang.String, java.lang.String)
+ */
+ @Override
+ public Resource createResource(String resourceName, String libraryName) {
+ Resource resource = createDictionaryResource(null, resourceName);
+ if (resource != null) {
+ return resource;
+ }
+
+ // TODO Auto-generated method stub
+ return super.createResource(resourceName, libraryName);
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.application.ResourceHandlerWrapper#createResource(java.lang.String, java.lang.String, java.lang.String)
+ */
+ @Override
+ public Resource createResource(String resourceName, String libraryName, String contentType) {
+ Resource resource = createDictionaryResource(null, resourceName);
+ if (resource != null) {
+ return resource;
+ }
+
+ // TODO Auto-generated method stub
+ return super.createResource(resourceName, libraryName, contentType);
+ }
+
+}
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/resources/META-INF/resources/rich/css/page.ecss
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/resources/META-INF/resources/rich/css/page.ecss (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/resources/META-INF/resources/rich/css/page.ecss 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,96 @@
+.rich-page {
+ width: 100%;
+}
+
+body {
+ background-color: #FFFFFF;
+ margin: 10px;
+}
+
+.header_bg {
+ background-image:
+ "url(#{resource['org.richfaces.demo.images.PageHeaderGradient']})";
+ border-bottom: 1px solid #FFFFFF;
+ background-color: '#{richSkin.headerBackgroundColor}';
+ background-repeat: repeat-x;
+ background-position: top left;
+}
+
+.footer_bg {
+ background-image:
+ "url(#{resource['org.richfaces.demo.images.PageFooterGradient']})";
+ border-top: 1px solid #FFFFFF;
+ background-color: '#{richSkin.headerBackgroundColor}';
+ background-repeat: repeat-x;
+ background-position: center left;
+}
+
+.menu_col {
+ background-color: '#{richSkin.generalBackgroundColor}';
+ vertical-align: top;
+ border-top: 10px solid #FFFFFF;
+ border-right: 10px solid #FFFFFF;
+ border-bottom: 10px solid #FFFFFF;
+}
+
+.content_col {
+ background-color: #FFFFFF;
+ vertical-align: top;
+ width: 100%;
+ border-top: 10px solid #FFFFFF;
+ border-bottom: 10px solid #FFFFFF;
+}
+
+*.menu_col,*.content_col,*.footer_bg {
+ font-family: '#{richSkin.generalFamilyFont}';
+ color: '#{richSkin.generalTextColor}';
+ font-size: '#{richSkin.generalSizeFont}';
+}
+
+*.header_content {
+ font-family: '#{richSkin.generalFamilyFont}';
+ color: '#{richSkin.headerTextColor}';
+ font-size: '#{richSkin.generalSizeFont}';
+ padding-left: 20px;
+}
+
+.page_size {
+ width: 100%;
+ height: 100%;
+}
+
+.header_content {
+ margin: 0px 0px 0px 0px;
+ position: relative
+}
+
+.spacer {
+ font-size: 1px;
+}
+
+.footer_bg_content {
+ padding:20px;
+ margin: 0px 0px 0px 0px;
+}
+
+.new_marker {
+ color: red;
+ vertical-align: super;
+ font-size: 8px;
+ padding-left: 2px;
+}
+
+.header_links_container, .header_links_container a:visited, .header_links_container * {
+ color: '#{richSkin.headerTextColor}';
+}
+
+.header_links_container {
+ padding-right: 20px;
+}
+
+.skin-chooser{
+margin-bottom: 3px;
+}
+.samples-navigator{
+margin-bottom: 10px;
+}
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/resources/META-INF/resources/rich/css/panel.ecss
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/resources/META-INF/resources/rich/css/panel.ecss (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/resources/META-INF/resources/rich/css/panel.ecss 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,28 @@
+.rich-panel {
+ border-width: 1px;
+ border-style: solid;
+ padding: 1px;
+ color: '#{richSkin.generalTextColor}';
+ font-family: '#{richSkin.generalFamilyFont}';
+ font-size: '#{richSkin.generalSizeFont}';
+ background-color: '#{richSkin.generalBackgroundColor}';
+ border-color: '#{richSkin.panelBorderColor}';
+}
+
+.rich-panel-header {
+ padding: 7px 20px;
+ border-width: 1px;
+ border-style: solid;
+ background-color: '#{richSkin.headerBackgroundColor}';
+ border-color: '#{richSkin.panelBorderColor}';
+ font-weight: bold;
+ background-position: left top;
+ background-repeat: repeat-x;
+ background-image:
+ "url(#{resource['org.richfaces.demo.images.PanelGradient']})";
+ color: '#{richSkin.headerTextColor}';
+}
+
+.rich-panel-body {
+ padding: 10px;
+}
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/resources/log4j.xml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/resources/log4j.xml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/resources/log4j.xml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+ <appender name="console" class="org.apache.log4j.ConsoleAppender">
+ <param name="Target" value="System.out" />
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d %-5p [%c] %m%n" />
+ </layout>
+ </appender>
+ <root>
+ <priority value="info" />
+ <appender-ref ref="console" />
+ </root>
+
+</log4j:configuration>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/resources/org/richfaces/demo/data/capitals/capitals.xml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/resources/org/richfaces/demo/data/capitals/capitals.xml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/resources/org/richfaces/demo/data/capitals/capitals.xml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,503 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<capitals>
+ <capital>
+ <state>Alabama</state>
+ <name>Montgomery</name>
+ <timeZone>GMT-6</timeZone>
+ <data>
+ <item>Birmingham</item>
+ <item>Montgomery</item>
+ <item>Mobile</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Alaska</state>
+ <name>Juneau</name>
+ <timeZone>GMT-9</timeZone>
+ <data>
+ <item>Anchorage</item>
+ <item>Fairbanks</item>
+ <item>Juneau</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Arizona</state>
+ <name>Phoenix</name>
+ <timeZone>GMT-7</timeZone>
+ <data>
+ <item>Phoenix</item>
+ <item>Tucson</item>
+ <item>Mesa</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Arkansas</state>
+ <name>Little Rock</name>
+ <timeZone>GMT-6</timeZone>
+ <data>
+ <item>Little Rock</item>
+ <item>Fort Smith</item>
+ <item>Fayetteville</item>
+ </data>
+ </capital>
+ <capital>
+ <state>California</state>
+ <name>Sacramento</name>
+ <timeZone>GMT-8</timeZone>
+ <data>
+ <item>Los Angeles</item>
+ <item>San Diego</item>
+ <item>San Jose</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Colorado</state>
+ <name>Denver</name>
+ <timeZone>GMT-7</timeZone>
+ <data>
+ <item>Denver</item>
+ <item>Colorado Springs</item>
+ <item>Aurora</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Connecticut</state>
+ <name>Hartford</name>
+ <timeZone>GMT-5</timeZone>
+ <data>
+ <item>Bridgeport</item>
+ <item>New Haven</item>
+ <item>Hartford</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Delaware</state>
+ <name>Dover</name>
+ <timeZone>GMT-5</timeZone>
+ <data>
+ <item>Wilmington</item>
+ <item>Dover</item>
+ <item>Newark</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Florida</state>
+ <name>Tallahassee</name>
+ <timeZone>GMT-5</timeZone>
+ <data>
+ <item>Jacksonville</item>
+ <item>Miami</item>
+ <item>Tampa</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Georgia</state>
+ <name>Atlanta</name>
+ <timeZone>GMT-5</timeZone>
+ <data>
+ <item>Atlanta</item>
+ <item>Augusta</item>
+ <item>Columbus</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Hawaii</state>
+ <name>Honolulu</name>
+ <timeZone>GMT-10</timeZone>
+ <data>
+ <item>Honolulu1</item>
+ <item>Hilo1</item>
+ <item>Kailua1</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Idaho</state>
+ <name>Boise</name>
+ <timeZone>GMT-8</timeZone>
+ <data>
+ <item>Boise</item>
+ <item>Nampa</item>
+ <item>Meridian</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Illinois</state>
+ <name>Springfield</name>
+ <timeZone>GMT-6</timeZone>
+ <data>
+ <item>Chicago</item>
+ <item>Aurora</item>
+ <item>Rockford</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Indiana</state>
+ <name>Indianapolis</name>
+ <timeZone>GMT-5</timeZone>
+ <data>
+ <item>Indianapolis</item>
+ <item>Fort Wayne</item>
+ <item>Evansville</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Iowa</state>
+ <name>Des Moines</name>
+ <timeZone>GMT-6</timeZone>
+ <data>
+ <item>Des Moines</item>
+ <item>Cedar Rapids</item>
+ <item>Davenport</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Kansas</state>
+ <name>Topeka</name>
+ <timeZone>GMT-6</timeZone>
+ <data>
+ <item>Wichita</item>
+ <item>Overland Park</item>
+ <item>Kansas City</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Kentucky</state>
+ <name>Frankfort</name>
+ <timeZone>GMT-5</timeZone>
+ <data>
+ <item>Louisville</item>
+ <item>Lexington</item>
+ <item>Owensboro</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Louisiana</state>
+ <name>Baton Rouge</name>
+ <timeZone>GMT-6</timeZone>
+ <data>
+ <item>New Orleans</item>
+ <item>Baton Rouge</item>
+ <item>Shreveport</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Maine</state>
+ <name>Augusta</name>
+ <timeZone>GMT-5</timeZone>
+ <data>
+ <item>Portland</item>
+ <item>Lewiston</item>
+ <item>Bangor</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Maryland</state>
+ <name>Annapolis</name>
+ <timeZone>GMT-5</timeZone>
+ <data>
+ <item>Baltimore</item>
+ <item>Columbia</item>
+ <item>Silver Spring</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Massachusetts</state>
+ <name>Boston</name>
+ <timeZone>GMT-5</timeZone>
+ <data>
+ <item>Boston</item>
+ <item>Worcester</item>
+ <item>Springfield</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Michigan</state>
+ <name>Lansing</name>
+ <timeZone>GMT-5</timeZone>
+ <data>
+ <item>Detroit</item>
+ <item>Grand Rapids</item>
+ <item>Warren</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Minnesota</state>
+ <name>St. Paul</name>
+ <timeZone>GMT-6</timeZone>
+ <data>
+ <item>Minneapolis</item>
+ <item>Saint Paul</item>
+ <item>Rochester</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Mississippi</state>
+ <name>Jackson</name>
+ <timeZone>GMT-6</timeZone>
+ <data>
+ <item>Jackson</item>
+ <item>Gulfport</item>
+ <item>Biloxi</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Missouri</state>
+ <name>Jefferson City</name>
+ <timeZone>GMT-6</timeZone>
+ <data>
+ <item>Kansas City</item>
+ <item>Saint Louis</item>
+ <item>Springfield</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Montana</state>
+ <name>Helena</name>
+ <timeZone>GMT-7</timeZone>
+ <data>
+ <item>Billings</item>
+ <item>Missoula</item>
+ <item>Great Falls</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Nebraska</state>
+ <name>Lincoln</name>
+ <timeZone>GMT-6</timeZone>
+ <data>
+ <item>Omaha</item>
+ <item>Lincoln</item>
+ <item>Bellevue</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Nevada</state>
+ <name>Carson City</name>
+ <timeZone>GMT-8</timeZone>
+ <data>
+ <item>Las Vegas</item>
+ <item>Henderson</item>
+ <item>Reno</item>
+ </data>
+ </capital>
+ <capital>
+ <state>New Hampshire</state>
+ <name>Concord</name>
+ <timeZone>GMT-5</timeZone>
+ <data>
+ <item>Manchester</item>
+ <item>Nashua</item>
+ <item>Concord</item>
+ </data>
+ </capital>
+ <capital>
+ <state>New Jersey</state>
+ <name>Trenton</name>
+ <timeZone>GMT-5</timeZone>
+ <data>
+ <item>Newark</item>
+ <item>Jersey City</item>
+ <item>Paterson</item>
+ </data>
+ </capital>
+ <capital>
+ <state>New Mexico</state>
+ <name>Santa Fe</name>
+ <timeZone>GMT-7</timeZone>
+ <data>
+ <item>Albuquerque</item>
+ <item>Las Cruces</item>
+ <item>Santa Fe</item>
+ </data>
+ </capital>
+ <capital>
+ <state>New York</state>
+ <name>Albany</name>
+ <timeZone>GMT-5</timeZone>
+ <data>
+ <item>New York City</item>
+ <item>Buffalo</item>
+ <item>Rochester</item>
+ </data>
+ </capital>
+ <capital>
+ <state>North Carolina</state>
+ <name>Raleigh</name>
+ <timeZone>GMT-5</timeZone>
+ <data>
+ <item>Charlotte</item>
+ <item>Raleigh</item>
+ <item>Greensboro</item>
+ </data>
+ </capital>
+ <capital>
+ <state>North Dakota</state>
+ <name>Bismarck</name>
+ <timeZone>GMT-6</timeZone>
+ <data>
+ <item>Fargo</item>
+ <item>Bismarck</item>
+ <item>Grand Forks</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Ohio</state>
+ <name>Columbus</name>
+ <timeZone>GMT-5</timeZone>
+ <data>
+ <item>Columbus</item>
+ <item>Cleveland</item>
+ <item>Cincinnati</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Oklahoma</state>
+ <name>Oklahoma City</name>
+ <timeZone>GMT-6</timeZone>
+ <data>
+ <item>Oklahoma City</item>
+ <item>Tulsa</item>
+ <item>Norman</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Oregon</state>
+ <name>Salem</name>
+ <timeZone>GMT-8</timeZone>
+ <data>
+ <item>Portland</item>
+ <item>Salem</item>
+ <item>Eugene</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Pennsylvania</state>
+ <name>Harrisburg</name>
+ <timeZone>GMT-5</timeZone>
+ <data>
+ <item>Philadelphia</item>
+ <item>Pittsburgh</item>
+ <item>Allentown</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Rhode Island</state>
+ <name>Providence</name>
+ <timeZone>GMT-5</timeZone>
+ <data>
+ <item>Providence</item>
+ <item>Warwick</item>
+ <item>Cranston</item>
+ </data>
+ </capital>
+ <capital>
+ <state>South Carolina</state>
+ <name>Columbia</name>
+ <timeZone>GMT-5</timeZone>
+ <data>
+ <item>Columbia</item>
+ <item>Charleston</item>
+ <item>North Charleston</item>
+ </data>
+ </capital>
+ <capital>
+ <state>South Dakota</state>
+ <name>Pierre</name>
+ <timeZone>GMT-6</timeZone>
+ <data>
+ <item>Sioux Falls</item>
+ <item>Rapid City</item>
+ <item>Aberdeen</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Tennessee</state>
+ <name>Nashville</name>
+ <timeZone>GMT-5</timeZone>
+ <data>
+ <item>Memphis</item>
+ <item>Nashville</item>
+ <item>Knoxville</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ <data>
+ <item>Houston</item>
+ <item>San Antonio</item>
+ <item>Dallas</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Utah</state>
+ <name>Salt Lake City</name>
+ <timeZone>GMT-7</timeZone>
+ <data>
+ <item>Salt Lake City</item>
+ <item>Provo</item>
+ <item>West Valley City</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Vermont</state>
+ <name>Montpelier</name>
+ <timeZone>GMT-5</timeZone>
+ <data>
+ <item>Burlington</item>
+ <item>Rutland</item>
+ <item>South Burlington</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Virginia</state>
+ <name>Richmond</name>
+ <timeZone>GMT-5</timeZone>
+ <data>
+ <item>Virginia Beach</item>
+ <item>Norfolk</item>
+ <item>Chesapeake</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Washington</state>
+ <name>Olympia</name>
+ <timeZone>GMT-8</timeZone>
+ <data>
+ <item>Seattle</item>
+ <item>Spokane</item>
+ <item>Tacoma</item>
+ </data>
+ </capital>
+ <capital>
+ <state>West Virginia</state>
+ <name>Charleston</name>
+ <timeZone>GMT-5</timeZone>
+ <data>
+ <item>Charleston</item>
+ <item>Huntington</item>
+ <item>Parkersburg</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Wisconsin</state>
+ <name>Madison</name>
+ <timeZone>GMT-6</timeZone>
+ <data>
+ <item>Milwaukee</item>
+ <item>Madison</item>
+ <item>Green Bay</item>
+ </data>
+ </capital>
+ <capital>
+ <state>Wyoming</state>
+ <name>Cheyenne</name>
+ <timeZone>GMT-7</timeZone>
+ <data>
+ <item>Cheyenne</item>
+ <item>Casper</item>
+ <item>Laramie</item>
+ </data>
+ </capital>
+</capitals>
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/resources/org/richfaces/demo/data/common/navigation.xml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/resources/org/richfaces/demo/data/common/navigation.xml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,344 @@
+<?xml version="1.0" encoding="UTF-8"?>
+ <!--
+ NOTES(TODO: move to some readme in future): id for sample should
+ equals to xhtml page name with the sample the same for demo id - it
+ should be equals to name of the folder where samples placed
+ -->
+<root>
+ <group>
+ <name>Ajax Action</name>
+ <demos>
+ <demo>
+ <id>ajax</id>
+ <name>a4j:ajax</name>
+ <samples>
+ <sample>
+ <id>ajax</id>
+ <name>Simple sample</name>
+ </sample>
+ <sample>
+ <id>selectsUpdates</id>
+ <name>Dynamic Selects</name>
+ </sample>
+ </samples>
+ </demo>
+ <demo>
+ <id>commandButton</id>
+ <name>a4j:commandButton</name>
+ <samples>
+ <sample>
+ <id>commandButton</id>
+ <name>Command Button Simple</name>
+ </sample>
+ </samples>
+ </demo>
+ <demo>
+ <id>commandLink</id>
+ <name>a4j:commandLink</name>
+ <samples>
+ <sample>
+ <id>commandLink</id>
+ <name>Command Link Simple</name>
+ </sample>
+ </samples>
+ </demo>
+ <demo>
+ <id>jsFunction</id>
+ <name>a4j:jsFunction</name>
+ <samples>
+ <sample>
+ <id>jsFunction</id>
+ <name>jsFunction Simple</name>
+ </sample>
+ </samples>
+ </demo>
+ <demo>
+ <id>poll</id>
+ <name>a4j:poll</name>
+ <samples>
+ <sample>
+ <id>poll</id>
+ <name>Poll Simple</name>
+ </sample>
+ </samples>
+ </demo>
+ <demo>
+ <id>push</id>
+ <name>a4j:push</name>
+ <samples>
+ <sample>
+ <id>push</id>
+ <name>push Simple</name>
+ </sample>
+ </samples>
+ </demo>
+ <demo>
+ <id>param</id>
+ <name>a4j:param</name>
+ <samples>
+ <sample>
+ <id>param</id>
+ <name>Param Simple Usage</name>
+ </sample>
+ <sample>
+ <id>skinChange</id>
+ <name>Parameters for non-Ajax components</name>
+ </sample>
+ <sample>
+ <id>clientParam</id>
+ <name>Parameters from client side</name>
+ </sample>
+ </samples>
+ </demo>
+ </demos>
+ </group>
+ <group>
+ <name>Ajax Queue</name>
+ <demos>
+ <demo>
+ <id>queue</id>
+ <name>a4j:queue</name>
+ <samples>
+ <sample>
+ <id>queue</id>
+ <name>queue</name>
+ </sample>
+ </samples>
+ </demo>
+ <demo>
+ <id>attachQueue</id>
+ <name>a4j:attachQueue</name>
+ <samples>
+ <sample>
+ <id>attachQueue</id>
+ <name>attachQueue</name>
+ </sample>
+ </samples>
+ </demo>
+ </demos>
+ </group>
+ <group>
+ <name>Ajax Output/Containers</name>
+ <demos>
+ <demo>
+ <id>outputPanel</id>
+ <name>a4j:outputPanel</name>
+ <samples>
+ <sample>
+ <id>simple</id>
+ <name>outputPanel Simple</name>
+ </sample>
+ <sample>
+ <id>compositemessages</id>
+ <name>Auto update for h:messages component</name>
+ </sample>
+ </samples>
+ </demo>
+ <demo>
+ <id>status</id>
+ <name>a4j:status</name>
+ <samples>
+ <sample>
+ <id>viewusage</id>
+ <name>Common status for view</name>
+ </sample>
+ <sample>
+ <id>simple</id>
+ <name>Status Simple</name>
+ </sample>
+ <sample>
+ <id>referencedusage</id>
+ <name>Referenced status</name>
+ </sample>
+ </samples>
+ </demo>
+ <demo>
+ <id>region</id>
+ <name>a4j:region</name>
+ <samples>
+ <sample>
+ <id>region</id>
+ <name>Region</name>
+ </sample>
+ </samples>
+ </demo>
+ <demo>
+ <id>mediaOutput</id>
+ <name>a4j:mediaOutput</name>
+ <samples>
+ <sample>
+ <id>imgUsage</id>
+ <name>mediaOutput for image output</name>
+ </sample>
+ </samples>
+ </demo>
+ <demo>
+ <id>log</id>
+ <name>a4j:log</name>
+ <samples>
+ <sample>
+ <id>log</id>
+ <name>Log usage</name>
+ </sample>
+ </samples>
+ </demo>
+ </demos>
+ </group>
+ <group>
+ <name>Data Iteration</name>
+ <demos>
+ <demo>
+ <id>repeat</id>
+ <name>a4j:repeat</name>
+ <samples>
+ <sample>
+ <id>simpleGrid</id>
+ <name>Simple Grid Creation</name>
+ </sample>
+ </samples>
+ </demo>
+ <demo>
+ <id>dataTable</id>
+ <name>rich:dataTable</name>
+ <samples>
+ <sample>
+ <id>simpleTable</id>
+ <name>Data Table Basic</name>
+ </sample>
+ <sample>
+ <id>tableStyling</id>
+ <name>Data Table Styling</name>
+ <description>
+ <!-- TODO: rowClass should appears at this sample after completion -->
+ <!--
+ TODO: rowClasses should be used instead of jQuerry selectors
+ after will works
+ -->
+ <!--
+ TODO: onrowmouseover, onrowmouseout - should be used instead of
+ jQuery selector
+ -->
+ </description>
+ </sample>
+ <sample>
+ <id>tableSorting</id>
+ <name>Data Table Sorting</name>
+ </sample>
+ <sample>
+ <id>tableFiltering</id>
+ <name>Data Table Filtering</name>
+ </sample>
+ </samples>
+ </demo>
+ <demo>
+ <id>extendedDataTable</id>
+ <name>rich:extendedDataTable</name>
+ <samples>
+ <sample>
+ <id>simpleTable</id>
+ <name>ExtendedData Table Basic Usage</name>
+ </sample>
+ </samples>
+ </demo>
+ <demo>
+ <id>subTableToggleControl</id>
+ <name>rich:subTableToggleControl</name>
+ <samples>
+ <sample>
+ <id>subTableToggleControl</id>
+ <name>rich:subTableToggleControl Basic Usage</name>
+ </sample>
+ </samples>
+ </demo>
+ <demo>
+ <id>dataScroller</id>
+ <name>rich:dataScroller</name>
+ <samples>
+ <sample>
+ <id>simpleScrolling</id>
+ <name>DataScroller Basic Usage</name>
+ </sample>
+ <sample>
+ <id>dataScrollerAPI</id>
+ <name>DataScroller API</name>
+ </sample>
+ </samples>
+ </demo>
+ <demo new="true">
+ <id>list</id>
+ <name>rich:list</name>
+ <samples>
+ <sample>
+ <id>lists</id>
+ <name>Data Lists Component</name>
+ </sample>
+ </samples>
+ </demo>
+ <demo new="true">
+ <id>dataGrid</id>
+ <name>rich:dataGrid</name>
+ <samples>
+ <sample>
+ <id>grid</id>
+ <name>Data Grid Component</name>
+ </sample>
+ </samples>
+ </demo>
+ </demos>
+ </group>
+ <group>
+ <name>Output/Panels</name>
+ <demos>
+ <demo>
+ <id>panel</id>
+ <name>rich:panel</name>
+ <samples>
+ <sample>
+ <id>simple</id>
+ <name>Simple Panels</name>
+ </sample>
+ <sample>
+ <id>lookCustomization</id>
+ <name>Look and feel customization</name>
+ </sample>
+ </samples>
+ </demo>
+ </demos>
+ </group>
+
+ <group>
+ <name>Misc Components/Features</name>
+ <demos>
+ <demo>
+ <id>standardSkinning</id>
+ <name>Standard elements skinning</name>
+ <samples>
+ <sample>
+ <id>standardSkinning</id>
+ <name>Standard elements skinning feature</name>
+ </sample>
+ </samples>
+ </demo>
+ <demo>
+ <id>functions</id>
+ <name>RichFaces functions</name>
+ <samples>
+ <sample>
+ <id>functions</id>
+ <name>RichFaces Functions</name>
+ </sample>
+ </samples>
+ </demo>
+ <demo>
+ <id>componentControl</id>
+ <name>rich:componentControl</name>
+ <samples>
+ <sample>
+ <id>tableFilteringAPI</id>
+ <name>Table Filtering using componentControl and API</name>
+ </sample>
+ </samples>
+ </demo>
+ </demos>
+ </group>
+</root>
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/resources/org/richfaces/demo/mediaOutput/text.swf
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/resources/org/richfaces/demo/mediaOutput/text.swf
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/WEB-INF/appengine-web.xml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/WEB-INF/appengine-web.xml 2010-07-29 18:42:27 UTC (rev 18286)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/WEB-INF/appengine-web.xml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>richfaces-showcase-gae</application>
- <version>4</version>
+ <version>5</version>
<sessions-enabled>true</sessions-enabled>
<system-properties>
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/WEB-INF/faces-config.xml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/WEB-INF/faces-config.xml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,26 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
+ version="2.0">
+
+ <application>
+ <!-- system-event-listener>
+ <system-event-listener-class>org.richfaces.resource.MapBasedResourceCodecListener</system-event-listener-class>
+ <system-event-class>javax.faces.event.PostConstructApplicationEvent</system-event-class>
+ </system-event-listener -->
+ </application>
+
+ <managed-bean>
+ <managed-bean-name>opBean1</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.outputPanel.OutputPanelBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>opBean2</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.outputPanel.OutputPanelBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <application>
+ <resource-handler>org.richfaces.resource.DictionaryResourceHandlerImpl</resource-handler>
+ </application>
+</faces-config>
\ No newline at end of file
Modified: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/WEB-INF/web.xml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/WEB-INF/web.xml 2010-07-29 18:42:27 UTC (rev 18286)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/WEB-INF/web.xml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -53,7 +53,7 @@
</context-param>
<context-param>
<param-name>com.sun.faces.expressionFactory</param-name>
- <param-value>org.jboss.el.ExpressionFactoryImpl</param-value>
+ <param-value>com.sun.el.ExpressionFactoryImpl</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/ai.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/ai.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/alabama.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/alabama.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/alaska.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/alaska.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/arizona.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/arizona.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/arkansas.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/arkansas.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/california.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/california.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/colorado.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/colorado.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/connecticut.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/connecticut.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/delaware.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/delaware.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/florida.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/florida.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/georgia.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/georgia.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/hawaii.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/hawaii.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/idaho.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/idaho.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/illinois.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/illinois.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/indiana.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/indiana.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/iowa.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/iowa.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/kansas.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/kansas.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/kentucky.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/kentucky.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/louisiana.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/louisiana.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/maine.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/maine.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/maryland.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/maryland.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/massachusetts.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/massachusetts.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/michigan.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/michigan.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/minnesota.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/minnesota.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/mississippi.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/mississippi.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/missouri.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/missouri.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/montana.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/montana.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/nebraska.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/nebraska.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/nevada.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/nevada.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/newhampshire.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/newhampshire.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/newjersey.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/newjersey.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/newmexico.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/newmexico.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/newyork.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/newyork.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/northcarolina.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/northcarolina.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/northdakota.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/northdakota.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/ohio.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/ohio.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/oklahoma.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/oklahoma.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/oregon.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/oregon.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/pennsylvania.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/pennsylvania.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/rhodeisland.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/rhodeisland.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/southcarolina.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/southcarolina.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/southdakota.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/southdakota.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/tennessee.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/tennessee.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/texas.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/texas.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/utah.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/utah.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/vermont.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/vermont.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/virginia.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/virginia.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/washington.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/washington.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/westvirginia.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/westvirginia.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/wisconsin.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/wisconsin.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/wyoming.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/capitals/wyoming.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/icons/common/rf.png
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/icons/common/rf.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/icons/scroller/arr_left.png
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/icons/scroller/arr_left.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/icons/scroller/arr_right.png
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/icons/scroller/arr_right.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/nature/pic1.jpg
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/nature/pic1.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/nature/pic2.jpg
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/nature/pic2.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/nature/pic3.jpg
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/nature/pic3.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/nature/pic4.jpg
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/nature/pic4.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/nature/pic5.jpg
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/nature/pic5.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/nature/pic6.jpg
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/nature/pic6.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/nature/pic7.jpg
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/nature/pic7.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/nature/pic8.jpg
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/nature/pic8.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/nature/pic9.jpg
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/nature/pic9.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/note_bg.gif
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/note_bg.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/richfaces-banner.png
===================================================================
(Binary files differ)
Property changes on: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/images/richfaces-banner.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/index.jsp
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/index.jsp 2010-07-29 18:42:27 UTC (rev 18286)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/index.jsp 2010-07-29 23:17:51 UTC (rev 18287)
@@ -1,9 +1,7 @@
-<!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">
-<head>
- <title>Welcome</title>
-</head>
-<body>
-Welcome to Google App Engine for Java!
-</body>
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head></head>
+ <body>
+ <jsp:forward page="/welcome.jsf" />
+ </body>
</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/resources/rich/css/message.css
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/resources/rich/css/message.css (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/resources/rich/css/message.css 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,3 @@
+rich-message{
+ color:red;
+}
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/resources/rich/css/messages.css
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/resources/rich/css/messages.css (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/resources/rich/css/messages.css 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,3 @@
+rich-messages{
+ color:red;
+}
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/resources/rich/message.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/resources/rich/message.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/resources/rich/message.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,30 @@
+<!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:c="http://java.sun.com/jsp/jstl/core"
+ xmlns:composite="http://java.sun.com/jsf/composite"
+ xmlns:a4j="http://richfaces.org/a4j">
+<head>
+<title>panel</title>
+</head>
+<body>
+
+<composite:interface>
+ <composite:attribute name="for" required="true" />
+ <composite:attribute name="style" required="false" />
+ <composite:attribute name="styleClass" required="false" />
+</composite:interface>
+
+<composite:implementation>
+ <h:outputStylesheet name="rich/css/message.css" />
+ <a4j:outputPanel ajaxRendered="true" layout="none">
+ <h:message for="#{cc.attrs.for}" showDetail="#{cc.attrs.showDetails}"
+ showSummary="#{cc.attrs.showSummary}" style="#{cc.attrs.style}"
+ styleClass="rich-message #{cc.attrs.styleClass}" />
+ </a4j:outputPanel>
+</composite:implementation>
+</body>
+</html>
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/resources/rich/messages.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/resources/rich/messages.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/resources/rich/messages.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,29 @@
+<!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:c="http://java.sun.com/jsp/jstl/core"
+ xmlns:composite="http://java.sun.com/jsf/composite"
+ xmlns:a4j="http://richfaces.org/a4j">
+<head>
+<title>panel</title>
+</head>
+<body>
+
+<composite:interface>
+ <composite:attribute name="style" required="false" />
+ <composite:attribute name="styleClass" required="false" />
+</composite:interface>
+
+<composite:implementation>
+ <h:outputStylesheet name="rich/css/messages.css" />
+ <a4j:outputPanel ajaxRendered="true" layout="none">
+ <h:messages layout="#{cc.attrs.layout}"
+ showSummary="true" style="color:red; #{cc.attrs.style}"
+ styleClass="rich-message #{cc.attrs.styleClass}" />
+ </a4j:outputPanel>
+</composite:implementation>
+</body>
+</html>
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/resources/rich/page.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/resources/rich/page.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/resources/rich/page.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,69 @@
+<!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:c="http://java.sun.com/jsp/jstl/core"
+ xmlns:composite="http://java.sun.com/jsf/composite">
+ <head>
+ <title>page</title>
+ </head>
+<body>
+
+<composite:interface>
+ <composite:attribute name="style" />
+ <composite:attribute name="styleClass"/>
+ <composite:attribute name="headerClass"/>
+ <composite:attribute name="bodyClass"/>
+ <composite:attribute name="sidebarClass"/>
+</composite:interface>
+<composite:implementation>
+<h:outputText value="<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">" escape="false"/>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<h:head>
+ <title>#{cc.attrs.pageTitle}</title>
+ <composite:renderFacet name="pageHeader"/>
+</h:head>
+<h:body>
+ <h:outputStylesheet name="rich/css/page.ecss" />
+ <table border="0" cellpadding="0" cellspacing="0" class="rich-page #{cc.attrs.pageClass}">
+ <tbody>
+ <tr>
+ <td class="header_bg">
+ <div class="header_content rich-page-header #{cc.attrs.headerClass}">
+ <composite:renderFacet name="header"/>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td width="100%" height="100%" class="bg_tabbody">
+ <table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%" class="rich-page-content #{cc.attrs.contentClass}">
+ <tbody>
+ <tr>
+ <td class="menu_col rich-page-sidebar #{cc.attrs.sidebarClass}">
+ <div class="menu_width spacer" style="width:#{cc.attrs.sidebarWidth}px"></div>
+ <composite:renderFacet name="sidebar"/>
+ </td>
+ <td class="content_col rich-page-body #{cc.attrs.bodyClass}">
+ <composite:insertChildren />
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td class="footer_bg">
+ <div class="footer_bg_content rich-page-footer #{cc.attrs.footerClass}">
+ <composite:renderFacet name="footer"/>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+</h:body>
+</html>
+</composite:implementation>
+</body>
+</html>
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/resources/rich/panel.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/resources/rich/panel.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/resources/rich/panel.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,50 @@
+<!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:c="http://java.sun.com/jsp/jstl/core"
+ xmlns:composite="http://java.sun.com/jsf/composite">
+ <head>
+ <title>panel</title>
+ </head>
+<body>
+
+<composite:interface>
+ <composite:attribute name="id" required="false"/>
+ <composite:attribute name="style" required="false"/>
+ <composite:attribute name="styleClass" required="false"/>
+ <composite:attribute name="headerClass" required="false"/>
+ <composite:attribute name="bodyClass" required="false"/>
+</composite:interface>
+
+<composite:implementation>
+ <h:outputStylesheet name="rich/css/panel.ecss" />
+
+ <div class="rich-panel #{cc.attrs.styleClass}" id="#{cc.attrs.id}"
+ style="#{cc.attrs.style}"
+ onclick="#{cc.attrs.onclick}"
+ ondblclick="#{cc.attrs.ondblclick}"
+ onkeydown="#{cc.attrs.onkeydown}"
+ onkeypress="#{cc.attrs.onkeypress}"
+ onkeyup="#{cc.attrs.onkeyup}"
+ onmousedown="#{cc.attrs.onmousedown}"
+ onmousemove="#{cc.attrs.onmousemove}"
+ onmouseout="#{cc.attrs.onmouseout}"
+ onmouseover="#{cc.attrs.onmouseover}"
+ onmouseup="#{cc.attrs.onmouseup}">
+
+ <h:panelGroup rendered="#{not empty cc.facets.header}">
+ <div class="rich-panel-header #{cc.attrs.headerClass}">
+ <composite:renderFacet name="header"/>
+ </div>
+ </h:panelGroup>
+ <div class="rich-panel-body #{cc.attrs.bodyClass}" >
+ <composite:insertChildren />
+ </div>
+
+ </div>
+</composite:implementation>
+</body>
+</html>
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/resources/rich/toolBar.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/resources/rich/toolBar.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/resources/rich/toolBar.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,32 @@
+<!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:c="http://java.sun.com/jsp/jstl/core"
+ xmlns:composite="http://java.sun.com/jsf/composite"
+ xmlns:a4j="http://richfaces.org/a4j">
+ <head>
+ <title>toolBar</title>
+ </head>
+<body>
+
+<composite:interface>
+ <composite:attribute name="items" required="true"/>
+</composite:interface>
+<composite:implementation>
+ <table>
+ <tbody>
+ <a4j:repeat value="#{cc.attrs.items}" var="item">
+ <tr>
+ <td>
+ <h:link value="#{item.name}" outcome="#{item.outcome}" />
+ </td>
+ </tr>
+ </a4j:repeat>
+ </tbody>
+ </table>
+</composite:implementation>
+</body>
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/ajax/ajax.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/ajax/ajax.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/ajax/ajax.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -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"
+ xmlns:a4j="http://richfaces.org/a4j">
+
+ <ui:composition>
+ <p>The behavior that adds javascript call for sending Ajax request
+ to specified event on parent component</p>
+ <h:form>
+ <h:inputText value="#{userBean.name}">
+ <a4j:ajax event="keyup" render="out"/>
+ </h:inputText>
+ <h:outputText value="#{userBean.name}" id="out"/>
+ </h:form>
+ <p>Typical use-case of dependent select components. When you
+ choosing the type in the first select - corresponding items appears in
+ second one.</p>
+ </ui:composition>
+
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/ajax/selectsUpdates.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/ajax/selectsUpdates.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/ajax/selectsUpdates.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,26 @@
+<!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">
+
+<ui:composition>
+ <p>Typical use-case of dependent select components. When you choosing
+ the type in the first select - corresponding items appears in second one.
+ </p>
+ <h:form>
+ <h:selectOneMenu value="#{selectsBean.currentType}"
+ valueChangeListener="#{selectsBean.valueChanged}">
+ <f:selectItems value="#{selectsBean.firstList}" />
+ <a4j:ajax event="valueChange" render="second" execute="@this" />
+ </h:selectOneMenu>
+ <a4j:outputPanel id="second" layout="block">
+ <h:selectOneMenu value="#{selectsBean.currentType}" rendered="#{not empty selectsBean.currentType}">
+ <f:selectItems value="#{selectsBean.secondList}" />
+ </h:selectOneMenu>
+ </a4j:outputPanel>
+ </h:form>
+</ui:composition>
+
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/attachQueue/attachQueue.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/attachQueue/attachQueue.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/attachQueue/attachQueue.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,40 @@
+<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:c="http://java.sun.com/jstl/core"
+ xmlns:rich="http://java.sun.com/jsf/composite/rich">
+<p>In RichFaces 4 all request settings related to queue was moved out of components attributes and
+now customization available using new a4j:attachQueue tag. Next sample shows how requestGroupingId
+(former similarityGroupingId) could be set for different components making the requests from them similar.
+Besides setting requestGroupingId - attach queue tag at second button redefines default queue
+request delay from 500ms to 1500ms.
+</p>
+
+<p>If you will click the buttons fast - requests will be combined and only last click will
+be processed</p>
+
+<a4j:queue requestDelay="500"></a4j:queue>
+ <h:form>
+ <rich:panel>
+ <h:panelGrid columns="2">
+ <a4j:commandButton value="Set Name to Alex" render="rep">
+ <a4j:attachQueue requestGroupingId="group1"/>
+ <a4j:param name="username" value="Alex" assignTo="#{userBean.name}" />
+ </a4j:commandButton>
+
+ <a4j:commandButton value="Set Name to John" render="rep">
+ <a4j:attachQueue requestGroupingId="group1" requestDelay="1500"/>
+ <a4j:param name="username" value="John"
+ assignTo="#{userBean.name}" />
+ </a4j:commandButton>
+ </h:panelGrid>
+ </rich:panel>
+
+ <rich:panel>
+ <h:outputText id="rep" value="Selected Name:#{userBean.name}" />
+ </rich:panel>
+ </h:form>
+</ui:composition>
+
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/commandButton/commandButton.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/commandButton/commandButton.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/commandButton/commandButton.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -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:a4j="http://richfaces.org/a4j">
+
+<ui:composition>
+ <style>
+ <!--
+ .outhello {
+ font-weight: bold;
+ }
+ -->
+ </style>
+ <p>
+ The combination similar to h:commandButton with f:ajax. Inherits all
+ a4j:ajax special options.
+ </p>
+ <h:form>
+ <h:panelGrid columns="3">
+ <h:outputText value="Name:" />
+ <h:inputText value="#{userBean.name}" />
+ <a4j:commandButton value="Say Hello" render="out" execute="@form" />
+ </h:panelGrid>
+ </h:form>
+ <br />
+ <a4j:outputPanel id="out">
+ <h:outputText value="Hello #{userBean.name} !" rendered="#{not empty userBean.name}" styleClass="outhello" />
+ </a4j:outputPanel>
+</ui:composition>
+
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/commandLink/commandLink.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/commandLink/commandLink.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/commandLink/commandLink.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,32 @@
+<!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">
+
+ <ui:composition>
+ <style>
+ <!--
+ .outhello {
+ font-weight: bold;
+ }
+ -->
+ </style>
+ <p>
+ The combination similar to h:commandLink with f:ajax. Inherits all
+ a4j:ajax special options.
+ </p>
+ <h:form>
+ <h:panelGrid columns="3">
+ <h:outputText value="Name:" />
+ <h:inputText value="#{userBean.name}" />
+ <a4j:commandLink value="Say Hello" render="out" execute="@form" />
+ </h:panelGrid>
+ </h:form>
+ <br />
+ <a4j:outputPanel id="out">
+ <h:outputText value="Hello #{userBean.name} !" styleClass="outhello" />
+ </a4j:outputPanel>
+</ui:composition>
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/component-sample.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/component-sample.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/component-sample.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -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:rich="http://java.sun.com/jsf/composite/rich">
+
+<ui:composition template="/templates/main.xhtml">
+ <ui:define name="demoSampleParameters">
+ <f:metadata>
+ <f:viewParam name="sample" value="#{demoNavigator.sample}" />
+ <f:viewParam name="demo" value="#{demoNavigator.demo}" />
+ <f:viewParam name="skin" value="#{skinBean.skin}"/>
+ </f:metadata>
+ </ui:define>
+ <ui:define name="body">
+ <rich:panel styleClass="samples-navigator">
+ <ui:repeat value="#{demoNavigator.currentDemo.samples}" var="s" varStatus="status">
+ <h:link value="#{s.name}" includeViewParams="true">
+ <f:param name="sample" value="#{s.id}" />
+ <f:attribute name="style" value="#{(s.id == demoNavigator.currentSample.id) ? 'color:orange' : ''}"/>
+ </h:link>
+ <h:outputText value=" | " rendered="#{not status.last}" />
+ </ui:repeat>
+ </rich:panel>
+ <fieldset><legend><b>#{demoNavigator.currentSample.name}</b></legend>
+ <ui:include src="#{demoNavigator.sampleURI}" /></fieldset>
+ </ui:define>
+</ui:composition>
+
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/componentControl/tableFilteringAPI.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/componentControl/tableFilteringAPI.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/componentControl/tableFilteringAPI.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,94 @@
+<!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"
+ xmlns:fn="http://java.sun.com/jsp/jstl/functions"
+ xmlns:r="http://java.sun.com/jsf/composite/rich">
+
+<ui:composition>
+ <style>
+ .atop{
+ vertical-align:top;
+ }
+ </style>
+ <p>ComponentControl allows to call JS api on any component. It supports parameters passing using f:param, a4j:param and a4j:hasParam tags. </p>
+ <p>Currently target component should be defined by using clientId, but we planning to add lookup by short id in nearest versions.</p>
+ <h:form id="form">
+ <h:panelGrid columns="2" columnClasses="atop">
+ <r:panel>
+ <f:facet name="header">
+ <h:outputText value="Quick Filter Panel" />
+ </f:facet>
+ <fieldset><legend>Filter By Vendor</legend>
+ <ul>
+ <a4j:repeat value="#{carsBean.allVendors}" var="vendor">
+ <li><h:outputLink value="#">#{vendor}
+ <rich:componentControl target="table" operation="filter" event="click">
+ <f:param value="vendor"/>
+ <f:param value="#{vendor}"/>
+ </rich:componentControl>
+ </h:outputLink>
+ </li>
+ </a4j:repeat>
+ </ul>
+ </fieldset>
+ </r:panel>
+ <rich:dataTable value="#{carsBean.allInventoryItems}" var="car"
+ id="table" rows="20">
+ <rich:column id="vendor" filterValue="#{carsFilteringBean.vendorFilter}"
+ filterExpression="#{carsFilteringBean.vendorFilter == '' or carsFilteringBean.vendorFilter == null or carsFilteringBean.vendorFilter == car.vendor}">
+ <f:facet name="header">
+ <h:panelGroup>
+ <h:outputText value="Vendor" />
+ </h:panelGroup>
+ </f:facet>
+ <h:outputText value="#{car.vendor}" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Model" />
+ </f:facet>
+ <h:outputText value="#{car.model}" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Price" />
+ </f:facet>
+ <h:outputText value="#{car.price}" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:panelGroup>
+ <h:outputText value="Mileage" />
+ </h:panelGroup>
+ </f:facet>
+ <h:outputText value="#{car.mileage}" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:panelGroup>
+ <h:outputText value="Days Live" />
+ </h:panelGroup>
+ </f:facet>
+ <h:outputText value="#{car.daysLive}" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:panelGroup>
+ <h:outputText value="VIN " />
+ </h:panelGroup>
+ </f:facet>
+ <h:outputText value="#{car.vin}" />
+ </rich:column>
+ <f:facet name="footer">
+ <rich:dataScroller/>
+ </f:facet>
+ </rich:dataTable>
+ </h:panelGrid>
+
+ </h:form>
+</ui:composition>
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataGrid/grid.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataGrid/grid.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataGrid/grid.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,53 @@
+<!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>
+ <p>The component takes iterates a model as any other iteration
+ component and outputs it the same way as <h:PanelGrid> does for
+ inline data. To define grid properties and styles, use the same
+ definitions as for <h:panelGrid>.</p>
+ <p>The following example shows the dataGrid component in use:</p>
+ <style>
+.label {
+ font-weight: bold;
+}
+
+.pbody {
+ width: 200px;
+}
+</style>
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="Car Store"></h:outputText>
+ </f:facet>
+ <h:form>
+ <rich:dataGrid value="#{carsBean.allInventoryItems}" var="car"
+ columns="3" elements="9" width="600px">
+ <rich:panel bodyClass="pbody">
+ <f:facet name="header">
+ <h:outputText value="#{car.vendor} #{car.model}"></h:outputText>
+ </f:facet>
+ <h:panelGrid columns="2">
+ <h:outputText value="Price:" styleClass="label"></h:outputText>
+ <h:outputText value="#{car.price}" />
+ <h:outputText value="Mileage:" styleClass="label"></h:outputText>
+ <h:outputText value="#{car.mileage}" />
+ <h:outputText value="VIN:" styleClass="label"></h:outputText>
+ <h:outputText value="#{car.vin}" />
+ <h:outputText value="Stock:" styleClass="label"></h:outputText>
+ <h:outputText value="#{car.stock}" />
+ </h:panelGrid>
+ </rich:panel>
+ <f:facet name="footer">
+ <rich:dataScroller/>
+ </f:facet>
+ </rich:dataGrid>
+ </h:form>
+ </rich:panel>
+</ui:composition>
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataScroller/dataScrollerAPI.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataScroller/dataScrollerAPI.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataScroller/dataScrollerAPI.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,41 @@
+<!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>
+ <style>
+.calign {
+ text-align: center;
+}
+</style>
+<p>dataScroller provides cliens side API functions in order to provide control from
+your JavaScript custom handlers. List of api methods:</p>
+<ul style="font-style: italic">
+ <li>next</li>
+ <li>previous</li>
+ <li>first</li>
+ <li>last</li>
+</ul>
+<p>This simple sample shows how the scroller could be controlled via API from external controls(arrows images)</p>
+ <h:form id="form">
+ <h:panelGrid columns="1" rowClasses="calign">
+ <h:panelGrid columns="3" id="repeat">
+ <h:graphicImage value="/images/icons/scroller/arr_left.png"
+ onclick="#{rich:component('ds')}.previous()" />
+ <a4j:repeat rows="3" value="#{slidesBean.pictures}" var="pic"
+ id="pics">
+ <h:graphicImage value="#{pic.uri}" style="padding:5px;"/>
+ </a4j:repeat>
+ <h:graphicImage value="/images/icons/scroller/arr_right.png"
+ onclick="#{rich:component('ds')}.next()" />
+ </h:panelGrid>
+ <rich:dataScroller for="pics" id="ds" render="repeat" stepControls="none" boundaryControls="none" fastControls="none" maxPages="10"/>
+ </h:panelGrid>
+ </h:form>
+</ui:composition>
+
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataScroller/simpleScrolling.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataScroller/simpleScrolling.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataScroller/simpleScrolling.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,53 @@
+<!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>
+<p>dataScroller component provided in order to implement Ajax pagination for data iteration components.</p>
+<p>Starting from 4.x version - no more additional updated should be defined by end-developer in order to
+synchronize different dataScrollers attached to the same table as in example below.</p>
+ <h:form id="form">
+ <rich:dataScroller for="table" maxPages="6"/>
+ <rich:dataTable value="#{carsBean.allInventoryItems}" var="car"
+ id="table" rows="10">
+ <rich:column accept="#{carsFiteringBean.acceptVendor}">
+ <f:facet name="header">
+ <h:outputText value="Vendor " />
+ </f:facet>
+ <h:outputText value="#{car.vendor}" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Model" />
+ </f:facet>
+ <h:outputText value="#{car.model}" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Price" />
+ </f:facet>
+ <h:outputText value="#{car.price}" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Mileage" />
+ </f:facet>
+ <h:outputText value="#{car.mileage}" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="VIN " />
+ </f:facet>
+ <h:outputText value="#{car.vin}" />
+ </rich:column>
+ </rich:dataTable>
+ <rich:dataScroller for="table" maxPages="6"/>
+ </h:form>
+</ui:composition>
+
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataTable/dataTableEdit.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataTable/dataTableEdit.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataTable/dataTableEdit.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,40 @@
+<!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">
+
+ <ui:composition>
+ <h:form>
+ <h:dataTable value="#{carsBean.allCars}" var="car" id="table">
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Make" />
+ </f:facet>
+ <h:outputText value="#{car.make}"/>
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Model" />
+ </f:facet>
+ <h:outputText value="#{car.model}"/>
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Price" />
+ </f:facet>
+ <h:outputText value="#{car.price}"/>
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ Actions
+ </f:facet>
+ <a4j:commandLink value="Edit" action="#{carsBean.edit}" render="table"/>
+ <h:outputText value=" " />
+ <a4j:commandLink value="Remove" action="#{carsBean.remove}" render="table"/>
+ </h:column>
+ </h:dataTable>
+ </h:form>
+ </ui:composition>
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataTable/simpleTable.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataTable/simpleTable.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataTable/simpleTable.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,119 @@
+<!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>
+ <p>This sample shows simple master-detail table implemented using<b>
+ tbl:dataTable</b> and<b> tbl:subtable</b> components</p>
+ <rich:dataTable width="700" var="record"
+ value="#{reportBean.expReport.records}">
+ <f:facet name="header">
+ <rich:columnGroup>
+ <rich:column rowspan="2">
+ </rich:column>
+ <rich:column colspan="3">
+ <h:outputText value="Expenses" />
+ </rich:column>
+ <rich:column rowspan="2">
+ <h:outputText value="subtotals" />
+ </rich:column>
+ <rich:column breakRowBefore="true">
+ <h:outputText value="Meals" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="Hotels" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="Transport" />
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ <rich:column colspan="5">
+ <h:outputText value="#{record.city}" />
+ </rich:column>
+
+ <rich:subTable var="expense" value="#{record.items}">
+ <rich:column>
+ <h:outputText value="#{expense.day}"></h:outputText>
+ <f:facet name="footer">
+ <div></div>
+ </f:facet>
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{expense.meals}">
+ <f:convertNumber pattern="$####.00" />
+ </h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="#{record.totalMeals}">
+ <f:convertNumber pattern="$####.00" />
+ </h:outputText>
+ </f:facet>
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{expense.hotels}">
+ <f:convertNumber pattern="$####.00" />
+ </h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="#{record.totalHotels}">
+ <f:convertNumber pattern="$####.00" />
+ </h:outputText>
+ </f:facet>
+ </rich:column>
+
+ <rich:column>
+ <h:outputText value="#{expense.transport}">
+ <f:convertNumber pattern="$####.00" />
+ </h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="#{record.totalTransport}">
+ <f:convertNumber pattern="$####.00" />
+ </h:outputText>
+ </f:facet>
+ </rich:column>
+ <rich:column>
+
+ <f:facet name="footer">
+ <h:outputText value="#{record.total}">
+ <f:convertNumber pattern="$####.00" />
+ </h:outputText>
+ </f:facet>
+ </rich:column>
+
+ </rich:subTable>
+
+ <f:facet name="footer">
+
+ <rich:columnGroup>
+ <rich:column>Totals</rich:column>
+ <rich:column>
+ <h:outputText value="#{reportBean.expReport.totalMeals}">
+ <f:convertNumber pattern="$####.00" />
+ </h:outputText>
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{reportBean.expReport.totalHotels}">
+ <f:convertNumber pattern="$####.00" />
+ </h:outputText>
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{reportBean.expReport.totalTransport}">
+ <f:convertNumber pattern="$####.00" />
+ </h:outputText>
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{reportBean.expReport.grandTotal}">
+ <f:convertNumber pattern="$####.00" />
+ </h:outputText>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+</ui:composition>
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataTable/tableFiltering.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataTable/tableFiltering.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataTable/tableFiltering.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,71 @@
+<!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"
+ xmlns:fn="http://java.sun.com/jsp/jstl/functions"
+ xmlns:r="http://java.sun.com/jsf/composite/rich">
+
+<ui:composition>
+ <h:form id="form">
+ <r:messages/>
+ <rich:dataTable value="#{carsBean.allInventoryItems}" var="car"
+ id="table" rows="30">
+ <f:facet name="noData">
+ Nothing found
+ </f:facet>
+ <rich:column filterValue="#{carsFilteringBean.vendorFilter}" filterExpression="#{fn:containsIgnoreCase(car.vendor, carsFilteringBean.vendorFilter)}">
+ <f:facet name="header">
+ <h:panelGroup>
+ <h:outputText value="Vendor " />
+ <h:selectOneMenu value="#{carsFilteringBean.vendorFilter}">
+ <f:selectItems value="#{carsBean.vendorOptions}" />
+ <a4j:ajax render="table" execute="@this" event="change"/>
+ </h:selectOneMenu>
+ </h:panelGroup>
+ </f:facet>
+ <h:outputText value="#{car.vendor}" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Model" />
+ </f:facet>
+ <h:outputText value="#{car.model}" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Price" />
+ </f:facet>
+ <h:outputText value="#{car.price}" />
+ </rich:column>
+ <rich:column filter="#{carsFilteringBean.mileageFilterImpl}">
+ <f:facet name="header">
+ <h:panelGroup>
+ <h:outputText value="Mileage < " />
+ <h:inputText value="#{carsFilteringBean.mileageFilter}">
+ <f:convertNumber groupingUsed="true"/>
+ <f:validateLongRange maximum="500000"/>
+ <a4j:ajax event="blur" render="form:table" execute="@this" />
+ </h:inputText>
+ </h:panelGroup>
+ </f:facet>
+ <h:outputText value="#{car.mileage}" />
+ </rich:column>
+ <rich:column filterValue="#{carsFilteringBean.vinFilter}"
+ filterExpression="#{fn:containsIgnoreCase(car.vin,carsFilteringBean.vinFilter)}">
+ <f:facet name="header">
+ <h:panelGroup>
+ <h:outputText value="VIN " />
+ <h:inputText value="#{carsFilteringBean.vinFilter}">
+ <a4j:ajax event="blur" render="table" execute="@this" />
+ </h:inputText>
+ </h:panelGroup>
+ </f:facet>
+ <h:outputText value="#{car.vin}" />
+ </rich:column>
+ </rich:dataTable>
+ </h:form>
+</ui:composition>
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataTable/tableSorting.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataTable/tableSorting.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataTable/tableSorting.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -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>
+<p>
+Here is simple example of sorting feature of RichFaces Table component.
+</p>
+<p>Object property which should be used for sorting should be defined in sortBy attribute.</p>
+<p>Currently you could only control sortOrder in your actions, and in near versions we're planning to add special sort controls</p>
+<p>Also you could use # {rich:component('tableId')}.sort('columnId', ['sortOrder']) JS api</p>
+ <h:form>
+ <rich:dataTable value="#{capitalsBean.capitals}" var="cap" id="table">
+ <rich:column>
+ <f:facet name="header">
+ State Flag
+ </f:facet>
+ <h:graphicImage value="#{cap.stateFlag}" />
+ </rich:column>
+ <rich:column sortBy="#{cap.name}" id="name"
+ sortOrder="#{capitalsSortingBean.capitalsOrder}">
+ <f:facet name="header">
+ <a4j:commandLink value="Sort by Capital Name" render="table" action="#{capitalsSortingBean.sortByCapitals}"/>
+ </f:facet>
+ <h:outputText value="#{cap.name}" />
+ </rich:column>
+ <rich:column sortBy="#{cap.state}" id="state"
+ sortOrder="#{capitalsSortingBean.statesOrder}">
+ <f:facet name="header">
+ <a4j:commandLink value="Sort by State Name" render="table" action="#{capitalsSortingBean.sortByStates}"/>
+ </f:facet>
+ <h:outputText value="#{cap.state}" />
+ </rich:column>
+ <rich:column sortBy="#{cap.timeZone}" id="timeZone"
+ comparator="#{capitalsSortingBean.timeZoneComparator}"
+ sortOrder="#{capitalsSortingBean.timeZonesOrder}">
+ <f:facet name="header">
+ <a4j:commandLink value="Sort by Time Zone" render="table" action="#{capitalsSortingBean.sortByTimeZones}"/>
+ </f:facet>
+ <h:outputText value="#{cap.timeZone}" />
+ </rich:column>
+ </rich:dataTable>
+ </h:form>
+</ui:composition>
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataTable/tableStyling.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataTable/tableStyling.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/dataTable/tableStyling.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,72 @@
+<!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"
+ xmlns:fn="http://java.sun.com/jsp/jstl/functions">
+
+<ui:composition>
+ <style>
+.even-row {
+ background-color: #FCFFFE;
+}
+
+.odd-row {
+ background-color: #ECF3FE;
+}
+
+.active-row {
+ background-color: #FFEBDA !important;
+ cursor: pointer;
+}
+</style>
+ <p>This sample shows simple table styling. The table appears in
+ zebra-style and has highlighting of hovered row.</p>
+ <h:form id="form">
+ <rich:dataTable value="#{carsBean.allInventoryItems}" var="car"
+ id="table" rows="20" rowClasses="odd-row, even-row"
+ styleClass="stable">
+ <rich:column accept="#{carsFiteringBean.acceptVendor}">
+ <f:facet name="header">
+ <h:outputText value="Vendor " />
+ </f:facet>
+ <h:outputText value="#{car.vendor}" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Model" />
+ </f:facet>
+ <h:outputText value="#{car.model}" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Price" />
+ </f:facet>
+ <h:outputText value="#{car.price}" />
+ </rich:column>
+ <rich:column filter="#{carsFilteringBean.mileageFilterImpl}">
+ <f:facet name="header">
+ <h:outputText value="Mileage" />
+ </f:facet>
+ <h:outputText value="#{car.mileage}" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="VIN " />
+ </f:facet>
+ <h:outputText value="#{car.vin}" />
+ </rich:column>
+ </rich:dataTable>
+ </h:form>
+ <script>
+ $('.stable tr').mouseover(function(){$(this).addClass('active-row')});
+ $('.stable tr').mouseout(function(){$(this).removeClass('active-row')});
+
+ $('.stable tr:odd').addClass('odd-row');
+ $('.stable tr:even').addClass('even-row');
+
+</script>
+</ui:composition>
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/extendedDataTable/simpleTable.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/extendedDataTable/simpleTable.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/extendedDataTable/simpleTable.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,71 @@
+<!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>
+<p>ExtendedDataTable component provides next set of features:</p>
+<ul>
+ <li> Horizontal/Vertical scrolling </li>
+ <li> Ajax lazy loading on vertical scroll </li>
+ <li> Support "frozen" columns which are not scrolled on using horizontal scroll</li>
+</ul>
+
+ <h:form>
+ <rich:extendedDataTable value="#{carsBean.allInventoryItems}" var="car"
+ id="table" frozenColumns="2" style="height:300px; width:500px;">
+ <f:facet name="header">
+ <h:outputText value="Cars marketplace" />
+ </f:facet>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="vendor" />
+ </f:facet>
+ <h:outputText value="#{car.vendor}" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Model" />
+ </f:facet>
+ <h:outputText value="#{car.model}" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Price" />
+ </f:facet>
+ <h:outputText value="#{car.price}" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Mileage" />
+ </f:facet>
+ <h:outputText value="#{car.mileage}" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="VIN Code" />
+ </f:facet>
+ <h:outputText value="#{car.vin}" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Items stock" />
+ </f:facet>
+ <h:outputText value="#{car.stock}" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Days Live" />
+ </f:facet>
+ <h:outputText value="#{car.daysLive}" />
+ </rich:column>
+ </rich:extendedDataTable>
+ </h:form>
+ <p>In order to turn on Ajax loading - just specify clientRows attribute with number of rows
+ to be loaded on the client</p>
+</ui:composition>
+
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/functions/functions.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/functions/functions.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/functions/functions.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,33 @@
+<!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>
+ RichFaces provides set of functions for more convinient work with DOM tree and
+ to use some server side expressions.
+ </p>
+ <p>
+ Here is the current list:
+ </p>
+ <ul>
+ <li><b>rich:clientId(id)</b> - returns client Id for component by it's short id.</li>
+ <li><b>rich:element(id)</b> - returns DOM element for the passed short id</li>
+ <li><b>rich:component(id)</b> - returns richfaces client component instance to call some API method.</li>
+ <li><b>rich:isUserInRole(role)</b> - returns is the user has specified role.</li>
+ <li><b>rich:findComponent(id)</b> - returns component instance for given short id</li>
+ </ul>
+<p>For example the result of #{rich:element('input')} expression will be - document.getElementById('formId:input').</p>
+<p>And here is one more simple example. There is no need in Bean creation in order to store the value. It's picked from component instance by using rich:findComponent call.</p>
+ <h:form>
+ <h:inputText id="input">
+ <a4j:ajax render="out"/>
+ </h:inputText>
+ <h:outputText value="#{rich:findComponent('input').value}" id="out"/>
+ </h:form>
+ <p>One more sample could be found at dataScroller API page. There are rich:component used for calling JS API of dataScroller.</p>
+ <p>This set goes to be extended continously. Rise jira or forum requests if you have
+ proposals on new useful functions.</p>
+</ui:composition>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/jsFunction/jsFunction.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/jsFunction/jsFunction.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/jsFunction/jsFunction.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,41 @@
+<!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">
+
+ <ui:composition>
+
+ <p><b>a4j:jsFunction</b> component also designed to send Ajax requests, but allows to perform
+ an the requests from a Javascript code directly. The component sends a request using
+ a standard JSF approach, so the JSF form is required. The following example
+ shows how the part of a page is re-rendered when a user hovers over the names.
+ </p>
+
+
+ <table width="400">
+ <tbody>
+ <tr>
+ <td><span onmouseover="updateName('Kate')"
+ onmouseout="updateName('')">Kate</span></td>
+ <td><span onmouseover="updateName('John')"
+ onmouseout="updateName('')">John</span></td>
+ <td><span onmouseover="updateName('Alex')"
+ onmouseout="updateName('')">Alex</span></td>
+ </tr>
+ <tr>
+ <td colspan="3">Name: <b><h:outputText id="showname"
+ value="#{functionBean.text}" /></b></td>
+ </tr>
+ </tbody>
+ </table>
+ <h:form>
+ <a4j:jsFunction name="updateName" render="showname"
+ action="#{functionBean.processHover}">
+ <f:param name="name" />
+ </a4j:jsFunction>
+ </h:form>
+ </ui:composition>
+
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/list/lists.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/list/lists.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/list/lists.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -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:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+<ui:composition>
+ <p><b>rich:list</b> component allows to build one of the HTML lists
+ (UL, OL, DL) dynamically from backend data</p>
+ <p>It accepts the same data types as the other iteration components
+ and renders them according to <b>type</b> attribute.</p>
+ <h:form id="form">
+ <h:outputText value="List Type: " style="font-weight:bold" />
+ <a4j:commandLink value="ordered" render="list,form">
+ <a4j:param name="t" value="ordered" assignTo="#{listBean.listType}" />
+ <f:attribute name="style"
+ value="#{(listBean.listType=='ordered') ? 'color:orange' : ''}" />
+ </a4j:commandLink>
+ <h:outputText value=" | " />
+ <a4j:commandLink value="unordered" render="list,form">
+ <a4j:param name="t" value="unordered" assignTo="#{listBean.listType}" />
+ <f:attribute name="style"
+ value="#{(listBean.listType=='unordered') ? 'color:orange' : ''}" />
+ </a4j:commandLink>
+ <h:outputText value=" | " />
+ <a4j:commandLink value="definitions" render="list,form">
+ <a4j:param name="t" value="definitions"
+ assignTo="#{listBean.listType}" />
+ <f:attribute name="style"
+ value="#{(listBean.listType=='definitions') ? 'color:orange' : ''}" />
+ </a4j:commandLink>
+ </h:form>
+
+ <rich:list value="#{carsBean.inventoryVendorLists}" id="list"
+ var="vendorList" type="#{listBean.listType}">
+ <f:facet name="term">
+ <h:panelGroup layout="block">
+ <h:outputText value="In stock: #{vendorList.count}"
+ style="font-weight:bold" />
+ </h:panelGroup>
+ </f:facet>
+ <h:outputText value="#{vendorList.vendor}" />
+ </rich:list>
+</ui:composition>
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/log/log.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/log/log.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/log/log.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,24 @@
+<!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">
+
+ <ui:composition>
+ <p>
+ Log component allows you to inspect client side activities
+ during an Ajax request. It shows reuqest data, response data, DOM
+ tree changes on update and other useful debug information.
+ </p>
+ <h:form>
+ <h:inputText value="#{userBean.name}" />
+ <a4j:commandButton value="Submit" render="out"/>
+ <br/>
+ <a4j:outputPanel id="out">
+ <h:outputText value="Hello #{userBean.name}!" rendered="#{not empty userBean.name}"/>
+ </a4j:outputPanel>
+ </h:form>
+ <a4j:log/>
+ </ui:composition>
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/mediaOutput/flashUsage.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/mediaOutput/flashUsage.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/mediaOutput/flashUsage.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,36 @@
+<!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">
+
+ <ui:composition>
+ <script src="#{facesContext.externalContext.requestContextPath}/script/swfobject.js" type="text/javascript"/>
+ <p>SWF Movie:</p>
+ <a4j:outputPanel id="flashPanelDynamic">
+
+ <a4j:mediaOutput element="a" id="swfLink" style="display: none;" cacheable="false" session="true"
+ createContent="#{mediaBean.paintFlash}" value="#{mediaData}" />
+
+ <a4j:outputPanel layout="block" id="myFlashContent" style="width: 200px; height: 200px">
+ <a href="http://www.adobe.com/go/getflashplayer">
+ <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
+ </a>
+ </a4j:outputPanel>
+
+ <script type="text/javascript">
+ var flashvars = {};
+ var params = {};
+ var attributes = {};
+ swfobject.embedSWF(document.getElementById('page:swfLink').href, document.getElementById('myFlashContent'), "200", "200", "9.0.0", false, flashvars, params, attributes);
+ </script>
+
+ </a4j:outputPanel>
+
+ <br />
+ <br />
+
+ </ui:composition>
+
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/mediaOutput/imgUsage.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/mediaOutput/imgUsage.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/mediaOutput/imgUsage.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,39 @@
+<!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">
+
+ <ui:composition>
+ <p>a4j:mediaOutput allows to generate images, video, sounds and other binary
+ resources defined by a user on-the-fly.
+ </p>
+ <p><b>createContent</b> attribute references to the method that will be used
+ for content creating. The method accepts two parameters. The first parameter
+ has an OutputStream type. It is a reference to the steam that should be used for output.
+ The second parameter is a reference to a 'value' attribute of the component.
+ </p>
+ <p>
+ <b>value</b> attribute references to data that can be used as input data for a content
+ creator method. The data should be serializable because it is encoded to the URL
+ of the resource.
+ </p>
+ <p>
+ <b>mimeType</b> attribute defines the type of output content. It is used to define
+ the corresponded type in the header of an HTTP response.
+ </p>
+ <p>
+ <b>cacheable</b> attribute is a flag that defines the caching strategy. If 'cacheable'
+ is set to false, the response will not be cached. If it is set to true, it will be cached
+ and the serialized value of 'value' attribute plays the role of a cache key.
+ </p>
+
+ <p>Dynamically generated JPEG file:</p>
+
+ <a4j:mediaOutput element="img" cacheable="false" session="true"
+ createContent="#{mediaBean.paint}" value="#{mediaData}" mimeType="image/jpeg" />
+ <br/><br/>
+ </ui:composition>
+
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/outputPanel/compositemessages.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/outputPanel/compositemessages.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/outputPanel/compositemessages.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,41 @@
+<!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://java.sun.com/jsf/composite/rich">
+
+ <ui:composition>
+ <p>
+ Next sample shows how you could simply create composite component from
+ standard h:messages and a4j:outputPanel in order to get them updated
+ for any ajax request without render definition.
+ </p>
+ <h:form>
+ <rich:panel id="psnel">
+ <f:facet name="header">
+ <h:outputText value="User Details Panel" />
+ </f:facet>
+ <h:panelGrid columns="2">
+ <h:panelGrid columns="2">
+ <h:outputText value="User name:" />
+ <h:inputText value="#{userBean.name}" required="true" label="Name">
+ <f:validateLength minimum="3" maximum="12"/>
+ </h:inputText>
+ <h:outputText value="Adress:" />
+ <h:inputTextarea value="#{userBean.address}" label="Adress" required="true">
+ <f:validateLength maximum="100"/>
+ </h:inputTextarea>
+ </h:panelGrid>
+ <rich:messages/>
+ </h:panelGrid>
+ <a4j:commandButton value="Submit" type="button" action="#{userBean.store}" execute="@form"/>
+ <a4j:outputPanel ajaxRendered="true">
+ <h:outputText value="#{userBean.recordStatus}" id="out" rendered="#{facesContext.maximumSeverity == null}"/>
+ </a4j:outputPanel>
+ </rich:panel>
+ </h:form>
+ </ui:composition>
+
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/outputPanel/simple.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/outputPanel/simple.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/outputPanel/simple.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,85 @@
+<!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:rich="http://java.sun.com/jsf/composite/rich"
+ xmlns:a4j="http://richfaces.org/a4j">
+
+<ui:composition>
+ <style type="text/css">
+ .col {
+ width:50%;
+ padding:10px;
+ padding: 0px 30px 0px 0px;
+ vertical-align: top;
+ }
+ </style>
+ <p>
+ <b>a4j:outputPanel</b> component designed to provide next features:
+ <ul>
+ <li><b>Automaticall updates</b> of the child content on Ajax requests</li>
+ <li>Wrapper component for <b>conditional rendering of nested elements</b> via Ajax</li>
+ <li><b>Configurable layouts</b>:
+ <ul>
+ <li>inline - rendered as span element</li>
+ <li>block - rendered as div element</li>
+ <li>none - special layout for nested components confitional rendering cases</li>
+ </ul>
+ </li>
+ <li></li>
+ </ul>
+ </p>
+ <h:panelGrid columns="2" width="100%" columnClasses="col">
+
+ <f:verbatim>
+ This code does not work as expected. The expected echo text does not appear
+ below even the condition for <code>'rendered'</code> returns <code>true</code>.
+ Also, the error message does not appear when the length of the text reaches the limit.
+ </f:verbatim>
+ <f:verbatim>
+ This code works properly. The <code>h:message</code> is marked for update during
+ each Ajaxrequest/response. The place for bottom label is reserved with
+ <code>outputPanel</code> while the component is not rendered.
+ </f:verbatim>
+
+ <a4j:outputPanel layout="block">
+
+
+ <a4j:outputPanel layout="block">
+ <h:form>
+ <h:message for="text1" style="color:red" />
+
+ <h:outputText style="font-weight: bold;" value="Enter Text: "/>
+ <h:inputText id="text1" label="text1" value="#{opBean1.text}">
+ <f:validateLength maximum="10"/>
+ <a4j:ajax event="keyup" execute="@this" render="out1" onerror="function(){return false}"/>
+ </h:inputText>
+
+ <h:outputText id="out1" rendered="#{not empty opBean1.text}" value="Approved Text: #{opBean1.text}" />
+ </h:form>
+ </a4j:outputPanel>
+
+ </a4j:outputPanel>
+
+ <a4j:outputPanel layout="block">
+ <h:form>
+ <a4j:outputPanel layout="block" ajaxRendered="true">
+ <h:message for="text2" style="color:red" />
+ </a4j:outputPanel>
+
+ <h:outputText style="font-weight: bold;" value="Enter Text: "/>
+ <h:inputText id="text2" label="text2" value="#{opBean2.text}">
+ <f:validateLength maximum="10"/>
+ <a4j:ajax event="keyup" execute="@this" render="out2" />
+ </h:inputText>
+
+ <a4j:outputPanel id="out2" layout="block">
+ <h:outputText rendered="#{not empty opBean2.text}" value="Approved Text: #{opBean2.text}" />
+ </a4j:outputPanel>
+ </h:form>
+ </a4j:outputPanel>
+ </h:panelGrid>
+</ui:composition>
+
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/panel/lookCustomization.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/panel/lookCustomization.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/panel/lookCustomization.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,95 @@
+<!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>
+ <style>
+.rf-panel-header {
+ color: #0054BD;
+}
+
+.panel {
+ vertical-align: top;
+}
+
+.top {
+ width: 200px;
+ height: 100px;
+}
+
+.head2 {
+ background-image: url();
+ background-color: #4C9600;
+ height: 18px;
+ text-align: center;
+ vertical-align: middle;
+ color: #CFF;
+ padding: 4px 0;
+}
+
+.body3 {
+ height: 100px;
+ overflow: auto;
+}
+</style>
+ <h:panelGrid columnClasses="panel" border="0" columns="2">
+ <rich:panel>
+ <f:facet name="header">
+ Panel #1. Changing Style Synchronously
+ </f:facet>
+ Each component in the RichFaces has a pre-defined set of classes you can manipulate with. If defined, those
+ classes overwrite the ones come from the skin.
+ </rich:panel>
+
+ <rich:panel>
+ <f:facet name="header">
+ Panel #2. Changing Style Synchronously
+ </f:facet>
+ In this example, we define header color using the .rf-panel-header class and all panels located on the same page
+ inherit this color
+ </rich:panel>
+
+ </h:panelGrid>
+
+ <h:panelGrid columnClasses="panel" border="0" columns="3">
+ <rich:panel
+ onmouseover="document.getElementById(this.id+'_header').style.background='#60BA01';document.getElementById(this.id+'_body').style.background='#F4FFF8'"
+ onmouseout="document.getElementById(this.id+'_header').style.background='#4C9600';document.getElementById(this.id+'_body').style.background='#E4FFC8'"
+ style="width:200px;" headerClass="head2" bodyClass="body3">
+ <f:facet name="header">
+ Panel header
+ </f:facet>
+ Base on the previous layout, but some javascript behaviour added.
+ </rich:panel>
+
+ <rich:panel style="width:200px;" bodyClass="body3">
+ <f:facet name="header">
+ Scrolling Text Panel
+ </f:facet>
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ </rich:panel>
+
+ <rich:panel styleClass="top">
+ This is a panel without the header
+ </rich:panel>
+
+ </h:panelGrid>
+
+</ui:composition>
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/panel/simple.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/panel/simple.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/panel/simple.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,54 @@
+<!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>
+ <p>The panel is a rectangle area on a page that may contain any
+ content including other panels. Panel has a header (optionally) and a
+ body. The default look-n-feel is based on the current skin. Look-n-feel
+ of any parts of the panel, including color scheme, borders and paddings
+ can be customizable using with pre-defined number of CSS classes.</p>
+
+ <rich:panel header="Panel with default Look-n-feel">
+ <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:panel>
+ <p><b>Panel without header:</b></p>
+ <rich:panel>
+ <p><b>JSF 2 and RichFaces 4:</b></p>
+ <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:panel>
+</ui:composition>
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/param/clientParam.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/param/clientParam.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/param/clientParam.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,34 @@
+<!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://java.sun.com/jsf/composite/rich">
+
+<ui:composition>
+ <p>It is possible to use javascript variable of custom function for the 'value' attribute.
+ In this case the 'noEscape' attribute should be set to true. When noEscape="true", the
+ 'value' can contain any javascript expression or javascript function invocation and the
+ result of them will be send to the server as a value of a4j:actionparam. The following
+ example demonstrates how to assign the backing bean with browser screen size values.</p>
+ <h:form>
+ <a4j:commandButton value="Show Screen Size" render="infoPanel">
+ <a4j:param name="w" value="screen.width"
+ assignTo="#{paramBean.screenWidth}" noEscape="true" />
+ <a4j:param name="h" value="screen.height"
+ assignTo="#{paramBean.screenHeight}" noEscape="true" />
+ </a4j:commandButton>
+ <br />
+
+ <h:panelGrid columns="2" id="infoPanel">
+ <h:outputText value="Width:" />
+ <h:outputText value="#{paramBean.screenWidth}" />
+ <h:outputText value="Height:" />
+ <h:outputText value="#{paramBean.screenHeight}" />
+ </h:panelGrid>
+
+ </h:form>
+</ui:composition>
+
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/param/param.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/param/param.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/param/param.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -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:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://java.sun.com/jsf/composite/rich">
+
+<ui:composition>
+<p>
+a4j:actionparam is a component which extends regular f:param with the possibility to
+assign the value to the property of the manager bean directly using the assignTo attribute.
+Using this feature you can update model values without invoking even a single line of java code on the
+ server side.</p>
+ <h:form>
+ <rich:panel>
+ <h:panelGrid columns="2">
+ <a4j:commandButton value="Set Name to Alex" render="rep">
+ <a4j:param name="username" value="Alex" assignTo="#{userBean.name}" />
+ </a4j:commandButton>
+
+ <a4j:commandButton value="Set Name to John" render="rep">
+ <a4j:param name="username" value="John"
+ assignTo="#{userBean.name}" />
+ </a4j:commandButton>
+ </h:panelGrid>
+ </rich:panel>
+<br/>
+ <rich:panel>
+ <h:outputText id="rep" value="Selected Name:#{userBean.name}" />
+ </rich:panel>
+ </h:form>
+</ui:composition>
+
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/param/skinChange.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/param/skinChange.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/param/skinChange.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -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:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://java.sun.com/jsf/composite/rich">
+
+<ui:composition>
+ <p>You can use a4j:param not only with ajax components, but with non-ajax command
+ components and for GET navigation components also. In the following example, the used skin of the demo is changed when
+ the whole page is refreshed with the regular h:link. </p>
+ <h:form>
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="Change Demo Appplication Skin To: " />
+ </f:facet>
+ <h:panelGrid columns="2">
+ <h:link value="DeepMarine" includeViewParams="true">
+ <a4j:param name="skin" value="deepMarine"
+ assignTo="#{skinBean.skin}" />
+ </h:link>
+
+ <h:link value="BlueSky" includeViewParams="true">
+ <a4j:param name="skin" value="blueSky" assignTo="#{skinBean.skin}" />
+ </h:link>
+ </h:panelGrid>
+
+ </rich:panel>
+ </h:form>
+</ui:composition>
+
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/poll/poll.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/poll/poll.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/poll/poll.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,54 @@
+<!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://java.sun.com/jsf/composite/rich">
+
+<ui:composition>
+ <p>a4j:poll is one of the way how you can organize the periodical
+ polling of server data and updating the page. a4j:poll is a standard
+ RichFaces Ajax component. Thus, you can use the same approach as for
+ a4j:commandButton for example. I.e. you can use action attribute to
+ invoke the action method and reRender attribute to update area(s) on
+ the client when Ajax Response returns back. RichFaces uses the standard
+ form based request, so the form around the a4j:poll component is
+ required.</p>
+ <p>The following example shows how the date and time is updated on
+ the page based on the data taken from the server. To turn off polling,
+ press "Stop Polling" button.</p>
+
+ <h:form>
+ <a4j:poll id="poll" interval="1500" enabled="#{pollBean.pollEnabled}"
+ render="poll,grid" />
+ </h:form>
+
+ <h:form>
+ <h:panelGrid columns="2" width="80%" id="grid">
+ <h:panelGrid columns="1">
+
+ <h:outputText value="Polling Inactive"
+ rendered="#{not pollBean.pollEnabled}"></h:outputText>
+
+ <h:outputText value="Polling Active"
+ rendered="#{pollBean.pollEnabled}"></h:outputText>
+
+ <a4j:commandButton style="width:120px" id="control"
+ value="#{pollBean.pollEnabled?'Stop':'Start'} Polling"
+ render="poll, grid">
+ <a4j:param name="polling" value="#{!pollBean.pollEnabled}"
+ assignTo="#{pollBean.pollEnabled}" />
+ </a4j:commandButton>
+
+ </h:panelGrid>
+
+ <h:outputText id="serverDate" style="font-size:16px"
+ value="Server Date: #{pollBean.date}" />
+ </h:panelGrid>
+ </h:form>
+ <rich:panel>
+ <b>NOTE:</b>polling is automatically disabled in this demo after one minute of working.
+ </rich:panel>
+</ui:composition>
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/push/push.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/push/push.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/push/push.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,58 @@
+<!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">
+
+<ui:composition>
+ <p>The <b><a4j:push></b> periodically perform AJAX request to
+ server, to simulate 'push' data.</p>
+ <p><b><a4j:push></b> makes request to
+ minimal code only (not to JSF tree) in order to check the presence of
+ messages in the queue. If the message exists the complete request will
+ be performed. The component doesn't poll registered beans but
+ registers EventListener which receives messages about events.</p>
+ <p>Attribute '<b>interval</b>' is used as for poll component. It
+ specifies the interval in ms. for call push request. Simple example of
+ usage:</p>
+ <h:form>
+ <h:dataTable value="#{choicesBean.choices}" var="choice" id="choiceVotes">
+ <f:facet name="header">
+ <h:outputText value="Voting for favorite fruit" />
+ </f:facet>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Choice name" />
+ </f:facet>
+ <h:outputText value="#{choice.label}" id="choiceLabel" />
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Current Votes" />
+ </f:facet>
+ <h:outputText value="#{choice.votesCount}" id="choiceVotes" />
+ </h:column>
+ </h:dataTable>
+
+ <a4j:jsFunction name="startPush" action="#{choicesBean.start}" execute="@this" render="push, stop, start"/>
+ <a4j:jsFunction name="stopPush" action="#{choicesBean.stop}" execute="@this" render="push, stop, start"/>
+
+ <h:commandButton onclick="startPush()" value="Start" id="start" disabled="#{choicesBean.enabled}" type="button"/>
+
+ <h:commandButton onclick="stopPush()" type="button" value="Stop" id="stop" disabled="#{!choicesBean.enabled}"/>
+
+ <a4j:outputPanel layout="block" id="tempResults">
+ <h:outputText
+ value="Latest update votes was: #{choicesBean.updateInfo} at #{choicesBean.timeStamp}"
+ rendered="#{choicesBean.enabled}" />
+ </a4j:outputPanel>
+
+ <a4j:push enabled="#{choicesBean.enabled}" interval="1000"
+ eventProducer="#{choicesBean.addListener}" id="push" action="#{choicesBean.processUpdates}">
+ <a4j:ajax render="choiceVotes push tempResults" />
+ </a4j:push>
+ </h:form>
+</ui:composition>
+
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/queue/queue.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/queue/queue.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/queue/queue.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,92 @@
+<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"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:r="http://java.sun.com/jsf/composite/rich">
+<p>JSF 2 provides queue mechanism out-of the box already. And RichFaces queue just provides
+some additional customizations to improve the queue usability and allow to tune your
+performance while using Ajax as much as possible.</p>
+<p>The only big difference which the developers who used queue in 3.3.x should remember:
+as JSF 2 already provides single queue and not allows to have more than one queue instance(currently)
+you can't really fire concurrent requests anymore. So the queue in RF now not actually defines
+logical queue but just a component for defining queueing options.
+</p>
+<p>Here you could explore additional optimization parameters of the queue and learn how they
+influence Ajax requests. This example is a good start to learn about Ajax requests
+flood protection.</p>
+
+<p>Pay attention to next point in the example:</p>
+<ul>
+<li>Setting request delay to greater value reduces the greatly requests count on fast typing. (More similar requests are combined in the result)</li>
+</ul>
+Also pay your attention to the queue definition. Such definition (inside some form without a name) means that the queue options becomes global for the form.
+ <r:panel>
+ <h:form id="form">
+ <a4j:queue requestDelay="#{queueBean.requestDelay}"/>
+ <h:panelGrid columns="1" width="100%">
+ <h:panelGrid columns="2">
+ <h:outputText value="Type here:" />
+ <h:inputText id="myinput" value="#{queueBean.text}"
+ onkeyup="addEvent();" disabled="#{not (facesContext.maximumSeverity==null)}">
+ <a4j:ajax onbegin="addRequest();" event="keyup" render="outtext"
+ oncomplete="printCounts()" onbeforedomupdate="addUpdate()" />
+ </h:inputText>
+ <h:outputText value="Repeated text:" />
+ <h:outputText value="#{queueBean.text}" id="outtext"
+ style="font-weight:bold;" />
+ <h:outputText value="Events count:" />
+ <h:outputText value="0" id="events" />
+ <h:outputText value="Requests count:" />
+ <h:outputText value="0" id="requests" />
+ <h:outputText value="DOM updates count:" />
+ <h:outputText value="0" id="updates" />
+ </h:panelGrid>
+ <r:message for="form:delay" style="color:red;" />
+ <h:panelGrid columns="2">
+ <h:outputText value="Request delay:" />
+ <h:inputText value="#{queueBean.requestDelay}" id="delay"
+ converterMessage="Delay field should be a number (Demo input disabled till this resolved)">
+ <f:convertNumber integerOnly="true"/>
+ </h:inputText>
+ <f:facet name="footer">
+ <h:commandButton value="Apply" action="#{queueBean.resetText}" />
+ </f:facet>
+ </h:panelGrid>
+ </h:panelGrid>
+ </h:form>
+ </r:panel>
+ <script type="text/javascript">
+ var events = 0;
+ var updates = 0;
+ var outEvents = #{rich:element('events')};
+ var outUpdates = #{rich:element('updates')};
+ var outRequests = #{rich:element('requests')};
+
+ var requests=0;
+ function addEvent(){
+ events++;
+ }
+ function addUpdate(){
+ updates++;
+ }
+ function addRequest(){
+ requests++;
+ }
+
+ function printCounts(){
+ outEvents.innerHTML=events;
+ outUpdates.innerHTML=updates;
+ outRequests.innerHTML=requests;
+ }
+ </script>
+ <p>Queue could be defined as</p>
+ <ul><li><b>Default for view.</b> In this case - the parameters will be used for all
+ the Ajax requests in view(if not redefined). In order to define such queue - just place
+ <b>a4j:queu</b> outside of any forms without defining <b>name</b></li>
+ <li><b>Default for form.</b> Similar to view-scoped but should be defiend in some form without defining <b>name</b></li>
+ <li><b>Referenced from ajax behaviors/components.</b> Queue should be defined with name and referenced using attachQueue tag(see corresponding sample).</li></ul>
+</ui:composition>
+
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/region/region.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/region/region.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/region/region.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,87 @@
+<!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://java.sun.com/jsf/composite/rich">
+
+<ui:composition>
+ <p><b>a4j:region</b> component designed for marking zones which
+ should be processed during Ajax requests without using execute
+ definitions at Ajax behaviors/components. This allow to decouple the
+ processing definitions from components id's and use declarative
+ wrapping by this tag instead.</p>
+ <p>In <b>RichFaces 3.3</b> all the view was processed if no regions
+ specified as <b>ViewRoot itself was region by default</b>. And in <b>RichFaces
+ 4.x</b> - all the controls has <b>execute="@this" by default</b> according
+ to JSF 2 specifications. But if the <b>controls wrapped with
+ a4j:region</b> component and has no execute definitions - them uses<b>
+ execute="@region"</b></p>
+ <p>Look to the simple example below. There are two similar user
+ info panels. But the ajax behaviors inside the first panel uses execute
+ declarations and pointed to panelGrid id. And the second panel inputs
+ just wrapped to region without any additional execute definitions.</p>
+ <h:form>
+ <h:panelGrid columns="2">
+ <h:panelGrid>
+ <f:facet name="header">
+ User Info Panel explicitly execute'd by Id
+ </f:facet>
+ <h:panelGrid columns="2" id="userInfoPanel1">
+ <h:outputText value="User Name: " />
+ <h:inputText value="#{regionBean.user1.name}">
+ <a4j:ajax render="echopanel1" event="keyup"
+ execute="userInfoPanel1" />
+ </h:inputText>
+ <h:outputText value="User email: " />
+ <h:inputText value="#{regionBean.user1.email}">
+ <a4j:ajax render="echopanel1" event="keyup"
+ execute="userInfoPanel1" />
+ </h:inputText>
+ </h:panelGrid>
+ </h:panelGrid>
+ <h:panelGrid columns="2" id="echopanel1">
+ <f:facet name="header">
+ Echo Panel
+ </f:facet>
+ <h:outputText value="Entered name:" />
+ <h:outputText value="#{regionBean.user1.name}" />
+ <h:outputText value="Entered email:" />
+ <h:outputText value="#{regionBean.user1.email}" />
+ </h:panelGrid>
+ </h:panelGrid>
+ </h:form>
+ <h:form>
+ <h:panelGrid columns="2">
+ <h:panelGrid>
+ <f:facet name="header">
+ User Info Panel with Region
+ </f:facet>
+ <a4j:region>
+ <h:panelGrid columns="2">
+ <h:outputText value="User Name: " />
+ <h:inputText value="#{regionBean.user2.name}">
+ <a4j:ajax render="echopanel2" event="keyup" />
+ </h:inputText>
+ <h:outputText value="User email: " />
+ <h:inputText value="#{regionBean.user2.email}">
+ <a4j:ajax render="echopanel2" event="keyup" />
+ </h:inputText>
+ </h:panelGrid>
+ </a4j:region>
+ </h:panelGrid>
+ <h:panelGrid columns="2" id="echopanel2">
+ <f:facet name="header">
+ Echo Panel
+ </f:facet>
+ <h:outputText value="Entered name:" />
+ <h:outputText value="#{regionBean.user2.name}" />
+ <h:outputText value="Entered email:" />
+ <h:outputText value="#{regionBean.user2.email}" />
+ </h:panelGrid>
+ </h:panelGrid>
+ </h:form>
+
+</ui:composition>
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/repeat/simpleGrid.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/repeat/simpleGrid.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/repeat/simpleGrid.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,39 @@
+<!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:r="http://java.sun.com/jsf/composite/rich"
+ xmlns:rich="http://richfaces.org/rich">
+
+<ui:composition>
+ <p>a4j:repeat is a base iteration component of RichFaces. It allows
+ to create any markups based on iterative data. This sample shows simple
+ grid from capitals list.</p>
+ <h:form>
+ <a4j:outputPanel id="panel" layout="block">
+ <a4j:repeat value="#{capitalsBean.capitals}" var="cap" rows="20"
+ id="repeat">
+ <r:panel style="float:left; width:200px; padding:5px;">
+ <f:facet name="header">
+ <h:panelGroup>
+ <h:graphicImage value="#{cap.stateFlag}" />
+ <h:outputText value="#{cap.state}" style="font-weight:bold" />
+ </h:panelGroup>
+ </f:facet>
+ <h:panelGrid columns="2">
+ <h:outputText value="State Capital" style="font-weight:bold" />
+ <h:outputText value="#{cap.name}" />
+ <h:outputText value="State TimeZone" style="font-weight:bold" />
+ <h:outputText value="#{cap.timeZone}" />
+ </h:panelGrid>
+ </r:panel>
+ </a4j:repeat>
+ </a4j:outputPanel>
+ <a4j:outputPanel layout="block">
+ <rich:dataScroller for="repeat" render="panel" />
+ </a4j:outputPanel>
+ </h:form>
+</ui:composition>
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/skin.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/skin.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/skin.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -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 template="/templates/main.xhtml">
+ <ui:define name="body">
+ <h:form>
+ <p> Sample of skinning</p>
+ Type in input name of skin. For example laguna, wine, ruby etc.. and press Change skin button.
+ <h:inputText value="#{skinBean.skin}" />
+ <h:commandButton value="Change skin"/>
+ <h:outputText styleClass="rich-fieldset" value="Panel Background color sample" />
+ <h:outputText styleClass="rich-link" value="General Link color sample" />
+ </h:form>
+ </ui:define>
+ </ui:composition>
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/standardSkinning/standardSkinning.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/standardSkinning/standardSkinning.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/standardSkinning/standardSkinning.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,94 @@
+<!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://java.sun.com/jsf/composite/rich">
+
+<ui:composition>
+ <p>This section overviews main principles of standard components
+ skinning with the Rich Faces framework.</p>
+ <p>This feature provides styling for standard HTML form elements in
+ order to be highly compilant with RichFaces common look'n'feel. There
+ should be two ways of applying skins to elements:</p>
+ <ul>
+ <li>Skinning style classes are applied to elements by element
+ name and type attribute (where applicable). No additional steps are
+ required from an application developer. Application initialization
+ parameter serves for enabling/disabling the feature.</li>
+ <li>Several style classes are provided for different types of
+ elements. That style classes have predefined names. Application
+ developer should manually assign classes to controls that need
+ skinning or assign a class to an element that contains controls.</li>
+ </ul>
+ <p>Standard controls skinning feature provides 2 levels of
+ skinning:</p>
+ <ol>
+ <li><b>Standard</b> - customization of only basic style
+ properties.</li>
+ <li><b>Extended</b> - extends basic level introducing
+ customizations of a broader number of style properties</li>
+ </ol>
+ <p>Skinning level is calculated automatically at server side
+ depending on user agent info.</p>
+ <rich:panel><b>NOTE:</b>Extended skinning is not applied to browsers with
+ rich visual styling for controls (e.g. Opera and Safari). Also advanced
+ level of skinning requires support of CSS 2 attribute selectors either
+ as implicit type attributes for button/textarea elements (e.g. IE7 in
+ standards compilant mode) or CSS 3 draft namespace selectors (e.g.
+ Mozilla Firefox).</rich:panel>
+
+ <p>Here is the skinned form example. Note there is no styling in
+ sources of that form</p>
+
+ <rich:panel id="panel" width="300" height="230">
+ <f:facet name="header">
+ Standard components skinning
+ </f:facet>
+ <i> All the controls below is just standard JSF components skinned
+ with Rich Faces: </i>
+ <hr />
+ <h:form>
+ <h:panelGrid columns="2">
+ <h:outputText value="Enter Name:" />
+ <h:inputText id="input" />
+ <h:outputText value="Enter you interests:" />
+ <h:inputTextarea />
+ <h:outputText value="Choose your favourite color" />
+ <h:selectOneMenu>
+ <f:selectItem itemLabel="Red" itemValue="0" />
+ <f:selectItem itemLabel="Black" itemValue="1" />
+ <f:selectItem itemLabel="Green" itemValue="2" />
+ <f:selectItem itemLabel="White" itemValue="3" />
+ </h:selectOneMenu>
+ </h:panelGrid>
+ <hr />
+ <h:commandButton value="Action Button" />
+ <h:commandLink value="Action Link" />
+ </h:form>
+ </rich:panel>
+
+ <p>There three ways of applying skinning to application:</p>
+ <ul>
+ <li>By default <b>org.richfaces.ENABLE_CONTROL_SKINNING</b> context
+ param is set to <b>true</b> and it means that all standard elements
+ on the page will be skinned. (CSS style classes for elements based on
+ their names and type attribute values will be applied). You may
+ redefine it to <b>disable</b> in order to turn it off.</li>
+ <li>By default <b>org.richfaces.ENABLE_CONTROL_SKINNING_CLASSES</b>
+ context param is set to <b>false</b> and it means that basic elements
+ nested to element having <i>rich-container</i> class will be skinned.
+ It could be also turned off using <b>disable</b> value.</li>
+ <li>RichFaces also provides predefined classes which can be
+ applied by an end developer to elements need to be skinned separately.
+ This classes added to the page also according to <b>org.richfaces.ENABLE_CONTROL_SKINNING_CLASSES</b>
+ context-param.</li>
+ </ul>
+
+ <p>To get a better idea of standard component skinning we recommend
+ to explore CSS files located in
+ ui/core/src/main/resources/org/richfaces/ folder of RichFaces svn.</p>
+</ui:composition>
+
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/status/referencedusage.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/status/referencedusage.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/status/referencedusage.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,43 @@
+<!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://java.sun.com/jsf/composite/rich">
+<ui:composition>
+ <p>Example of status which referenced from the components</p>
+ <p>There are two inputs with Ajax behaviors attached. And there are two statuses which
+ are referenced from that behaviors. <b>status</b> attribute at Ajax tags defined with
+ corresponding statuses <b>name</b> attributes values.</p>
+ <h:form>
+ <h:panelGrid columns="3" width="300px;">
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="User Details Panel" />
+ </f:facet>
+ <h:panelGrid columns="3">
+ <h:outputText value="User name:" />
+ <h:inputText value="#{userBean.name}">
+ <a4j:ajax status="nameStatus" event="keyup" />
+ </h:inputText>
+ <a4j:status name="nameStatus">
+ <f:facet name="start">
+ <h:graphicImage value="/images/ai.gif" style="width:16px; height:16px;"/>
+ </f:facet>
+ </a4j:status>
+ <h:outputText value="Adress:" />
+ <h:inputText value="#{userBean.address}">
+ <a4j:ajax status="adressStatus" event="keyup" />
+ </h:inputText>
+ <a4j:status name="adressStatus">
+ <f:facet name="start">
+ <h:graphicImage value="/images/ai.gif" style="width:16px; height:16px;"/>
+ </f:facet>
+ </a4j:status>
+ </h:panelGrid>
+ </rich:panel>
+ </h:panelGrid>
+ </h:form>
+</ui:composition>
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/status/simple.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/status/simple.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/status/simple.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,39 @@
+<!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:rich="http://java.sun.com/jsf/composite/rich"
+ xmlns:a4j="http://richfaces.org/a4j">
+
+<ui:composition>
+ <p>Example of form scoped status. It's defined within a form and
+ handles all Ajax requests within this form</p>
+ <h:form>
+ <rich:panel id="psnel">
+ <f:facet name="header">
+ <h:outputText value="Panel with status" />
+ </f:facet>
+ <h:panelGrid columns="2">
+ <h:panelGrid columns="2">
+ <a4j:ajax event="keyup">
+ <h:outputText value="User name:" />
+ <h:inputText value="#{userBean.name}" />
+ <h:outputText value="Adress:" />
+ <h:inputText value="#{userBean.address}" />
+ </a4j:ajax>
+ </h:panelGrid>
+ <a4j:status>
+ <f:facet name="start">
+ <h:graphicImage value="/images/ai.gif" />
+ </f:facet>
+ </a4j:status>
+ </h:panelGrid>
+ <a4j:commandButton value="Submit" type="button"
+ action="#{userBean.store}" render="out" execute="@form" />
+ <h:outputText value="#{userBean.recordStatus}" id="out" />
+ </rich:panel>
+ </h:form>
+</ui:composition>
+
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/status/viewusage.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/status/viewusage.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/status/viewusage.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,61 @@
+<!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:rich="http://java.sun.com/jsf/composite/rich"
+ xmlns:a4j="http://richfaces.org/a4j">
+
+ <ui:composition>
+ <p>a4j:status is an indicator of an Ajax request. It has two states - start and stop. The start
+ state indicates that an Ajax request is in progress. When Ajax Response comes back,
+ the component switches to the stop stage.
+ </p>
+ <p> Status could be defined:
+ <ul>
+ <li>Default for View</li>
+ <li>Default for form</li>
+ <li>Referenced explicity from the component which sends request</li>
+ </ul>
+ </p>
+ <p>
+ Example of View scoped status. It should be defined outside of any form and will
+ handle all the Ajax requests within the view.
+ </p>
+ <h:panelGrid columns="3">
+ <h:form>
+ <rich:panel id="psnel">
+ <f:facet name="header">
+ <h:outputText value="User Details Panel" />
+ </f:facet>
+ <h:panelGrid columns="2">
+ <a4j:ajax event="keyup">
+ <h:outputText value="User name:" />
+ <h:inputText value="#{userBean.name}"/>
+ <h:outputText value="Adress:" />
+ <h:inputText value="#{userBean.address}"/>
+ </a4j:ajax>
+ </h:panelGrid>
+ <h:commandButton value="Submit" type="button" action="#{userBean.store}">
+ <a4j:ajax render="out"/>
+ </h:commandButton>
+ <h:outputText value="#{userBean.recordStatus}" id="out"/>
+ </rich:panel>
+ </h:form>
+ <h:form>
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="Simple search panel" />
+ </f:facet>
+ <h:inputText value="Search..."/>
+ <a4j:commandButton value="Submit" type="button"/>
+ </rich:panel>
+ </h:form>
+ <a4j:status>
+ <f:facet name="start">
+ <h:graphicImage value="/images/ai.gif"/>
+ </f:facet>
+ </a4j:status>
+ </h:panelGrid>
+ </ui:composition>
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/subTableToggleControl/subTableToggleControl.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/subTableToggleControl/subTableToggleControl.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/richfaces/subTableToggleControl/subTableToggleControl.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,76 @@
+<!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>
+<p>This sample shows simple master-detail table implemented using<b> rich:dataTable</b> and<b> rich:subtable</b> components</p>
+<p>There is one feature which is completely new for 4.x - subtables now could be collapsed/expanded by using
+new component <b>rich:tableToggleControl</b></p>
+<p>Switching customization:</p>
+<ul>
+<li>subTable's could be collapsed/expanded in different modes defined via subTable expandMode attribute
+- "<i>client</i>", "<i>ajax</i>" and "<i>server</i>"</li>
+<li>The developer could get control on current states of subTables using its <b>expanded</b> attribute.</li>
+</ul>
+ <h:form>
+ <rich:dataTable value="#{carsBean.inventoryVendorLists}" var="list">
+ <f:facet name="header">
+ <rich:columnGroup>
+ <rich:column colspan="6">
+ <h:outputText value="Cars marketplace" />
+ </rich:column>
+ <rich:column breakRowBefore="true">
+ <h:outputText value="Model" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="Price" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="Mileage" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="VIN Code" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="Items stock" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="Days Live" />
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+ <rich:column colspan="6">
+ <rich:subTableToggleControl for="sbtbl"/>
+ <h:outputText value="#{list.vendor}" />
+ </rich:column>
+ <rich:subTable value="#{list.vendorItems}" var="item" id="sbtbl" expandMode="client">
+ <rich:column>
+ <h:outputText value="#{item.model}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{item.price}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{item.mileage}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{item.vin}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{item.stock}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{item.daysLive}" />
+ </rich:column>
+ <f:facet name="footer">
+ <h:outputText value="Total of #{list.vendor} Cars: #{list.count}" />
+ </f:facet>
+ </rich:subTable>
+ </rich:dataTable>
+ </h:form>
+</ui:composition>
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/script/swfobject.js
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/script/swfobject.js (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/script/swfobject.js 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,733 @@
+/*! SWFObject v2.1 <http://code.google.com/p/swfobject/>
+ Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
+ This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
+*/
+
+var swfobject = function() {
+
+ var UNDEF = "undefined",
+ OBJECT = "object",
+ SHOCKWAVE_FLASH = "Shockwave Flash",
+ SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
+ FLASH_MIME_TYPE = "application/x-shockwave-flash",
+ EXPRESS_INSTALL_ID = "SWFObjectExprInst",
+
+ win = window,
+ doc = document,
+ nav = navigator,
+
+ domLoadFnArr = [],
+ regObjArr = [],
+ objIdArr = [],
+ listenersArr = [],
+ script,
+ timer = null,
+ storedAltContent = null,
+ storedAltContentId = null,
+ isDomLoaded = false,
+ isExpressInstallActive = false;
+
+ /* Centralized function for browser feature detection
+ - Proprietary feature detection (conditional compiling) is used to detect Internet Explorer's features
+ - User agent string detection is only used when no alternative is possible
+ - Is executed directly for optimal performance
+ */
+ var ua = function() {
+ var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
+ playerVersion = [0,0,0],
+ d = null;
+ if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
+ d = nav.plugins[SHOCKWAVE_FLASH].description;
+ if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
+ d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
+ playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
+ playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
+ playerVersion[2] = /r/.test(d) ? parseInt(d.replace(/^.*r(.*)$/, "$1"), 10) : 0;
+ }
+ }
+ else if (typeof win.ActiveXObject != UNDEF) {
+ var a = null, fp6Crash = false;
+ try {
+ a = new ActiveXObject(SHOCKWAVE_FLASH_AX + ".7");
+ }
+ catch(e) {
+ try {
+ a = new ActiveXObject(SHOCKWAVE_FLASH_AX + ".6");
+ playerVersion = [6,0,21];
+ a.AllowScriptAccess = "always"; // Introduced in fp6.0.47
+ }
+ catch(e) {
+ if (playerVersion[0] == 6) {
+ fp6Crash = true;
+ }
+ }
+ if (!fp6Crash) {
+ try {
+ a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
+ }
+ catch(e) {}
+ }
+ }
+ if (!fp6Crash && a) { // a will return null when ActiveX is disabled
+ try {
+ d = a.GetVariable("$version"); // Will crash fp6.0.21/23/29
+ if (d) {
+ d = d.split(" ")[1].split(",");
+ playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ }
+ catch(e) {}
+ }
+ }
+ var u = nav.userAgent.toLowerCase(),
+ p = nav.platform.toLowerCase(),
+ webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
+ ie = false,
+ windows = p ? /win/.test(p) : /win/.test(u),
+ mac = p ? /mac/.test(p) : /mac/.test(u);
+ /*@cc_on
+ ie = true;
+ @if (@_win32)
+ windows = true;
+ @elif (@_mac)
+ mac = true;
+ @end
+ @*/
+ return { w3cdom:w3cdom, pv:playerVersion, webkit:webkit, ie:ie, win:windows, mac:mac };
+ }();
+
+ /* Cross-browser onDomLoad
+ - Based on Dean Edwards' solution: http://dean.edwards.name/weblog/2006/06/again/
+ - Will fire an event as soon as the DOM of a page is loaded (supported by Gecko based browsers - like Firefox -, IE, Opera9+, Safari)
+ */
+ var onDomLoad = function() {
+ if (!ua.w3cdom) {
+ return;
+ }
+ addDomLoadEvent(main);
+ if (ua.ie && ua.win) {
+ try { // Avoid a possible Operation Aborted error
+ doc.write("<scr" + "ipt id=__ie_ondomload defer=true src=//:></scr" + "ipt>"); // String is split into pieces to avoid Norton AV to add code that can cause errors
+ script = getElementById("__ie_ondomload");
+ if (script) {
+ addListener(script, "onreadystatechange", checkReadyState);
+ }
+ }
+ catch(e) {}
+ }
+ if (ua.webkit && typeof doc.readyState != UNDEF) {
+ timer = setInterval(function() { if (/loaded|complete/.test(doc.readyState)) { callDomLoadFunctions(); }}, 10);
+ }
+ if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, null);
+ }
+ addLoadEvent(callDomLoadFunctions);
+ }();
+
+ function checkReadyState() {
+ if (script.readyState == "complete") {
+ script.parentNode.removeChild(script);
+ callDomLoadFunctions();
+ }
+ }
+
+ function callDomLoadFunctions() {
+ if (isDomLoaded) {
+ return;
+ }
+ if (ua.ie && ua.win) { // Test if we can really add elements to the DOM; we don't want to fire it too early
+ var s = createElement("span");
+ try { // Avoid a possible Operation Aborted error
+ var t = doc.getElementsByTagName("body")[0].appendChild(s);
+ t.parentNode.removeChild(t);
+ }
+ catch (e) {
+ return;
+ }
+ }
+ isDomLoaded = true;
+ if (timer) {
+ clearInterval(timer);
+ timer = null;
+ }
+ var dl = domLoadFnArr.length;
+ for (var i = 0; i < dl; i++) {
+ domLoadFnArr[i]();
+ }
+ }
+
+ function addDomLoadEvent(fn) {
+ if (isDomLoaded) {
+ fn();
+ }
+ else {
+ domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
+ }
+ }
+
+ /* Cross-browser onload
+ - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
+ - Will fire an event as soon as a web page including all of its assets are loaded
+ */
+ function addLoadEvent(fn) {
+ if (typeof win.addEventListener != UNDEF) {
+ win.addEventListener("load", fn, false);
+ }
+ else if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("load", fn, false);
+ }
+ else if (typeof win.attachEvent != UNDEF) {
+ addListener(win, "onload", fn);
+ }
+ else if (typeof win.onload == "function") {
+ var fnOld = win.onload;
+ win.onload = function() {
+ fnOld();
+ fn();
+ };
+ }
+ else {
+ win.onload = fn;
+ }
+ }
+
+ /* Main function
+ - Will preferably execute onDomLoad, otherwise onload (as a fallback)
+ */
+ function main() { // Static publishing only
+ var rl = regObjArr.length;
+ for (var i = 0; i < rl; i++) { // For each registered object element
+ var id = regObjArr[i].id;
+ if (ua.pv[0] > 0) {
+ var obj = getElementById(id);
+ if (obj) {
+ regObjArr[i].width = obj.getAttribute("width") ? obj.getAttribute("width") : "0";
+ regObjArr[i].height = obj.getAttribute("height") ? obj.getAttribute("height") : "0";
+ if (hasPlayerVersion(regObjArr[i].swfVersion)) { // Flash plug-in version >= Flash content version: Houston, we have a match!
+ if (ua.webkit && ua.webkit < 312) { // Older webkit engines ignore the object element's nested param elements
+ fixParams(obj);
+ }
+ setVisibility(id, true);
+ }
+ else if (regObjArr[i].expressInstall && !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac)) { // Show the Adobe Express Install dialog if set by the web page author and if supported (fp6.0.65+ on Win/Mac OS only)
+ showExpressInstall(regObjArr[i]);
+ }
+ else { // Flash plug-in and Flash content version mismatch: display alternative content instead of Flash content
+ displayAltContent(obj);
+ }
+ }
+ }
+ else { // If no fp is installed, we let the object element do its job (show alternative content)
+ setVisibility(id, true);
+ }
+ }
+ }
+
+ /* Fix nested param elements, which are ignored by older webkit engines
+ - This includes Safari up to and including version 1.2.2 on Mac OS 10.3
+ - Fall back to the proprietary embed element
+ */
+ function fixParams(obj) {
+ var nestedObj = obj.getElementsByTagName(OBJECT)[0];
+ if (nestedObj) {
+ var e = createElement("embed"), a = nestedObj.attributes;
+ if (a) {
+ var al = a.length;
+ for (var i = 0; i < al; i++) {
+ if (a[i].nodeName == "DATA") {
+ e.setAttribute("src", a[i].nodeValue);
+ }
+ else {
+ e.setAttribute(a[i].nodeName, a[i].nodeValue);
+ }
+ }
+ }
+ var c = nestedObj.childNodes;
+ if (c) {
+ var cl = c.length;
+ for (var j = 0; j < cl; j++) {
+ if (c[j].nodeType == 1 && c[j].nodeName == "PARAM") {
+ e.setAttribute(c[j].getAttribute("name"), c[j].getAttribute("value"));
+ }
+ }
+ }
+ obj.parentNode.replaceChild(e, obj);
+ }
+ }
+
+ /* Show the Adobe Express Install dialog
+ - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
+ */
+ function showExpressInstall(regObj) {
+ isExpressInstallActive = true;
+ var obj = getElementById(regObj.id);
+ if (obj) {
+ if (regObj.altContentId) {
+ var ac = getElementById(regObj.altContentId);
+ if (ac) {
+ storedAltContent = ac;
+ storedAltContentId = regObj.altContentId;
+ }
+ }
+ else {
+ storedAltContent = abstractAltContent(obj);
+ }
+ if (!(/%$/.test(regObj.width)) && parseInt(regObj.width, 10) < 310) {
+ regObj.width = "310";
+ }
+ if (!(/%$/.test(regObj.height)) && parseInt(regObj.height, 10) < 137) {
+ regObj.height = "137";
+ }
+ doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
+ var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
+ dt = doc.title,
+ fv = "MMredirectURL=" + win.location + "&MMplayerType=" + pt + "&MMdoctitle=" + dt,
+ replaceId = regObj.id;
+ // For IE when a SWF is loading (AND: not available in cache) wait for the onload event to fire to remove the original object element
+ // In IE you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ var newObj = createElement("div");
+ replaceId += "SWFObjectNew";
+ newObj.setAttribute("id", replaceId);
+ obj.parentNode.insertBefore(newObj, obj); // Insert placeholder div that will be replaced by the object element that loads expressinstall.swf
+ obj.style.display = "none";
+ var fn = function() {
+ obj.parentNode.removeChild(obj);
+ };
+ addListener(win, "onload", fn);
+ }
+ createSWF({ data:regObj.expressInstall, id:EXPRESS_INSTALL_ID, width:regObj.width, height:regObj.height }, { flashvars:fv }, replaceId);
+ }
+ }
+
+ /* Functions to abstract and display alternative content
+ */
+ function displayAltContent(obj) {
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ // For IE when a SWF is loading (AND: not available in cache) wait for the onload event to fire to remove the original object element
+ // In IE you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+ var el = createElement("div");
+ obj.parentNode.insertBefore(el, obj); // Insert placeholder div that will be replaced by the alternative content
+ el.parentNode.replaceChild(abstractAltContent(obj), el);
+ obj.style.display = "none";
+ var fn = function() {
+ obj.parentNode.removeChild(obj);
+ };
+ addListener(win, "onload", fn);
+ }
+ else {
+ obj.parentNode.replaceChild(abstractAltContent(obj), obj);
+ }
+ }
+
+ function abstractAltContent(obj) {
+ var ac = createElement("div");
+ if (ua.win && ua.ie) {
+ ac.innerHTML = obj.innerHTML;
+ }
+ else {
+ var nestedObj = obj.getElementsByTagName(OBJECT)[0];
+ if (nestedObj) {
+ var c = nestedObj.childNodes;
+ if (c) {
+ var cl = c.length;
+ for (var i = 0; i < cl; i++) {
+ if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
+ ac.appendChild(c[i].cloneNode(true));
+ }
+ }
+ }
+ }
+ }
+ return ac;
+ }
+
+ /* Cross-browser dynamic SWF creation
+ */
+ function createSWF(attObj, parObj, id) {
+ var r, el = getElementById(id);
+ if (el) {
+ if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
+ attObj.id = id;
+ }
+ if (ua.ie && ua.win) { // IE, the object element and W3C DOM methods do not combine: fall back to outerHTML
+ var att = "";
+ for (var i in attObj) {
+ if (attObj[i] != Object.prototype[i]) { // Filter out prototype additions from other potential libraries, like Object.prototype.toJSONString = function() {}
+ if (i.toLowerCase() == "data") {
+ parObj.movie = attObj[i];
+ }
+ else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+ att += ' class="' + attObj[i] + '"';
+ }
+ else if (i.toLowerCase() != "classid") {
+ att += ' ' + i + '="' + attObj[i] + '"';
+ }
+ }
+ }
+ var par = "";
+ for (var j in parObj) {
+ if (parObj[j] != Object.prototype[j]) { // Filter out prototype additions from other potential libraries
+ par += '<param name="' + j + '" value="' + parObj[j] + '" />';
+ }
+ }
+ el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
+ objIdArr[objIdArr.length] = attObj.id; // Stored to fix object 'leaks' on unload (dynamic publishing only)
+ r = getElementById(attObj.id);
+ }
+ else if (ua.webkit && ua.webkit < 312) { // Older webkit engines ignore the object element's nested param elements: fall back to the proprietary embed element
+ var e = createElement("embed");
+ e.setAttribute("type", FLASH_MIME_TYPE);
+ for (var k in attObj) {
+ if (attObj[k] != Object.prototype[k]) { // Filter out prototype additions from other potential libraries
+ if (k.toLowerCase() == "data") {
+ e.setAttribute("src", attObj[k]);
+ }
+ else if (k.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+ e.setAttribute("class", attObj[k]);
+ }
+ else if (k.toLowerCase() != "classid") { // Filter out IE specific attribute
+ e.setAttribute(k, attObj[k]);
+ }
+ }
+ }
+ for (var l in parObj) {
+ if (parObj[l] != Object.prototype[l]) { // Filter out prototype additions from other potential libraries
+ if (l.toLowerCase() != "movie") { // Filter out IE specific param element
+ e.setAttribute(l, parObj[l]);
+ }
+ }
+ }
+ el.parentNode.replaceChild(e, el);
+ r = e;
+ }
+ else { // Well-behaving browsers
+ var o = createElement(OBJECT);
+ o.setAttribute("type", FLASH_MIME_TYPE);
+ for (var m in attObj) {
+ if (attObj[m] != Object.prototype[m]) { // Filter out prototype additions from other potential libraries
+ if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+ o.setAttribute("class", attObj[m]);
+ }
+ else if (m.toLowerCase() != "classid") { // Filter out IE specific attribute
+ o.setAttribute(m, attObj[m]);
+ }
+ }
+ }
+ for (var n in parObj) {
+ if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // Filter out prototype additions from other potential libraries and IE specific param element
+ createObjParam(o, n, parObj[n]);
+ }
+ }
+ el.parentNode.replaceChild(o, el);
+ r = o;
+ }
+ }
+ return r;
+ }
+
+ function createObjParam(el, pName, pValue) {
+ var p = createElement("param");
+ p.setAttribute("name", pName);
+ p.setAttribute("value", pValue);
+ el.appendChild(p);
+ }
+
+ /* Cross-browser SWF removal
+ - Especially needed to safely and completely remove a SWF in Internet Explorer
+ */
+ function removeSWF(id) {
+ var obj = getElementById(id);
+ if (obj && (obj.nodeName == "OBJECT" || obj.nodeName == "EMBED")) {
+ if (ua.ie && ua.win) {
+ if (obj.readyState == 4) {
+ removeObjectInIE(id);
+ }
+ else {
+ win.attachEvent("onload", function() {
+ removeObjectInIE(id);
+ });
+ }
+ }
+ else {
+ obj.parentNode.removeChild(obj);
+ }
+ }
+ }
+
+ function removeObjectInIE(id) {
+ var obj = getElementById(id);
+ if (obj) {
+ for (var i in obj) {
+ if (typeof obj[i] == "function") {
+ obj[i] = null;
+ }
+ }
+ obj.parentNode.removeChild(obj);
+ }
+ }
+
+ /* Functions to optimize JavaScript compression
+ */
+ function getElementById(id) {
+ var el = null;
+ try {
+ el = doc.getElementById(id);
+ }
+ catch (e) {}
+ return el;
+ }
+
+ function createElement(el) {
+ return doc.createElement(el);
+ }
+
+ /* Updated attachEvent function for Internet Explorer
+ - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
+ */
+ function addListener(target, eventType, fn) {
+ target.attachEvent(eventType, fn);
+ listenersArr[listenersArr.length] = [target, eventType, fn];
+ }
+
+ /* Flash Player and SWF content version matching
+ */
+ function hasPlayerVersion(rv) {
+ var pv = ua.pv, v = rv.split(".");
+ v[0] = parseInt(v[0], 10);
+ v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
+ v[2] = parseInt(v[2], 10) || 0;
+ return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
+ }
+
+ /* Cross-browser dynamic CSS creation
+ - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
+ */
+ function createCSS(sel, decl) {
+ if (ua.ie && ua.mac) {
+ return;
+ }
+ var h = doc.getElementsByTagName("head")[0], s = createElement("style");
+ s.setAttribute("type", "text/css");
+ s.setAttribute("media", "screen");
+ if (!(ua.ie && ua.win) && typeof doc.createTextNode != UNDEF) {
+ s.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
+ }
+ h.appendChild(s);
+ if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
+ var ls = doc.styleSheets[doc.styleSheets.length - 1];
+ if (typeof ls.addRule == OBJECT) {
+ try {
+ ls.addRule(sel, decl);
+ } catch(e) {}
+ }
+ }
+ }
+
+ function setVisibility(id, isVisible) {
+ var v = isVisible ? "visible" : "hidden";
+ if (isDomLoaded && getElementById(id)) {
+ getElementById(id).style.visibility = v;
+ }
+ else {
+ createCSS("#" + id, "visibility:" + v);
+ }
+ }
+
+ /* Filter to avoid XSS attacks
+ */
+ function urlEncodeIfNecessary(s) {
+ var regex = /[\\\"<>\.;]/;
+ var hasBadChars = regex.exec(s) != null;
+ return hasBadChars ? encodeURIComponent(s) : s;
+ }
+
+ /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
+ */
+ var cleanup = function() {
+ if (ua.ie && ua.win) {
+ window.attachEvent("onunload", function() {
+ // remove listeners to avoid memory leaks
+ var ll = listenersArr.length;
+ for (var i = 0; i < ll; i++) {
+ listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
+ }
+ // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
+ var il = objIdArr.length;
+ for (var j = 0; j < il; j++) {
+ removeSWF(objIdArr[j]);
+ }
+ // cleanup library's main closures to avoid memory leaks
+ for (var k in ua) {
+ ua[k] = null;
+ }
+ ua = null;
+ for (var l in swfobject) {
+ swfobject[l] = null;
+ }
+ swfobject = null;
+ });
+ }
+ }();
+
+
+ return {
+ /* Public API
+ - Reference: http://code.google.com/p/swfobject/wiki/SWFObject_2_0_documentation
+ */
+ registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr) {
+ if (!ua.w3cdom || !objectIdStr || !swfVersionStr) {
+ return;
+ }
+ var regObj = {};
+ regObj.id = objectIdStr;
+ regObj.swfVersion = swfVersionStr;
+ regObj.expressInstall = xiSwfUrlStr ? xiSwfUrlStr : false;
+ regObjArr[regObjArr.length] = regObj;
+ setVisibility(objectIdStr, false);
+ },
+
+ getObjectById: function(objectIdStr) {
+ var r = null;
+ if (ua.w3cdom) {
+ var o = getElementById(objectIdStr);
+ if (o) {
+ var n = o.getElementsByTagName(OBJECT)[0];
+ if (!n || (n && typeof o.SetVariable != UNDEF)) {
+ r = o;
+ }
+ else if (typeof n.SetVariable != UNDEF) {
+ r = n;
+ }
+ }
+ }
+ return r;
+ },
+
+ embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj) {
+ if (!ua.w3cdom || !swfUrlStr || !replaceElemIdStr || !widthStr || !heightStr || !swfVersionStr) {
+ return;
+ }
+ widthStr += ""; // Auto-convert to string
+ heightStr += "";
+ if (hasPlayerVersion(swfVersionStr)) {
+ setVisibility(replaceElemIdStr, false);
+ var att = {};
+ if (attObj && typeof attObj === OBJECT) {
+ for (var i in attObj) {
+ if (attObj[i] != Object.prototype[i]) { // Filter out prototype additions from other potential libraries
+ att[i] = attObj[i];
+ }
+ }
+ }
+ att.data = swfUrlStr;
+ att.width = widthStr;
+ att.height = heightStr;
+ var par = {};
+ if (parObj && typeof parObj === OBJECT) {
+ for (var j in parObj) {
+ if (parObj[j] != Object.prototype[j]) { // Filter out prototype additions from other potential libraries
+ par[j] = parObj[j];
+ }
+ }
+ }
+ if (flashvarsObj && typeof flashvarsObj === OBJECT) {
+ for (var k in flashvarsObj) {
+ if (flashvarsObj[k] != Object.prototype[k]) { // Filter out prototype additions from other potential libraries
+ if (typeof par.flashvars != UNDEF) {
+ par.flashvars += "&" + k + "=" + flashvarsObj[k];
+ }
+ else {
+ par.flashvars = k + "=" + flashvarsObj[k];
+ }
+ }
+ }
+ }
+ addDomLoadEvent(function() {
+ createSWF(att, par, replaceElemIdStr);
+ if (att.id == replaceElemIdStr) {
+ setVisibility(replaceElemIdStr, true);
+ }
+ });
+ }
+ else if (xiSwfUrlStr && !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac)) {
+ isExpressInstallActive = true; // deferred execution
+ setVisibility(replaceElemIdStr, false);
+ addDomLoadEvent(function() {
+ var regObj = {};
+ regObj.id = regObj.altContentId = replaceElemIdStr;
+ regObj.width = widthStr;
+ regObj.height = heightStr;
+ regObj.expressInstall = xiSwfUrlStr;
+ showExpressInstall(regObj);
+ });
+ }
+ },
+
+ getFlashPlayerVersion: function() {
+ return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
+ },
+
+ hasFlashPlayerVersion: hasPlayerVersion,
+
+ createSWF: function(attObj, parObj, replaceElemIdStr) {
+ if (ua.w3cdom) {
+ return createSWF(attObj, parObj, replaceElemIdStr);
+ }
+ else {
+ return undefined;
+ }
+ },
+
+ removeSWF: function(objElemIdStr) {
+ if (ua.w3cdom) {
+ removeSWF(objElemIdStr);
+ }
+ },
+
+ createCSS: function(sel, decl) {
+ if (ua.w3cdom) {
+ createCSS(sel, decl);
+ }
+ },
+
+ addDomLoadEvent: addDomLoadEvent,
+
+ addLoadEvent: addLoadEvent,
+
+ getQueryParamValue: function(param) {
+ var q = doc.location.search || doc.location.hash;
+ if (param == null) {
+ return urlEncodeIfNecessary(q);
+ }
+ if (q) {
+ var pairs = q.substring(1).split("&");
+ for (var i = 0; i < pairs.length; i++) {
+ if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
+ return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
+ }
+ }
+ }
+ return "";
+ },
+
+ // For internal usage only
+ expressInstallCallback: function() {
+ if (isExpressInstallActive && storedAltContent) {
+ var obj = getElementById(EXPRESS_INSTALL_ID);
+ if (obj) {
+ obj.parentNode.replaceChild(storedAltContent, obj);
+ if (storedAltContentId) {
+ setVisibility(storedAltContentId, true);
+ if (ua.ie && ua.win) {
+ storedAltContent.style.display = "block";
+ }
+ }
+ storedAltContent = null;
+ storedAltContentId = null;
+ isExpressInstallActive = false;
+ }
+ }
+ }
+ };
+}();
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/templates/includes/navigation.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/templates/includes/navigation.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/templates/includes/navigation.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,31 @@
+<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://java.sun.com/jsf/composite/rich">
+ <rich:panel style="width:300px" bodyClass="">
+ <f:facet name="header">
+ <h:outputText value="Navigation" />
+ </f:facet>
+ <ul>
+ <a4j:repeat value="#{demoNavigator.groups}" var="gr">
+ <li>
+ <h:outputText value="#{gr.name}" style="font-weight:bold"/>
+ <h:outputText rendered="#{gr.newItem}" value="NEW!" styleClass="new_marker" />
+ </li>
+ <ul>
+ <a4j:repeat value="#{gr.demos}" var="d">
+ <li>
+ <h:link outcome="/richfaces/component-sample.xhtml" value="#{d.name}" includeViewParams="false">
+ <f:attribute name="style" value="#{(d.id == demoNavigator.currentDemo.id) ? 'color:orange' : ''}"/>
+ <f:param name="demo" value="#{d.id}"/>
+ </h:link>
+ <h:outputText rendered="#{d.newItem or gr.newItem}" value="NEW!" styleClass="new_marker" />
+ </li>
+ </a4j:repeat>
+ </ul>
+ </a4j:repeat>
+ </ul>
+ </rich:panel>
+</ui:composition>
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/templates/includes/skin-chooser.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/templates/includes/skin-chooser.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/templates/includes/skin-chooser.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,21 @@
+<!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://java.sun.com/jsf/composite/rich">
+
+ <ui:composition>
+ <rich:panel styleClass="skin-chooser">
+ <a4j:repeat var="skin" value="#{skinBean.skins}" iterationStatusVar="iterStatus">
+ <h:link value="#{skin}" includeViewParams="true">
+ <f:param name="skin" value="#{skin}"/>
+ <f:attribute name="style" value="#{(skin==skinBean.skin) ? 'color:orange' : ''}"/>
+ </h:link>
+ <h:outputText value = " | " rendered="#{not iterStatus.last}" />
+ </a4j:repeat>
+ </rich:panel>
+ </ui:composition>
+
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/templates/main.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/templates/main.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/templates/main.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,76 @@
+<!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:rich="http://java.sun.com/jsf/composite/rich"
+ xmlns:a4j="http://richfaces.org/a4j">
+<f:view>
+ <ui:insert name="demoSampleParameters"/>
+
+<h:head>
+ <title>Components Gallery</title>
+</h:head>
+<h:body>
+ <h:outputStylesheet name="rich/css/page.ecss" />
+ <table border="0" cellpadding="0" cellspacing="0"
+ class="rich-page header_bg #{cc.attrs.pageClass}">
+ <tbody>
+ <tr>
+ <td>
+ <div
+ class="header_content rich-page-header #{cc.attrs.headerClass}">
+ <h1>Welcome to RichFaces demo!</h1>
+ </div>
+ </td>
+ <td align="right" class="header_links_container">
+ <h:outputLink value="http://jboss.org/richfaces">Project Site</h:outputLink>
+ <h:outputText value=" | "/>
+ <h:outputLink value="http://www.jboss.org/community/wiki/richfaceswikihomepage">Project Wiki</h:outputLink>
+ <h:outputText value=" | "/>
+ <h:outputLink value="http://community.jboss.org/community/richfaces">RichFaces Community Space</h:outputLink>
+ <h:outputText value=" | "/>
+ <h:outputLink value="http://downloads.jboss.org/richfaces/milestones/4.0.X/4.0.0.ALPHA2/richfa...">Download</h:outputLink>
+ <h:outputText value=" | "/>
+ <h:outputLink value="http://anonsvn.jboss.org/repos/richfaces/root/examples/richfaces-showcase/">Sources</h:outputLink>
+ </td>
+ </tr>
+ <tr>
+ <td width="100%" height="100%" class="bg_tabbody" colspan="2">
+ <table cellpadding="0" cellspacing="0" border="0" width="100%"
+ height="100%" class="rich-page-content">
+ <tbody>
+ <tr>
+ <td class="menu_col rich-page-sidebar">
+ <div class="menu_width spacer"></div>
+ <ui:include src="/templates/includes/navigation.xhtml" /></td>
+ <td class="content_col rich-page-body">
+
+ <ui:remove>
+ <fieldset>
+ <legend>#{demoNavigator.currentComponent}</legend>
+ </fieldset>
+ </ui:remove>
+ <ui:include src="/templates/includes/skin-chooser.xhtml"/>
+ <ui:insert name="body">
+ Body content missed
+ </ui:insert></td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td class="footer_bg" colspan="2">
+ <div
+ class="footer_bg_content rich-page-footer">
+ #{a4j}
+ </div>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+</h:body>
+</f:view>
+</html>
\ No newline at end of file
Added: root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/welcome.xhtml
===================================================================
--- root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/welcome.xhtml (rev 0)
+++ root/examples-sandbox/trunk/richfaces-showcase-gae/src/main/webapp/welcome.xhtml 2010-07-29 23:17:51 UTC (rev 18287)
@@ -0,0 +1,14 @@
+<!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 template="/templates/main.xhtml">
+ <ui:define name="body">
+ Welcome To RichFaces 4.x Demo
+ </ui:define>
+
+ </ui:composition>
+
+</html>
\ No newline at end of file
14 years, 5 months
JBoss Rich Faces SVN: r18286 - in root: examples-sandbox/trunk/components/inputnumberslider-demo/src/main/webapp and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2010-07-29 14:42:27 -0400 (Thu, 29 Jul 2010)
New Revision: 18286
Modified:
root/examples-sandbox/trunk/components/inputnumberslider-demo/src/main/java/org/richfaces/demo/Bean.java
root/examples-sandbox/trunk/components/inputnumberslider-demo/src/main/webapp/index.xhtml
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/config/faces-config.xml
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/templates/inputnumberslider.template.xml
Log:
RF-8983
Modified: root/examples-sandbox/trunk/components/inputnumberslider-demo/src/main/java/org/richfaces/demo/Bean.java
===================================================================
--- root/examples-sandbox/trunk/components/inputnumberslider-demo/src/main/java/org/richfaces/demo/Bean.java 2010-07-29 18:33:08 UTC (rev 18285)
+++ root/examples-sandbox/trunk/components/inputnumberslider-demo/src/main/java/org/richfaces/demo/Bean.java 2010-07-29 18:42:27 UTC (rev 18286)
@@ -24,13 +24,14 @@
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
-@ManagedBean(name="bean")
+@ManagedBean(name = "bean")
@SessionScoped
public class Bean {
private int value;
private String accesskey;
-
+ private boolean enableManualInput = true;
+
public void setValue(int value) {
this.value = value;
}
@@ -46,4 +47,12 @@
public String getAccesskey() {
return accesskey;
}
+
+ public void setEnableManualInput(boolean enableManualInput) {
+ this.enableManualInput = enableManualInput;
+ }
+
+ public boolean getEnableManualInput() {
+ return enableManualInput;
+ }
}
Modified: root/examples-sandbox/trunk/components/inputnumberslider-demo/src/main/webapp/index.xhtml
===================================================================
--- root/examples-sandbox/trunk/components/inputnumberslider-demo/src/main/webapp/index.xhtml 2010-07-29 18:33:08 UTC (rev 18285)
+++ root/examples-sandbox/trunk/components/inputnumberslider-demo/src/main/webapp/index.xhtml 2010-07-29 18:42:27 UTC (rev 18286)
@@ -34,12 +34,18 @@
</h:head>
<h:body>
<h:form id="form">
- <ins:inputnumberslider id="ins" value="#{bean.value}" accesskey="#{bean.accesskey}"/>
+ <ins:inputnumberslider id="ins" value="#{bean.value}" accesskey="#{bean.accesskey}"
+ enableManualInput="#{bean.enableManualInput}"/>
<br />
- <h:outputText value="Accesskey : "/>
+ <h:outputText value="Accesskey: "/>
<h:inputText value="#{bean.accesskey}">
<f:ajax render="ins"/>
</h:inputText>
+ <br />
+ <h:outputText value="EnableManualInput: "/>
+ <h:selectBooleanCheckbox value="#{bean.enableManualInput}">
+ <f:ajax render="ins"/>
+ </h:selectBooleanCheckbox>
</h:form>
</h:body>
</html>
Modified: root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/config/faces-config.xml
===================================================================
--- root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/config/faces-config.xml 2010-07-29 18:33:08 UTC (rev 18285)
+++ root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/config/faces-config.xml 2010-07-29 18:42:27 UTC (rev 18286)
@@ -37,6 +37,14 @@
<cdk:generate>true</cdk:generate>
</property-extension>
</property>
+ <property>
+ <property-name>enableManualInput</property-name>
+ <property-class>boolean</property-class>
+ <default-value>true</default-value>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ </property-extension>
+ </property>
<component-extension>
<cdk:generate>true</cdk:generate>
<cdk:base-class>javax.faces.component.UIInput</cdk:base-class>
Modified: root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/templates/inputnumberslider.template.xml
===================================================================
--- root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/templates/inputnumberslider.template.xml 2010-07-29 18:33:08 UTC (rev 18285)
+++ root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/templates/inputnumberslider.template.xml 2010-07-29 18:42:27 UTC (rev 18286)
@@ -50,7 +50,8 @@
</span>
<a class="rf-ins-ib" href="javascript:void(0);" />
<input name="#{clientId}" type="text" class="rf-ins-i" size="3"
- value="#{getInputValue(facesContext, component)}" accesskey="#{component.attributes['accesskey']}"/>
+ value="#{getInputValue(facesContext, component)}" accesskey="#{component.attributes['accesskey']}"
+ readonly="#{!component.attributes['enableManualInput']}"/>
<span class="rf-ins-tt">#{getInputValue(facesContext, component)}</span>
<script type="text/javascript">new RichFaces.ui.InputNumberSlider('#{clientId}');</script>
</span>
14 years, 5 months
JBoss Rich Faces SVN: r18285 - root/cdk/trunk/plugins/generator/src/main/resources/META-INF/templates/java.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2010-07-29 14:33:08 -0400 (Thu, 29 Jul 2010)
New Revision: 18285
Modified:
root/cdk/trunk/plugins/generator/src/main/resources/META-INF/templates/java/write-boolean-attribute.ftl
Log:
fix encoding of boolean attributes
Modified: root/cdk/trunk/plugins/generator/src/main/resources/META-INF/templates/java/write-boolean-attribute.ftl
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/resources/META-INF/templates/java/write-boolean-attribute.ftl 2010-07-29 17:07:39 UTC (rev 18284)
+++ root/cdk/trunk/plugins/generator/src/main/resources/META-INF/templates/java/write-boolean-attribute.ftl 2010-07-29 18:33:08 UTC (rev 18285)
@@ -8,6 +8,6 @@
<#else>
if(Boolean.valueOf(String.valueOf(${value}))) {
</#if>
- ${responseWriterVariable}.writeAttribute("${attributeName}",${attributeName},null);
+ ${responseWriterVariable}.writeAttribute("${attributeName}","${attributeName}",null);
}
</#if>
14 years, 5 months