JBoss Rich Faces SVN: r17408 - root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/queue.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-05-31 09:18:36 -0400 (Mon, 31 May 2010)
New Revision: 17408
Modified:
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/queue/queue.xhtml
Log:
document.getElementById(...) replaced with #{rfn:element(...)}
Modified: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/queue/queue.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/queue/queue.xhtml 2010-05-31 13:03:49 UTC (rev 17407)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/queue/queue.xhtml 2010-05-31 13:18:36 UTC (rev 17408)
@@ -3,6 +3,7 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rfn="http://richfaces.org/misc"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:rich="http://java.sun.com/jsf/composite/rich">
<p>JSF 2 provides queue mechanism out-of the box already. And RichFaces queue just provides
@@ -63,11 +64,11 @@
</h:form>
</rich:panel>
<script type="text/javascript">
- var events=0;
- var updates=0;
- var outEvents=document.getElementById('form:events');
- var outUpdates=document.getElementById('form:updates');
- var outRequests=document.getElementById('form:requests');
+ var events = 0;
+ var updates = 0;
+ var outEvents = #{rfn:element('events')};
+ var outUpdates = #{rfn:element('updates')};
+ var outRequests = #{rfn:element('requests')};
var requests=0;
function addEvent(){
14 years, 7 months
JBoss Rich Faces SVN: r17407 - root/cdk/trunk/docs/guide.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-05-31 09:03:49 -0400 (Mon, 31 May 2010)
New Revision: 17407
Modified:
root/cdk/trunk/docs/guide/pom.xml
Log:
Incorrect groupId fixed
Modified: root/cdk/trunk/docs/guide/pom.xml
===================================================================
--- root/cdk/trunk/docs/guide/pom.xml 2010-05-31 12:56:46 UTC (rev 17406)
+++ root/cdk/trunk/docs/guide/pom.xml 2010-05-31 13:03:49 UTC (rev 17407)
@@ -10,7 +10,7 @@
<name>${bookname}-(${translation})</name>
<parent>
- <groupId>org.jboss.richfaces.cdk</groupId>
+ <groupId>org.richfaces.cdk</groupId>
<artifactId>docs</artifactId>
<version>4.0.0-SNAPSHOT</version>
</parent>
14 years, 7 months
JBoss Rich Faces SVN: r17406 - root/ui/core/trunk/ui/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-05-31 08:56:46 -0400 (Mon, 31 May 2010)
New Revision: 17406
Modified:
root/ui/core/trunk/ui/src/main/java/org/richfaces/renderkit/html/MediaOutputRenderer.java
Log:
Added missing JsfRenderer annotation at media output renderer
Modified: root/ui/core/trunk/ui/src/main/java/org/richfaces/renderkit/html/MediaOutputRenderer.java
===================================================================
--- root/ui/core/trunk/ui/src/main/java/org/richfaces/renderkit/html/MediaOutputRenderer.java 2010-05-31 12:48:32 UTC (rev 17405)
+++ root/ui/core/trunk/ui/src/main/java/org/richfaces/renderkit/html/MediaOutputRenderer.java 2010-05-31 12:56:46 UTC (rev 17406)
@@ -24,7 +24,6 @@
package org.richfaces.renderkit.html;
import java.io.IOException;
-
import java.util.HashMap;
import java.util.Map;
@@ -37,13 +36,14 @@
import org.ajax4jsf.Messages;
import org.ajax4jsf.renderkit.RendererBase;
import org.ajax4jsf.renderkit.RendererUtils.HTML;
-
+import org.richfaces.cdk.annotations.JsfRenderer;
import org.richfaces.component.AbstractMediaOutput;
/**
* @author shura
*
*/
+@JsfRenderer(family = AbstractMediaOutput.COMPONENT_FAMILY)
public class MediaOutputRenderer extends RendererBase {
public static final String RENDERER_TYPE = "org.richfaces.MediaOutputRenderer";
14 years, 7 months
JBoss Rich Faces SVN: r17405 - in root: core/trunk/impl and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2010-05-31 08:48:32 -0400 (Mon, 31 May 2010)
New Revision: 17405
Modified:
root/core/trunk/impl/pom.xml
root/dist/trunk/pom.xml
root/dist/trunk/richfaces.xml
root/pom.xml
Log:
root assembler
Modified: root/core/trunk/impl/pom.xml
===================================================================
--- root/core/trunk/impl/pom.xml 2010-05-31 12:43:31 UTC (rev 17404)
+++ root/core/trunk/impl/pom.xml 2010-05-31 12:48:32 UTC (rev 17405)
@@ -135,22 +135,7 @@
<build>
<plugins>
- <!-- Trigger checkstyle checking for this module -->
- <plugin>
- <artifactId>maven-checkstyle-plugin</artifactId>
- </plugin>
-
<!--
- TODO should be in profile not here. The path in profile
- is correct
- -->
- <plugin>
- <!-- Configure js documentation plugin -->
- <groupId>gr.abiss.mvn.plugins</groupId>
- <artifactId>maven-jstools-plugin</artifactId>
- </plugin>
-
- <!--
TODO Centralize this because calendar and context menu
use this too
Note: This may be removed by redisgn
@@ -216,6 +201,23 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <!-- pack jsdoc to jar -->
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>pack-jsodcs</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <configuration>
+ <classesDirectory>${basedir}/target/site/jsdoc</classesDirectory>
+ <classifier>jsdoc</classifier>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</profile>
Modified: root/dist/trunk/pom.xml
===================================================================
--- root/dist/trunk/pom.xml 2010-05-31 12:43:31 UTC (rev 17404)
+++ root/dist/trunk/pom.xml 2010-05-31 12:48:32 UTC (rev 17405)
@@ -37,17 +37,67 @@
<modules>
<!--<module>../../build/parent/tags/richfaces-parent-3</module>-->
- <module>../../build/bom/trunk</module>
- <module>../../commons/trunk</module>
- <module>../../core/trunk</module>
+ <!--<module>../../build/bom/trunk</module>-->
+ <module>../../archetypes</module>
+
+ <!--<module>../../commons/trunk</module>-->
+ <!--<module>../../core/trunk</module>-->
<!-- call ui assembler -->
- <module>../../ui/dist/trunk</module>
+ <!--<module>../../ui/dist/trunk</module>-->
<!-- for build examples we need some components from sandbox -->
<module>../../examples</module>
</modules>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>richfaces-components-api</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>richfaces-components-impl</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>richfaces-components-ui</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.core</groupId>
+ <artifactId>richfaces-core-api</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.core</groupId>
+ <artifactId>richfaces-core-impl</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.commons</groupId>
+ <artifactId>richfaces-commons-api</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </dependency>
+
+ <!-- Examples -->
+ <dependency>
+ <groupId>org.richfaces.examples</groupId>
+ <artifactId>core-demo</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <type>war</type>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.examples</groupId>
+ <artifactId>richfaces-showcase</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <type>war</type>
+ <classifier>tomcat6</classifier>
+ </dependency>
+ </dependencies>
+
<build>
<plugins>
<plugin>
@@ -56,7 +106,77 @@
<skip>true</skip>
</configuration>
</plugin>
+
<plugin>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <configuration>
+ <includeGroupIds>org.richfaces.core,org.richfaces.commons,org.richfaces.ui</includeGroupIds>
+ </configuration>
+ <executions>
+ <execution>
+ <id>copy-bin</id>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <phase>package</phase>
+ </execution>
+ <execution>
+ <id>copy-sources</id>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <classifier>sources</classifier>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy-javadoc</id>
+ <goals>
+ <goal>unpack-dependencies</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <classifier>javadoc</classifier>
+
+ <useSubDirectoryPerArtifact>true</useSubDirectoryPerArtifact>
+ <stripVersion>true</stripVersion>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy-jsdoc</id>
+ <goals>
+ <goal>unpack-dependencies</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <classifier>jsdoc</classifier>
+
+ <failOnMissingClassifierArtifact>false</failOnMissingClassifierArtifact>
+ <useSubDirectoryPerArtifact>true</useSubDirectoryPerArtifact>
+ <stripVersion>true</stripVersion>
+ </configuration>
+ </execution>
+
+<!--
+ <execution>
+ <id>copy-examples</id>
+ <goals>
+ <goal>unpack-dependencies</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <includeGroupIds>org.richfaces.examples</includeGroupIds>
+ <failOnMissingClassifierArtifact>false</failOnMissingClassifierArtifact>
+ <useSubDirectoryPerArtifact>true</useSubDirectoryPerArtifact>
+ <stripVersion>true</stripVersion>
+ </configuration>
+ </execution>
+-->
+ </executions>
+ </plugin>
+
+ <plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-4</version>
<executions>
@@ -72,7 +192,7 @@
</goals>
</execution>
</executions>
- </plugin>
+ </plugin>
</plugins>
</build>
</project>
\ No newline at end of file
Modified: root/dist/trunk/richfaces.xml
===================================================================
--- root/dist/trunk/richfaces.xml 2010-05-31 12:43:31 UTC (rev 17404)
+++ root/dist/trunk/richfaces.xml 2010-05-31 12:48:32 UTC (rev 17405)
@@ -1,6 +1,8 @@
-<assembly>
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<formats>
- <format>zip</format>
+ <format>dir</format>
</formats>
<files>
@@ -23,90 +25,92 @@
</file>
</files>
- <moduleSets>
- <moduleSet>
- <includeSubModules>true</includeSubModules>
+ <fileSets>
+ <!-- bin & sources -->
+ <fileSet>
+ <directory>target/dependency</directory>
+ <outputDirectory>artifacts/framework</outputDirectory>
<includes>
- <include>org.richfaces.core:richfaces-core-api</include>
- <include>org.richfaces.core:richfaces-core-impl</include>
- <include>org.richfaces.commons:richfaces-commons-api</include>
+ <include>richfaces-core-*.jar</include>
+ <include>richfaces-commons-*.jar</include>
</includes>
+ </fileSet>
+ <fileSet>
+ <directory>target/dependency</directory>
+ <outputDirectory>artifacts/ui</outputDirectory>
+ <includes>
+ <include>richfaces-components-*.jar</include>
+ </includes>
+ </fileSet>
- <sources>
- <outputDirectoryMapping>/</outputDirectoryMapping>
- <excludeSubModuleDirectories>true</excludeSubModuleDirectories>
- <fileSets>
- <fileSet>
- <directory>target</directory>
- <includes>
- <include>*-sources.jar</include>
- </includes>
- <outputDirectory>artifacts/framework/</outputDirectory>
- </fileSet>
- <fileSet>
- <directory>target/apidocs</directory>
- <outputDirectory>docs/javadocs/${module.artifactId}</outputDirectory>
- </fileSet>
- <fileSet>
- <directory>target/site/jsdoc</directory>
- <outputDirectory>docs/jsdocs/${module.artifactId}</outputDirectory>
- </fileSet>
- </fileSets>
- </sources>
+ <!-- javadocs -->
+ <fileSet>
+ <directory>target/dependency/richfaces-core-api-javadoc-java-source</directory>
+ <outputDirectory>docs/javadocs/richfaces-core-api/</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>target/dependency/richfaces-core-impl-javadoc-java-source</directory>
+ <outputDirectory>docs/javadocs/richfaces-core-impl/</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>target/dependency/richfaces-commons-api-javadoc-java-source</directory>
+ <outputDirectory>docs/javadocs/richfaces-commons-api/</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>target/dependency/richfaces-components-api-javadoc-java-source</directory>
+ <outputDirectory>docs/javadocs/richfaces-components-api/</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>target/dependency/richfaces-components-impl-javadoc-java-source</directory>
+ <outputDirectory>docs/javadocs/richfaces-components-impl/</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>target/dependency/richfaces-components-ui-javadoc-java-source</directory>
+ <outputDirectory>docs/javadocs/richfaces-components-ui/</outputDirectory>
+ </fileSet>
- <binaries>
- <includeDependencies>false</includeDependencies>
- <outputDirectory>artifacts/framework</outputDirectory>
- <outputFileNameMapping>${module.artifactId}-${module.version}.${module.extension}</outputFileNameMapping>
- <unpack>false</unpack>
- </binaries>
- </moduleSet>
+ <!-- jsdoc -->
+ <fileSet>
+ <directory>target/dependency/richfaces-core-impl-jsdoc-java-source</directory>
+ <outputDirectory>docs/jsdoc/richfaces-core-impl/</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>target/dependency/richfaces-components-ui-jsdoc-java-source</directory>
+ <outputDirectory>docs/jsdoc/richfaces-components-ui/</outputDirectory>
+ </fileSet>
+ </fileSets>
+ <moduleSets>
<moduleSet>
<includeSubModules>true</includeSubModules>
<includes>
- <include>org.richfaces.ui:richfaces-components-*</include>
+ <include>org.richfaces.examples:core-demo</include>
+ <include>org.richfaces.examples:richfaces-showcase</include>
</includes>
<sources>
- <outputDirectoryMapping>/</outputDirectoryMapping>
- <excludeSubModuleDirectories>true</excludeSubModuleDirectories>
+ <outputDirectoryMapping>examples/${module.artifactId}</outputDirectoryMapping>
+ <excludeSubModuleDirectories>false</excludeSubModuleDirectories>
<fileSets>
<fileSet>
- <directory>target/apidocs</directory>
- <outputDirectory>docs/javadocs/${module.artifactId}</outputDirectory>
- </fileSet>
- <fileSet>
- <directory>target/site/jsdoc</directory>
- <outputDirectory>docs/jsdocs/${module.artifactId}</outputDirectory>
- </fileSet>
- <fileSet>
- <directory>target</directory>
<includes>
- <include>*-sources.jar</include>
+ <include>src/**</include>
+ <include>readme.txt</include>
+ <include>pom.xml</include>
</includes>
- <outputDirectory>artifacts/ui/</outputDirectory>
</fileSet>
</fileSets>
</sources>
-
- <binaries>
- <includeDependencies>false</includeDependencies>
- <outputDirectory>artifacts/ui</outputDirectory>
- <outputFileNameMapping>${module.artifactId}-${module.version}.${module.extension}</outputFileNameMapping>
- <unpack>false</unpack>
- </binaries>
</moduleSet>
<moduleSet>
<includeSubModules>true</includeSubModules>
<includes>
- <include>org.richfaces.examples:core-demo</include>
- <include>org.richfaces.examples:richfaces-showcase</include>
+ <include>org.richfaces.archetypes:*</include>
</includes>
<sources>
- <outputDirectoryMapping>examples/${module.artifactId}</outputDirectoryMapping>
+ <outputDirectoryMapping>archetypes/${module.artifactId}</outputDirectoryMapping>
<excludeSubModuleDirectories>false</excludeSubModuleDirectories>
<fileSets>
<fileSet>
Modified: root/pom.xml
===================================================================
--- root/pom.xml 2010-05-31 12:43:31 UTC (rev 17404)
+++ root/pom.xml 2010-05-31 12:48:32 UTC (rev 17405)
@@ -11,22 +11,6 @@
<packaging>pom</packaging>
<name>Richfaces Aggregator</name>
- <distributionManagement>
- <downloadUrl>
- http://labs.jboss.com/portal/jbossrichfaces/downloads
- </downloadUrl>
- <repository>
- <id>jboss-releases-repository</id>
- <uniqueVersion>false</uniqueVersion>
- <url>${releaseRepository}</url>
- </repository>
- <snapshotRepository>
- <id>jboss-snapshots-repository</id>
- <uniqueVersion>true</uniqueVersion>
- <url>${snapshotRepository}</url>
- </snapshotRepository>
- </distributionManagement>
-
<modules>
<!-- These trunk settings, and this pom.xml will be removed -->
<!-- Added bom, parent, for temp integration -->
@@ -34,113 +18,35 @@
<module>build/bom/trunk</module>
<!--<module>build/resources/trunk/checkstyle</module>-->
<module>build/resources/trunk/faces-shade-transformers</module>
- <module>commons/${commons.svn.dir}</module>
- <module>core/${core.svn.dir}</module>
- <module>cdk/${cdk.svn.dir}</module>
+ <module>commons/trunk</module>
+ <module>core/trunk</module>
+ <module>cdk/trunk</module>
<!-- richfaces ui -->
- <module>ui/core/${ui.core.svn.dir}</module>
- <module>ui/iteration/${ui.iteration.svn.dir}</module>
- <module>ui/misc/${ui.misc.svn.dir}</module>
- <module>ui/dist/${ui.dist.svn.dir}</module>
+ <module>ui/core/trunk</module>
+ <module>ui/iteration/trunk</module>
+ <module>ui/misc/trunk</module>
+ <module>ui/dist/trunk</module>
<!--<module>ui-sandbox</module>-->
<module>examples</module>
<!--<module>doc/${doc.svn.dir}</module>-->
- <module>archetypes</module>
+ <module>archetypes</module>
</modules>
- <properties>
- <snapshotRepository>
- dav:https://repository.jboss.org/nexus/content/repositories/snapshots/
- </snapshotRepository>
- </properties>
-
<profiles>
<profile>
- <id>trunk</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <properties>
- <core.svn.dir>trunk</core.svn.dir>
- <commons.svn.dir>trunk</commons.svn.dir>
- <cdk.svn.dir>trunk</cdk.svn.dir>
- <ui.core.svn.dir>trunk</ui.core.svn.dir>
- <ui.misc.svn.dir>trunk</ui.misc.svn.dir>
- <ui.dist.svn.dir>trunk</ui.dist.svn.dir>
- <ui.iteration.svn.dir>trunk</ui.iteration.svn.dir>
- <ui-sandbox.svn.dir>trunk</ui-sandbox.svn.dir>
- <examples-sandbox.svn.dir>trunk</examples-sandbox.svn.dir>
- <doc.svn.dir>trunk</doc.svn.dir>
- </properties>
- </profile>
-
- <profile>
<id>sandbox</id>
<modules>
<module>ui-sandbox</module>
- <module>examples-sandbox/${examples-sandbox.svn.dir}</module>
+ <module>examples-sandbox/trunk</module>
</modules>
</profile>
-
<profile>
<id>release</id>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-deploy-plugin</artifactId>
- <configuration>
- <skip>true</skip>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.2-beta-4</version>
- <executions>
- <execution>
- <configuration>
- <finalName>richfaces-${version}</finalName>
- <descriptor>richfaces.xml</descriptor>
- </configuration>
- <id>richfaces</id>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- </execution>
- <execution>
- <configuration>
- <finalName>richfaces-examples-${version}</finalName>
- <descriptor>richfaces-examples.xml</descriptor>
- </configuration>
- <id>richfaces-examples</id>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
+ <modules>
+ <module>dist/trunk</module>
+ </modules>
</profile>
-
- <profile>
- <id>sonar</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <properties>
- <sonar.jdbc.url>jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8
- </sonar.jdbc.url>
- <sonar.jdbc.driver>com.mysql.jdbc.Driver</sonar.jdbc.driver>
- <sonar.jdbc.username>sonar</sonar.jdbc.username>
- <sonar.jdbc.password>sonar</sonar.jdbc.password>
-
- <sonar.host.url>http://localhost:9000</sonar.host.url>
- </properties>
- </profile>
</profiles>
</project>
14 years, 7 months
JBoss Rich Faces SVN: r17404 - in root/examples/richfaces-showcase/trunk/src/main: java/org/richfaces/demo/tables and 8 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2010-05-31 08:43:31 -0400 (Mon, 31 May 2010)
New Revision: 17404
Added:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/CapitalsSortingBean.java
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/subTableToggleControl/
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/subTableToggleControl/subTableToggleControl.xhtml
Removed:
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/subTableToggleControl/tableToggleControl.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/tableToggleControl/
Modified:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/DemoNavigator.java
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/CapitalsBean.java
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/model/cars/InventoryItem.java
root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/dataScrollerAPI.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/simpleScrolling.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/tableSorting.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/tableStyling.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/extendedDataTable/simpleTable.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/functions/functions.xhtml
Log:
tables Sorting
+ some refactoring
+ some minor styling
Modified: root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/DemoNavigator.java
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/DemoNavigator.java 2010-05-31 12:11:11 UTC (rev 17403)
+++ root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/DemoNavigator.java 2010-05-31 12:43:31 UTC (rev 17404)
@@ -4,6 +4,7 @@
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;
@@ -14,7 +15,7 @@
@ManagedBean
@SessionScoped
-public class DemoNavigator implements Serializable{
+public class DemoNavigator implements Serializable {
/**
*
*/
@@ -22,29 +23,35 @@
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 = null;
- private SampleDescriptor currentSample = null;
+ 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;
+ currentSample = null;
}
if (currentDemo == null) {
currentDemo = groups.get(0).getDemos().get(0);
- currentSample=null;
+ currentSample = null;
}
}
return currentDemo;
}
-
+
public SampleDescriptor getCurrentSample() {
String id = getViewParameter(SAMPLE_VIEW_PARAMETER);
if (currentSample == null || !currentSample.getId().equals(id)) {
@@ -53,11 +60,11 @@
}
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);
@@ -92,9 +99,8 @@
if (handler instanceof ConfigurableNavigationHandler) {
ConfigurableNavigationHandler navigationHandler = (ConfigurableNavigationHandler) handler;
- NavigationCase navCase = navigationHandler.getNavigationCase(context, null, getCurrentDemo().getId()
- + SEPARATOR
- + getCurrentSample().getId());
+ NavigationCase navCase = navigationHandler.getNavigationCase(context, null, getCurrentDemo().getId()
+ + SEPARATOR + getCurrentSample().getId());
return navCase.getToViewId(context);
}
Modified: root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/CapitalsBean.java
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/CapitalsBean.java 2010-05-31 12:11:11 UTC (rev 17403)
+++ root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/CapitalsBean.java 2010-05-31 12:43:31 UTC (rev 17404)
@@ -1,5 +1,6 @@
package org.richfaces.demo.tables;
+import java.io.Serializable;
import java.util.List;
import javax.faces.bean.ManagedBean;
@@ -10,11 +11,14 @@
@ManagedBean
@SessionScoped
-public class CapitalsBean {
-
+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
}
@@ -26,6 +30,5 @@
public void setCapitals(List<Capital> capitals) {
this.capitals = capitals;
}
-
-
+
}
Added: root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/CapitalsSortingBean.java
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/CapitalsSortingBean.java (rev 0)
+++ root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/CapitalsSortingBean.java 2010-05-31 12:43:31 UTC (rev 17404)
@@ -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 javax.swing.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;
+ }
+
+}
Modified: root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/model/cars/InventoryItem.java
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/model/cars/InventoryItem.java 2010-05-31 12:11:11 UTC (rev 17403)
+++ root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/model/cars/InventoryItem.java 2010-05-31 12:43:31 UTC (rev 17404)
@@ -1,6 +1,12 @@
package org.richfaces.demo.tables.model.cars;
-public class InventoryItem extends InventoryVendorItem {
+import java.io.Serializable;
+
+public class InventoryItem extends InventoryVendorItem implements Serializable{
+ /**
+ *
+ */
+ private static final long serialVersionUID = 2052446469750935597L;
private String vendor;
public String getVendor() {
Modified: root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2010-05-31 12:11:11 UTC (rev 17403)
+++ root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2010-05-31 12:43:31 UTC (rev 17404)
@@ -239,12 +239,12 @@
</samples>
</demo>
<demo>
- <id>tableToggleControl</id>
- <name>rich:tableToggleControl</name>
+ <id>subTableToggleControl</id>
+ <name>rich:subTableToggleControl</name>
<samples>
<sample>
- <id>tableToggleControl</id>
- <name>Table Basic Usage</name>
+ <id>subTableToggleControl</id>
+ <name>rich:subTableToggleControl Basic Usage</name>
</sample>
</samples>
</demo>
Modified: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/dataScrollerAPI.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/dataScrollerAPI.xhtml 2010-05-31 12:11:11 UTC (rev 17403)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/dataScrollerAPI.xhtml 2010-05-31 12:43:31 UTC (rev 17404)
@@ -4,7 +4,8 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
- xmlns:it="http://richfaces.org/iteration">
+ xmlns:it="http://richfaces.org/iteration"
+ xmlns:fn="http://richfaces.org/misc">
<ui:composition>
<style>
@@ -25,13 +26,13 @@
<h:panelGrid columns="1" rowClasses="calign">
<h:panelGrid columns="3" id="repeat">
<h:graphicImage value="/images/icons/scroller/arr_left.png"
- onclick="document.getElementById('form:ds').richfaces.component.previous()" />
+ onclick="#{fn: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="document.getElementById('form:ds').richfaces.component.next()" />
+ onclick="#{fn:component('ds')}.next()" />
</h:panelGrid>
<it:dataScroller for="pics" id="ds" render="repeat" stepControls="false" boundaryControls="false" fastControls="false" maxPages="10"/>
</h:panelGrid>
Modified: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/simpleScrolling.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/simpleScrolling.xhtml 2010-05-31 12:11:11 UTC (rev 17403)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/simpleScrolling.xhtml 2010-05-31 12:43:31 UTC (rev 17404)
@@ -8,8 +8,11 @@
>
<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">
- <it:dataScroller for="table"/>
+ <it:dataScroller for="table" maxPages="6"/>
<it:dataTable value="#{carsBean.allInventoryItems}" var="car"
id="table" rows="10">
<it:column accept="#{carsFiteringBean.acceptVendor}">
@@ -43,7 +46,7 @@
<h:outputText value="#{car.vin}" />
</it:column>
</it:dataTable>
- <it:dataScroller for="table"/>
+ <it:dataScroller for="table" maxPages="6"/>
</h:form>
</ui:composition>
Modified: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/tableSorting.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/tableSorting.xhtml 2010-05-31 12:11:11 UTC (rev 17403)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/tableSorting.xhtml 2010-05-31 12:43:31 UTC (rev 17404)
@@ -1,41 +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:it="http://richfaces.org/iteration">
+ 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:it="http://richfaces.org/iteration"
+ xmlns:fn="http://richfaces.org/misc">
- <ui:composition>
- <h:form>
- <it:dataTable value="#{carsBean.allCars}" var="car" id="table">
- <it:column>
- <f:facet name="header">
- <h:outputText value="Make" />
- </f:facet>
- <h:outputText value="#{car.make}"/>
- </it:column>
- <it:column>
- <f:facet name="header">
- <h:outputText value="Model" />
- </f:facet>
- <h:outputText value="#{car.model}"/>
- </it:column>
- <it:column>
- <f:facet name="header">
- <h:outputText value="Price" />
- </f:facet>
- <h:outputText value="#{car.price}"/>
- </it:column>
- <it:column>
- <f:facet name="header">
- <h:outputText value="Actions" />
- </f:facet>
- <a4j:commandLink value="Edit" action="#{carsBean.edit}" render="table"/>
- <h:outputText value=" " />
- <a4j:commandLink value="Remove" action="#{carsBean.remove}" render="table"/>
- </it:column>
- </it:dataTable>
- </h:form>
- </ui:composition>
+<ui:composition>
+<p>
+Here is simple example of sorting feature of RichFaces Table component.
+</p>
+ <h:form>
+ <it:dataTable value="#{capitalsBean.capitals}" var="cap" id="table">
+ <it:column>
+ <f:facet name="header">
+ State Flag
+ </f:facet>
+ <h:graphicImage value="#{cap.stateFlag}" />
+ </it:column>
+ <it: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}" />
+ </it:column>
+ <it: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}" />
+ </it:column>
+ <it: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}" />
+ </it:column>
+ </it:dataTable>
+ </h:form>
+</ui:composition>
</html>
\ No newline at end of file
Modified: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/tableStyling.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/tableStyling.xhtml 2010-05-31 12:11:11 UTC (rev 17403)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/tableStyling.xhtml 2010-05-31 12:43:31 UTC (rev 17404)
@@ -52,15 +52,9 @@
</f:facet>
<h:outputText value="#{car.mileage}" />
</it:column>
- <it:column
- filterExpression="#{fn:containsIgnoreCase(car.vin,carFilteringBean.vinFilter)}">
+ <it:column>
<f:facet name="header">
- <h:panelGroup>
<h:outputText value="VIN " />
- <h:inputText value="#{carFilteringBean.vinFilter}">
- <a4j:ajax event="blur" render="form:table" execute="@this" />
- </h:inputText>
- </h:panelGroup>
</f:facet>
<h:outputText value="#{car.vin}" />
</it:column>
Modified: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/extendedDataTable/simpleTable.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/extendedDataTable/simpleTable.xhtml 2010-05-31 12:11:11 UTC (rev 17403)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/extendedDataTable/simpleTable.xhtml 2010-05-31 12:43:31 UTC (rev 17404)
@@ -4,58 +4,58 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
- xmlns:tbl="http://richfaces.org/rich">
+ xmlns:it="http://richfaces.org/iteration">
<ui:composition>
<h:form>
- <tbl:extendedDataTable value="#{carsBean.allInventoryItems}" var="car"
+ <it:extendedDataTable value="#{carsBean.allInventoryItems}" var="car"
id="table" frozenColumns="2" style="height:300px; width:500px;" rowClasses="qwe, qe">
<f:facet name="header">
<h:outputText value="Cars marketplace" />
</f:facet>
- <tbl:column>
+ <it:column>
<f:facet name="header">
<h:outputText value="vendor" />
</f:facet>
<h:outputText value="#{car.vendor}" />
- </tbl:column>
- <tbl:column>
+ </it:column>
+ <it:column>
<f:facet name="header">
<h:outputText value="Model" />
</f:facet>
<h:outputText value="#{car.model}" />
- </tbl:column>
- <tbl:column>
+ </it:column>
+ <it:column>
<f:facet name="header">
<h:outputText value="Price" />
</f:facet>
<h:outputText value="#{car.price}" />
- </tbl:column>
- <tbl:column>
+ </it:column>
+ <it:column>
<f:facet name="header">
<h:outputText value="Mileage" />
</f:facet>
<h:outputText value="#{car.mileage}" />
- </tbl:column>
- <tbl:column>
+ </it:column>
+ <it:column>
<f:facet name="header">
<h:outputText value="VIN Code" />
</f:facet>
<h:outputText value="#{car.vin}" />
- </tbl:column>
- <tbl:column>
+ </it:column>
+ <it:column>
<f:facet name="header">
<h:outputText value="Items stock" />
</f:facet>
<h:outputText value="#{car.stock}" />
- </tbl:column>
- <tbl:column>
+ </it:column>
+ <it:column>
<f:facet name="header">
<h:outputText value="Days Live" />
</f:facet>
<h:outputText value="#{car.daysLive}" />
- </tbl:column>
- </tbl:extendedDataTable>
+ </it:column>
+ </it:extendedDataTable>
<a4j:commandButton value="render" render="table" />
</h:form>
</ui:composition>
Modified: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/functions/functions.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/functions/functions.xhtml 2010-05-31 12:11:11 UTC (rev 17403)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/functions/functions.xhtml 2010-05-31 12:43:31 UTC (rev 17404)
@@ -14,11 +14,11 @@
Here is the current list:
</p>
<ul>
- <li>fn:clientId(id) - returns client Id for component by it's short id.</li>
- <li>fn:element(id) - returns DOM element for the passed short id</li>
- <li>fn:component(id) - returns richfaces client component instance to call some API method.</li>
- <li>fn:isUserInRole(role) - returns is the user has specified role.</li>
- <li>fn:findComponent(id) - returns component instance for given short id</li>
+ <li><b>fn:clientId(id)</b> - returns client Id for component by it's short id.</li>
+ <li><b>fn:element(id)</b> - returns DOM element for the passed short id</li>
+ <li><b>fn:component(id)</b> - returns richfaces client component instance to call some API method.</li>
+ <li><b>fn:isUserInRole(role)</b> - returns is the user has specified role.</li>
+ <li><b>fn:findComponent(id)</b> - returns component instance for given short id</li>
</ul>
<p>For example the result of #{fn: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>
Copied: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/subTableToggleControl (from rev 17400, root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/tableToggleControl)
Copied: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/subTableToggleControl/subTableToggleControl.xhtml (from rev 17400, root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/tableToggleControl/tableToggleControl.xhtml)
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/subTableToggleControl/subTableToggleControl.xhtml (rev 0)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/subTableToggleControl/subTableToggleControl.xhtml 2010-05-31 12:43:31 UTC (rev 17404)
@@ -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:it="http://richfaces.org/iteration">
+
+<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>
+ <it:dataTable value="#{carsBean.inventoryVendorLists}" var="list">
+ <f:facet name="header">
+ <it:columnGroup>
+ <it:column colspan="6">
+ <h:outputText value="Cars marketplace" />
+ </it:column>
+ <it:column breakRowBefore="true">
+ <h:outputText value="Model" />
+ </it:column>
+ <it:column>
+ <h:outputText value="Price" />
+ </it:column>
+ <it:column>
+ <h:outputText value="Mileage" />
+ </it:column>
+ <it:column>
+ <h:outputText value="VIN Code" />
+ </it:column>
+ <it:column>
+ <h:outputText value="Items stock" />
+ </it:column>
+ <it:column>
+ <h:outputText value="Days Live" />
+ </it:column>
+ </it:columnGroup>
+ </f:facet>
+ <it:column colspan="6">
+ <it:subTableToggleControl for="sbtbl"/>
+ <h:outputText value="#{list.vendor}" />
+ </it:column>
+ <it:subTable value="#{list.vendorItems}" var="item" id="sbtbl" expandMode="client">
+ <it:column>
+ <h:outputText value="#{item.model}" />
+ </it:column>
+ <it:column>
+ <h:outputText value="#{item.price}" />
+ </it:column>
+ <it:column>
+ <h:outputText value="#{item.mileage}" />
+ </it:column>
+ <it:column>
+ <h:outputText value="#{item.vin}" />
+ </it:column>
+ <it:column>
+ <h:outputText value="#{item.stock}" />
+ </it:column>
+ <it:column>
+ <h:outputText value="#{item.daysLive}" />
+ </it:column>
+ <f:facet name="footer">
+ <h:outputText value="Total of #{list.vendor} Cars: #{list.count}" />
+ </f:facet>
+ </it:subTable>
+ </it:dataTable>
+ </h:form>
+</ui:composition>
+</html>
\ No newline at end of file
Deleted: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/subTableToggleControl/tableToggleControl.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/tableToggleControl/tableToggleControl.xhtml 2010-05-30 14:01:03 UTC (rev 17400)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/subTableToggleControl/tableToggleControl.xhtml 2010-05-31 12:43:31 UTC (rev 17404)
@@ -1,83 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:a4j="http://richfaces.org/a4j"
- xmlns:it="http://richfaces.org/iteration">
-
-<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>
- <it:dataTable value="#{carsBean.inventoryVendorLists}" var="list">
- <f:facet name="header">
- <it:columnGroup>
- <it:column colspan="6">
- <h:outputText value="Cars marketplace" />
- </it:column>
- <it:column breakRowBefore="true">
- <h:outputText value="Model" />
- </it:column>
- <it:column>
- <h:outputText value="Price" />
- </it:column>
- <it:column>
- <h:outputText value="Mileage" />
- </it:column>
- <it:column>
- <h:outputText value="VIN Code" />
- </it:column>
- <it:column>
- <h:outputText value="Items stock" />
- </it:column>
- <it:column>
- <h:outputText value="Days Live" />
- </it:column>
- </it:columnGroup>
- </f:facet>
- <it:column colspan="6">
- <h:outputText value="#{list.vendor}" />
- <it:subTableToggleControl for="sbtbl">
- <f:facet name="expand">
- <a href="#">(show details)</a>
- </f:facet>
- <f:facet name="collapse">
- <a href="#">(hide details)</a>
- </f:facet>
- </it:subTableToggleControl>
- </it:column>
- <it:subTable value="#{list.vendorItems}" var="item" id="sbtbl" expandMode="client">
- <it:column>
- <h:outputText value="#{item.model}" />
- </it:column>
- <it:column>
- <h:outputText value="#{item.price}" />
- </it:column>
- <it:column>
- <h:outputText value="#{item.mileage}" />
- </it:column>
- <it:column>
- <h:outputText value="#{item.vin}" />
- </it:column>
- <it:column>
- <h:outputText value="#{item.stock}" />
- </it:column>
- <it:column>
- <h:outputText value="#{item.daysLive}" />
- </it:column>
- <f:facet name="footer">
- <h:outputText value="Total of #{list.vendor} Cars: #{list.count}" />
- </f:facet>
- </it:subTable>
- </it:dataTable>
- </h:form>
-</ui:composition>
-</html>
\ No newline at end of file
14 years, 7 months
JBoss Rich Faces SVN: r17403 - root/ui/iteration/trunk/tables/ui/src/main/resources/META-INF/resources.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-05-31 08:11:11 -0400 (Mon, 31 May 2010)
New Revision: 17403
Modified:
root/ui/iteration/trunk/tables/ui/src/main/resources/META-INF/resources/datatable.ecss
Log:
center text in datatable/column footer
Modified: root/ui/iteration/trunk/tables/ui/src/main/resources/META-INF/resources/datatable.ecss
===================================================================
--- root/ui/iteration/trunk/tables/ui/src/main/resources/META-INF/resources/datatable.ecss 2010-05-31 11:16:23 UTC (rev 17402)
+++ root/ui/iteration/trunk/tables/ui/src/main/resources/META-INF/resources/datatable.ecss 2010-05-31 12:11:11 UTC (rev 17403)
@@ -112,6 +112,8 @@
font-size:'#{richSkin.generalSizeFont}';
font-weight:normal;
padding:4px;
+ text-align:center;
+
}
.rf-dt-th{
@@ -140,7 +142,7 @@
font-size:'#{richSkin.generalSizeFont}';
font-weight:bold;
padding:4px;
- text-align:left;
+ text-align:center;
}
.rf-st{
14 years, 7 months
JBoss Rich Faces SVN: r17402 - in root/build/resources/trunk/faces-shade-transformers/src: test and 7 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-05-31 07:16:23 -0400 (Mon, 31 May 2010)
New Revision: 17402
Added:
root/build/resources/trunk/faces-shade-transformers/src/test/
root/build/resources/trunk/faces-shade-transformers/src/test/jars/
root/build/resources/trunk/faces-shade-transformers/src/test/jars/componentcontrol-ui-4.0.0-SNAPSHOT.jar
root/build/resources/trunk/faces-shade-transformers/src/test/jars/functions-ui-4.0.0-SNAPSHOT.jar
root/build/resources/trunk/faces-shade-transformers/src/test/jars/richfaces-ui-core-ui-4.0.0-SNAPSHOT.jar
root/build/resources/trunk/faces-shade-transformers/src/test/java/
root/build/resources/trunk/faces-shade-transformers/src/test/java/org/
root/build/resources/trunk/faces-shade-transformers/src/test/java/org/richfaces/
root/build/resources/trunk/faces-shade-transformers/src/test/java/org/richfaces/build/
root/build/resources/trunk/faces-shade-transformers/src/test/java/org/richfaces/build/shade/
root/build/resources/trunk/faces-shade-transformers/src/test/java/org/richfaces/build/shade/resource/
root/build/resources/trunk/faces-shade-transformers/src/test/java/org/richfaces/build/shade/resource/ShadeMojoTest.java
Log:
Added unit test for faces-shade-transformers
Added: root/build/resources/trunk/faces-shade-transformers/src/test/jars/componentcontrol-ui-4.0.0-SNAPSHOT.jar
===================================================================
(Binary files differ)
Property changes on: root/build/resources/trunk/faces-shade-transformers/src/test/jars/componentcontrol-ui-4.0.0-SNAPSHOT.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/build/resources/trunk/faces-shade-transformers/src/test/jars/functions-ui-4.0.0-SNAPSHOT.jar
===================================================================
(Binary files differ)
Property changes on: root/build/resources/trunk/faces-shade-transformers/src/test/jars/functions-ui-4.0.0-SNAPSHOT.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/build/resources/trunk/faces-shade-transformers/src/test/jars/richfaces-ui-core-ui-4.0.0-SNAPSHOT.jar
===================================================================
(Binary files differ)
Property changes on: root/build/resources/trunk/faces-shade-transformers/src/test/jars/richfaces-ui-core-ui-4.0.0-SNAPSHOT.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/build/resources/trunk/faces-shade-transformers/src/test/java/org/richfaces/build/shade/resource/ShadeMojoTest.java
===================================================================
--- root/build/resources/trunk/faces-shade-transformers/src/test/java/org/richfaces/build/shade/resource/ShadeMojoTest.java (rev 0)
+++ root/build/resources/trunk/faces-shade-transformers/src/test/java/org/richfaces/build/shade/resource/ShadeMojoTest.java 2010-05-31 11:16:23 UTC (rev 17402)
@@ -0,0 +1,78 @@
+/*
+ * 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.build.shade.resource;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.maven.plugins.shade.Shader;
+import org.apache.maven.plugins.shade.filter.Filter;
+import org.apache.maven.plugins.shade.relocation.Relocator;
+import org.apache.maven.plugins.shade.relocation.SimpleRelocator;
+import org.apache.maven.plugins.shade.resource.ResourceTransformer;
+import org.codehaus.plexus.PlexusTestCase;
+
+public class ShadeMojoTest extends PlexusTestCase {
+
+ private Shader shader;
+
+ public void setUp() throws Exception {
+ super.setUp();
+ shader = (Shader) lookup(Shader.ROLE);
+ }
+
+ public void tearDown() throws Exception {
+ super.tearDown();
+ shader = null;
+ }
+
+ private void doShade(File targetFile) throws Exception {
+ List<Filter> filters = new ArrayList<Filter>();
+
+ Set<File> set = new LinkedHashSet<File>();
+
+ File basedir = new File(getBasedir());
+
+ set.add(new File(basedir, "src/test/jars/componentcontrol-ui-4.0.0-SNAPSHOT.jar"));
+ set.add(new File(basedir, "src/test/jars/functions-ui-4.0.0-SNAPSHOT.jar"));
+ set.add(new File(basedir, "src/test/jars/richfaces-ui-core-ui-4.0.0-SNAPSHOT.jar"));
+
+ List<Relocator> relocators = new ArrayList<Relocator>();
+ relocators.add(new SimpleRelocator("/", null, Collections.emptyList()));
+
+ List<ResourceTransformer> resourceTransformers = new ArrayList<ResourceTransformer>();
+
+ resourceTransformers.add(new TaglibXmlResourceTransformer());
+ resourceTransformers.add(new FacesConfigXmlResourceTransformer());
+
+ shader.shade(set, targetFile, filters, relocators, resourceTransformers);
+ }
+
+ public void testShading() throws Exception {
+ doShade(new File("target/ui-shaded.jar"));
+ //TODO nick - check shaded .jar
+ }
+}
14 years, 7 months
JBoss Rich Faces SVN: r17401 - in root/ui/iteration/trunk/tables/ui/src/main: java/org/richfaces/renderkit/html and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-05-31 06:35:05 -0400 (Mon, 31 May 2010)
New Revision: 17401
Added:
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/html/
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/html/images/
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/html/images/ColumnHeaderGradientImage.java
root/ui/iteration/trunk/tables/ui/src/main/resources/META-INF/org.richfaces.renderkit.html.images.ColumnHeaderGradientImage
Modified:
root/ui/iteration/trunk/tables/ui/src/main/resources/META-INF/resources/datatable.ecss
Log:
add gradients
Added: root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/html/images/ColumnHeaderGradientImage.java
===================================================================
--- root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/html/images/ColumnHeaderGradientImage.java (rev 0)
+++ root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/html/images/ColumnHeaderGradientImage.java 2010-05-31 10:35:05 UTC (rev 17401)
@@ -0,0 +1,14 @@
+package org.richfaces.renderkit.html.images;
+
+import org.richfaces.renderkit.html.BaseGradient;
+
+/**
+ * @author Anton Belevich
+ *
+ */
+public class ColumnHeaderGradientImage extends BaseGradient {
+
+ public ColumnHeaderGradientImage() {
+ super("tableSubHeaderBackgroundColor", "tableHeaderBackgroundColor");
+ }
+}
Added: root/ui/iteration/trunk/tables/ui/src/main/resources/META-INF/org.richfaces.renderkit.html.images.ColumnHeaderGradientImage
===================================================================
Modified: root/ui/iteration/trunk/tables/ui/src/main/resources/META-INF/resources/datatable.ecss
===================================================================
--- root/ui/iteration/trunk/tables/ui/src/main/resources/META-INF/resources/datatable.ecss 2010-05-30 14:01:03 UTC (rev 17400)
+++ root/ui/iteration/trunk/tables/ui/src/main/resources/META-INF/resources/datatable.ecss 2010-05-31 10:35:05 UTC (rev 17401)
@@ -59,7 +59,9 @@
border-right-style:solid;
border-right-color:'#{richSkin.tableBorderColor}';
background-color : '#{richSkin.tableHeaderBackgroundColor}';
- color:'#{richSkin.generalTextColor}';
+ background-image : "url(#{resource['org.richfaces.renderkit.html.images.ColumnHeaderGradientImage']})";
+ background-position: top left;
+ color:'#{richSkin.tableHeaderTextColor}';
font-family:'#{richSkin.generalFamilyFont}';
font-size:'#{richSkin.generalSizeFont}';
font-weight:bold;
@@ -80,11 +82,15 @@
border-right-width:'#{richSkin.tableBorderWidth}';
border-right-style:solid;
border-right-color:'#{richSkin.tableBorderColor}';
- background-color:'#{richSkin.tableSubHeaderBackgroundColor}';
- color:'#{richSkin.generalTextColor}';
+ background-color : '#{richSkin.tableHeaderBackgroundColor}';
+ background-image : "url(#{resource['org.richfaces.renderkit.html.images.ColumnHeaderGradientImage']})";
+ background-position: top left;
+ color:'#{richSkin.tableHeaderTextColor}';
font-family:'#{richSkin.generalFamilyFont}';
font-size:'#{richSkin.generalSizeFont}';
+ font-weight:bold;
padding:4px;
+ text-align:center;
}
.rf-dt-sf{
14 years, 7 months
JBoss Rich Faces SVN: r17400 - in root/examples/richfaces-showcase/trunk/src/main: java/org/richfaces/demo/common/navigation and 6 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2010-05-30 10:01:03 -0400 (Sun, 30 May 2010)
New Revision: 17400
Added:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/queue/
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/queue/QueueBean.java
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/attachQueue/
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/attachQueue/attachQueue.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/functions/
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/functions/functions.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/queue/
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/queue/queue.xhtml
Modified:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/GroupDescriptor.java
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/SampleDescriptor.java
root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml
Log:
https://jira.jboss.org/browse/RF-8293
https://jira.jboss.org/browse/RF-8297
Modified: root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/GroupDescriptor.java
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/GroupDescriptor.java 2010-05-30 11:10:00 UTC (rev 17399)
+++ root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/GroupDescriptor.java 2010-05-30 14:01:03 UTC (rev 17400)
@@ -1,11 +1,16 @@
package org.richfaces.demo.common.navigation;
+import java.io.Serializable;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
-public class GroupDescriptor extends BaseDescriptor{
+public class GroupDescriptor extends BaseDescriptor implements Serializable{
+ /**
+ *
+ */
+ private static final long serialVersionUID = -3481702232804120885L;
private List<DemoDescriptor> demos;
@XmlElementWrapper(name="demos")
Modified: root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/SampleDescriptor.java
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/SampleDescriptor.java 2010-05-30 11:10:00 UTC (rev 17399)
+++ root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/SampleDescriptor.java 2010-05-30 14:01:03 UTC (rev 17400)
@@ -1,5 +1,12 @@
package org.richfaces.demo.common.navigation;
-public class SampleDescriptor extends BaseDescriptor{
+import java.io.Serializable;
+public class SampleDescriptor extends BaseDescriptor implements Serializable{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 2704627392818039062L;
+
}
Added: root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/queue/QueueBean.java
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/queue/QueueBean.java (rev 0)
+++ root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/queue/QueueBean.java 2010-05-30 14:01:03 UTC (rev 17400)
@@ -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;
+ }
+
+}
Modified: root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2010-05-30 11:10:00 UTC (rev 17399)
+++ root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2010-05-30 14:01:03 UTC (rev 17400)
@@ -277,6 +277,16 @@
</sample>
</samples>
</demo>
+ <demo>
+ <id>functions</id>
+ <name>RichFaces functions</name>
+ <samples>
+ <sample>
+ <id>functions</id>
+ <name>RichFaces Functions</name>
+ </sample>
+ </samples>
+ </demo>
</demos>
</group>
</root>
Added: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/attachQueue/attachQueue.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/attachQueue/attachQueue.xhtml (rev 0)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/attachQueue/attachQueue.xhtml 2010-05-30 14:01:03 UTC (rev 17400)
@@ -0,0 +1,38 @@
+<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>
+
+<a4j:queue name="buttons_queue" requestDelay="500"></a4j:queue>
+ <h:form>
+ <rich:panel>
+ <h:panelGrid columns="2">
+ <a4j:commandButton value="Set Name to Alex" render="rep">
+ <a4j:attachQueue queueName="buttons_queue" requestGroupingId="group1"/>
+ <a4j:param name="username" value="Alex" assignTo="#{userBean.name}" />
+ </a4j:commandButton>
+
+ <a4j:commandButton value="Set Name to John" render="rep">
+ <a4j:attachQueue queueName="buttons_queue" 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>
+ <a4j:log/>
+</ui:composition>
+
Added: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/functions/functions.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/functions/functions.xhtml (rev 0)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/functions/functions.xhtml 2010-05-30 14:01:03 UTC (rev 17400)
@@ -0,0 +1,34 @@
+<!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://java.sun.com/jsf/composite/rich"
+ xmlns:fn="http://richfaces.org/misc">
+ <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>fn:clientId(id) - returns client Id for component by it's short id.</li>
+ <li>fn:element(id) - returns DOM element for the passed short id</li>
+ <li>fn:component(id) - returns richfaces client component instance to call some API method.</li>
+ <li>fn:isUserInRole(role) - returns is the user has specified role.</li>
+ <li>fn:findComponent(id) - returns component instance for given short id</li>
+ </ul>
+<p>For example the result of #{fn: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="#{fn:findComponent('input').value}" id="out"/>
+ </h:form>
+ <p>One more sample could be found at dataScroller API page. There are fn: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/richfaces-showcase/trunk/src/main/webapp/richfaces/queue/queue.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/queue/queue.xhtml (rev 0)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/queue/queue.xhtml 2010-05-30 14:01:03 UTC (rev 17400)
@@ -0,0 +1,96 @@
+<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>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 points in the example:</p>
+<ul>
+<li>Setting ignoreDupResponces to true reduces the count of DOM updates on typing inside the input. (in initial state count of updates is equals to count of requests)</li>
+<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.
+ <rich:panel>
+ <h:form id="form">
+ <a4j:queue requestDelay="#{queueBean.requestDelay}"
+ ignoreDupResponses="#{queueBean.ignoreDupResponces}"
+ />
+ <h:panelGrid columns="1" width="100%">
+ <h:panelGrid columns="2">
+ <h:outputText value="Type here:" />
+ <h:inputText id="myinput" value="#{queueBean.text}"
+ onkeypress="addEvent();" disabled="#{not (facesContext.maximumSeverity==null)}">
+ <a4j:ajax onbegin="addRequest();" event="keypress" 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>
+ <rich: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>
+ <h:outputText value="Ignore Duplicated Responces" />
+ <h:selectBooleanCheckbox value="#{queueBean.ignoreDupResponces}" />
+ <f:facet name="footer">
+ <h:commandButton value="Apply" action="#{queueBean.resetText}" />
+ </f:facet>
+ </h:panelGrid>
+ </h:panelGrid>
+ </h:form>
+ </rich:panel>
+ <script type="text/javascript">
+ var events=0;
+ var updates=0;
+ var outEvents=document.getElementById('form:events');
+ var outUpdates=document.getElementById('form:updates');
+ var outRequests=document.getElementById('form: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>
+
14 years, 7 months
JBoss Rich Faces SVN: r17399 - in root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces: tableToggleControl and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2010-05-30 07:10:00 -0400 (Sun, 30 May 2010)
New Revision: 17399
Modified:
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/simpleTable.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/tableStyling.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/tableToggleControl/tableToggleControl.xhtml
Log:
dataTable samples corrections according to attributes refactoring.
Modified: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/simpleTable.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/simpleTable.xhtml 2010-05-30 11:07:02 UTC (rev 17398)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/simpleTable.xhtml 2010-05-30 11:10:00 UTC (rev 17399)
@@ -21,7 +21,7 @@
<it:column rowspan="2">
<h:outputText value="subtotals" />
</it:column>
- <it:column breakBefore="true">
+ <it:column breakRowBefore="true">
<h:outputText value="Meals" />
</it:column>
<it:column>
Modified: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/tableStyling.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/tableStyling.xhtml 2010-05-30 11:07:02 UTC (rev 17398)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/tableStyling.xhtml 2010-05-30 11:10:00 UTC (rev 17399)
@@ -8,32 +8,29 @@
xmlns:fn="http://java.sun.com/jsp/jstl/functions">
<ui:composition>
-<style>
-.stable tr:nth-child(even){
- background-color: #FCFFFE;
+ <style>
+.stable tr:nth-child(even) {
+ background-color: #FCFFFE;
}
-.stable tr:nth-child(odd){
+
+.stable tr:nth-child(odd) {
background-color: #ECF3FE;
}
-.active-row{
+
+.active-row {
background-color: #FFEBDA !important;
- cursor:pointer;
+ cursor: pointer;
}
</style>
- <p>This sample shows simple table styling. The table appears in zebra-style and has
- highlighting of hovered row.</p>
+ <p>This sample shows simple table styling. The table appears in
+ zebra-style and has highlighting of hovered row.</p>
<h:form id="form">
<it:dataTable value="#{carsBean.allInventoryItems}" var="car"
- id="table" rows="20" rowClasses = "odd-row, even-row" styleClass="stable">
+ id="table" rows="20" rowClasses="odd-row, even-row"
+ styleClass="stable">
<it:column accept="#{carsFiteringBean.acceptVendor}">
<f:facet name="header">
- <h:panelGroup>
- <h:outputText value="Vendor " />
- <h:selectOneMenu value="#{carsFilteringBean.vendorFilter}">
- <f:selectItems value="#{carsBean.vendorOptions}" />
- <a4j:ajax render="form:table" execute="@this" event="change"/>
- </h:selectOneMenu>
- </h:panelGroup>
+ <h:outputText value="Vendor " />
</f:facet>
<h:outputText value="#{car.vendor}" />
</it:column>
@@ -51,14 +48,7 @@
</it:column>
<it: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>
+ <h:outputText value="Mileage" />
</f:facet>
<h:outputText value="#{car.mileage}" />
</it:column>
Modified: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/tableToggleControl/tableToggleControl.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/tableToggleControl/tableToggleControl.xhtml 2010-05-30 11:07:02 UTC (rev 17398)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/tableToggleControl/tableToggleControl.xhtml 2010-05-30 11:10:00 UTC (rev 17399)
@@ -23,7 +23,7 @@
<it:column colspan="6">
<h:outputText value="Cars marketplace" />
</it:column>
- <it:column breakBefore="true">
+ <it:column breakRowBefore="true">
<h:outputText value="Model" />
</it:column>
<it:column>
@@ -45,14 +45,14 @@
</f:facet>
<it:column colspan="6">
<h:outputText value="#{list.vendor}" />
- <it:toggleControl for="sbtbl">
+ <it:subTableToggleControl for="sbtbl">
<f:facet name="expand">
<a href="#">(show details)</a>
</f:facet>
<f:facet name="collapse">
<a href="#">(hide details)</a>
</f:facet>
- </it:toggleControl>
+ </it:subTableToggleControl>
</it:column>
<it:subTable value="#{list.vendorItems}" var="item" id="sbtbl" expandMode="client">
<it:column>
14 years, 7 months