JBoss Rich Faces SVN: r20444 - modules/docs/trunk/parent.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2010-12-07 20:41:14 -0500 (Tue, 07 Dec 2010)
New Revision: 20444
Modified:
modules/docs/trunk/parent/pom.xml
Log:
Cleaned up spacing in parent pom
Modified: modules/docs/trunk/parent/pom.xml
===================================================================
--- modules/docs/trunk/parent/pom.xml 2010-12-08 01:35:11 UTC (rev 20443)
+++ modules/docs/trunk/parent/pom.xml 2010-12-08 01:41:14 UTC (rev 20444)
@@ -1,226 +1,226 @@
<?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 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.
- -->
+ <!--
+ 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.
+ -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
+ <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.richfaces</groupId>
- <artifactId>richfaces-parent</artifactId>
- <version>10</version>
- </parent>
+ <parent>
+ <groupId>org.richfaces</groupId>
+ <artifactId>richfaces-parent</artifactId>
+ <version>10</version>
+ </parent>
- <groupId>org.richfaces.docs</groupId>
- <artifactId>docs-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- <name>Richfaces Docs: Parent</name>
- <packaging>pom</packaging>
- <url>http://richfaces.org</url>
+ <groupId>org.richfaces.docs</groupId>
+ <artifactId>docs-parent</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <name>Richfaces Docs: Parent</name>
+ <packaging>pom</packaging>
+ <url>http://richfaces.org</url>
- <build>
- <pluginManagement>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jdocbook-plugin</artifactId>
+ <version>2.2.1</version>
+ <extensions>true</extensions>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.pressgang</groupId>
+ <artifactId>pressgang-xslt</artifactId>
+ <version>1.2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jbossorg-jdocbook-style</artifactId>
+ <version>1.1.1</version>
+ <type>jdocbook-style</type>
+ </dependency>
+ </dependencies>
+ <configuration>
+ <sourceDirectory>${project.basedir}/src/main/docbook</sourceDirectory>
+ <sourceDocumentName>${docname}.xml</sourceDocumentName>
+ <masterTranslation>en-US</masterTranslation>
+ <imageResource>
+ <directory>${project.basedir}/src/main/docbook/en-US</directory>
+ <includes>
+ <include>images/*.png</include>
+ </includes>
+ </imageResource>
+ <formats>
+ <format>
+ <formatName>pdf</formatName>
+ <stylesheetResource>classpath:/xslt/org/jboss/pdf.xsl</stylesheetResource>
+ <finalName>${pdf.name}</finalName>
+ </format>
+ <format>
+ <formatName>html</formatName>
+ <stylesheetResource>classpath:/xslt/org/jboss/xhtml.xsl</stylesheetResource>
+ <finalName>index.html</finalName>
+ </format>
+ <format>
+ <formatName>html_single</formatName>
+ <stylesheetResource>classpath:/xslt/org/jboss/xhtml-single.xsl</stylesheetResource>
+ <finalName>index.html</finalName>
+ </format>
+ </formats>
+ <options>
+ <xincludeSupported>true</xincludeSupported>
+ <xmlTransformerType>saxon</xmlTransformerType>
+ <docbookVersion>1.72.0</docbookVersion>
+ <localeSeparator>-</localeSeparator>
+ <injectionDateFormat>dd/MM/yyy</injectionDateFormat>
+ <transformerParameters>
+ <property>
+ <name>javax.xml.parsers.DocumentBuilderFactory</name>
+ <value>org.apache.xerces.jaxp.DocumentBuilderFactoryImpl</value>
+ </property>
+ <property>
+ <name>javax.xml.parsers.SAXParserFactory</name>
+ <value>org.apache.xerces.jaxp.SAXParserFactoryImpl</value>
+ </property>
+ </transformerParameters>
+ </options>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <!--
+ <profiles>
+ <!- mvn compile ->
+ <profile>
+ <id>all</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <build>
<plugins>
- <plugin>
- <groupId>org.jboss.maven.plugins</groupId>
- <artifactId>maven-jdocbook-plugin</artifactId>
- <version>2.2.1</version>
- <extensions>true</extensions>
- <dependencies>
- <dependency>
- <groupId>org.jboss.pressgang</groupId>
- <artifactId>pressgang-xslt</artifactId>
- <version>1.2.0</version>
- </dependency>
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jbossorg-jdocbook-style</artifactId>
- <version>1.1.1</version>
- <type>jdocbook-style</type>
- </dependency>
- </dependencies>
- <configuration>
- <sourceDirectory>${project.basedir}/src/main/docbook</sourceDirectory>
- <sourceDocumentName>${docname}.xml</sourceDocumentName>
- <masterTranslation>en-US</masterTranslation>
- <imageResource>
- <directory>${project.basedir}/src/main/docbook/en-US</directory>
- <includes>
- <include>images/*.png</include>
- </includes>
- </imageResource>
- <formats>
- <format>
- <formatName>pdf</formatName>
- <stylesheetResource>classpath:/xslt/org/jboss/pdf.xsl</stylesheetResource>
- <finalName>${pdf.name}</finalName>
- </format>
- <format>
- <formatName>html</formatName>
- <stylesheetResource>classpath:/xslt/org/jboss/xhtml.xsl</stylesheetResource>
- <finalName>index.html</finalName>
- </format>
- <format>
- <formatName>html_single</formatName>
- <stylesheetResource>classpath:/xslt/org/jboss/xhtml-single.xsl</stylesheetResource>
- <finalName>index.html</finalName>
- </format>
- </formats>
- <options>
- <xincludeSupported>true</xincludeSupported>
- <xmlTransformerType>saxon</xmlTransformerType>
- <docbookVersion>1.72.0</docbookVersion>
- <localeSeparator>-</localeSeparator>
- <injectionDateFormat>dd/MM/yyy</injectionDateFormat>
- <transformerParameters>
- <property>
- <name>javax.xml.parsers.DocumentBuilderFactory</name>
- <value>org.apache.xerces.jaxp.DocumentBuilderFactoryImpl</value>
- </property>
- <property>
- <name>javax.xml.parsers.SAXParserFactory</name>
- <value>org.apache.xerces.jaxp.SAXParserFactoryImpl</value>
- </property>
- </transformerParameters>
- </options>
- </configuration>
- </plugin>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jdocbook-plugin</artifactId>
+ <configuration>
+ <formats>
+ <format>
+ <formatName>pdf</formatName>
+ <stylesheetResource>classpath:/xslt/org/jboss/pdf.xsl</stylesheetResource>
+ <finalName>${docname}.pdf</finalName>
+ </format>
+ <format>
+ <formatName>html</formatName>
+ <stylesheetResource>classpath:/xslt/org/jboss/xhtml.xsl</stylesheetResource>
+ <finalName>index.html</finalName>
+ </format>
+ <format>
+ <formatName>html_single</formatName>
+ <stylesheetResource>classpath:/xslt/org/jboss/xhtml-single.xsl</stylesheetResource>
+ <finalName>index.html</finalName>
+ </format>
+ </formats>
+ </configuration>
+ </plugin>
</plugins>
- </pluginManagement>
- </build>
-
- <!--
- <profiles>
- <!- mvn compile ->
- <profile>
- <id>all</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.jboss.maven.plugins</groupId>
- <artifactId>maven-jdocbook-plugin</artifactId>
- <configuration>
- <formats>
- <format>
- <formatName>pdf</formatName>
- <stylesheetResource>classpath:/xslt/org/jboss/pdf.xsl</stylesheetResource>
- <finalName>${docname}.pdf</finalName>
- </format>
- <format>
- <formatName>html</formatName>
- <stylesheetResource>classpath:/xslt/org/jboss/xhtml.xsl</stylesheetResource>
- <finalName>index.html</finalName>
- </format>
- <format>
- <formatName>html_single</formatName>
- <stylesheetResource>classpath:/xslt/org/jboss/xhtml-single.xsl</stylesheetResource>
- <finalName>index.html</finalName>
- </format>
- </formats>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
+ </build>
+ </profile>
- <!- mvn compile -Phtml ->
- <profile>
- <id>html</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.jboss.maven.plugins</groupId>
- <artifactId>maven-jdocbook-plugin</artifactId>
- <configuration>
- <formats>
- <format>
- <formatName>html</formatName>
- <stylesheetResource>classpath:/xslt/org/jboss/xhtml.xsl</stylesheetResource>
- <finalName>index.html</finalName>
- </format>
- </formats>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
+ <!- mvn compile -Phtml ->
+ <profile>
+ <id>html</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jdocbook-plugin</artifactId>
+ <configuration>
+ <formats>
+ <format>
+ <formatName>html</formatName>
+ <stylesheetResource>classpath:/xslt/org/jboss/xhtml.xsl</stylesheetResource>
+ <finalName>index.html</finalName>
+ </format>
+ </formats>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
- <!- mvn compile -Phtml-single ->
- <profile>
- <id>html-single</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.jboss.maven.plugins</groupId>
- <artifactId>maven-jdocbook-plugin</artifactId>
- <configuration>
- <formats>
- <format>
- <formatName>html_single</formatName>
- <stylesheetResource>classpath:/xslt/org/jboss/xhtml-single.xsl</stylesheetResource>
- <finalName>index.html</finalName>
- </format>
- </formats>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
+ <!- mvn compile -Phtml-single ->
+ <profile>
+ <id>html-single</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jdocbook-plugin</artifactId>
+ <configuration>
+ <formats>
+ <format>
+ <formatName>html_single</formatName>
+ <stylesheetResource>classpath:/xslt/org/jboss/xhtml-single.xsl</stylesheetResource>
+ <finalName>index.html</finalName>
+ </format>
+ </formats>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
- <!- mvn compile -Ppdf ->
- <profile>
- <id>pdf</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.jboss.maven.plugins</groupId>
- <artifactId>maven-jdocbook-plugin</artifactId>
- <configuration>
- <formats>
- <format>
- <formatName>pdf</formatName>
- <stylesheetResource>classpath:/xslt/org/jboss/pdf.xsl</stylesheetResource>
- <finalName>${docname}.pdf</finalName>
- </format>
- </formats>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
- -->
+ <!- mvn compile -Ppdf ->
+ <profile>
+ <id>pdf</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jdocbook-plugin</artifactId>
+ <configuration>
+ <formats>
+ <format>
+ <formatName>pdf</formatName>
+ <stylesheetResource>classpath:/xslt/org/jboss/pdf.xsl</stylesheetResource>
+ <finalName>${docname}.pdf</finalName>
+ </format>
+ </formats>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+ -->
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/trunk/parent</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/trunk/parent</developerConnection>
- <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/trunk/parent</url>
- </scm>
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/trunk/parent</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/trunk/parent</developerConnection>
+ <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/trunk/parent</url>
+ </scm>
</project>
14 years, 1 month
JBoss Rich Faces SVN: r20443 - modules/docs/trunk/parent.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2010-12-07 20:35:11 -0500 (Tue, 07 Dec 2010)
New Revision: 20443
Modified:
modules/docs/trunk/parent/pom.xml
Log:
Added workaround for RF-8903 as per MPJDOCBOOK-55
Modified: modules/docs/trunk/parent/pom.xml
===================================================================
--- modules/docs/trunk/parent/pom.xml 2010-12-08 01:33:34 UTC (rev 20442)
+++ modules/docs/trunk/parent/pom.xml 2010-12-08 01:35:11 UTC (rev 20443)
@@ -86,6 +86,7 @@
<xmlTransformerType>saxon</xmlTransformerType>
<docbookVersion>1.72.0</docbookVersion>
<localeSeparator>-</localeSeparator>
+ <injectionDateFormat>dd/MM/yyy</injectionDateFormat>
<transformerParameters>
<property>
<name>javax.xml.parsers.DocumentBuilderFactory</name>
14 years, 1 month
JBoss Rich Faces SVN: r20442 - in modules/docs/trunk: Component_Reference/src/main/docbook/en-US/extras and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2010-12-07 20:33:34 -0500 (Tue, 07 Dec 2010)
New Revision: 20442
Added:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richfileUpload-Basic_usage.xml_sample
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/Component_Reference.xml
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Rich_inputs.xml
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Trees.xml
modules/docs/trunk/parent/pom.xml
Log:
Draft of fileUpload. Cleaned up spacing.
Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/Component_Reference.xml
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/Component_Reference.xml 2010-12-08 00:59:05 UTC (rev 20441)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/Component_Reference.xml 2010-12-08 01:33:34 UTC (rev 20442)
@@ -3,7 +3,7 @@
]>
<book status="draft">
<xi:include href="Book_Info.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <!--
+ <!--
<xi:include href="Preface.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
-->
<xi:include href="chap-Component_Reference-Introduction.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
@@ -22,12 +22,10 @@
<xi:include href="chap-Component_Reference-Rich_inputs.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="chap-Component_Reference-Panels_and_containers.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="chap-Component_Reference-Tables_and_grids.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <!--
<xi:include href="chap-Component_Reference-Trees.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- -->
<xi:include href="chap-Component_Reference-Menus_and_toolbars.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="chap-Component_Reference-Output_and_messages.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <!--
+ <xi:include href="chap-Component_Reference-Output_and_messages.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <!--
<xi:include href="chap-Component_Reference-Drag_and_drop.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-->
<xi:include href="chap-Component_Reference-Layout_and_appearance.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Rich_inputs.xml
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Rich_inputs.xml 2010-12-08 00:59:05 UTC (rev 20441)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Rich_inputs.xml 2010-12-08 01:33:34 UTC (rev 20442)
@@ -417,89 +417,134 @@
The <sgmltag><rich:editor></sgmltag> component provides a fully-featured word processor. It features manageable global configurations, and support for Seam text, custom plug-ins, and a customized look and feel. The editor is fully based on the TinyMCE JavaScript editor control, supporting all TinyMCE's parameters, and is adapted for the <acronym>JSF</acronym> environment with some additional capabilities.
</para>
</section>
-
+ -->
+
+ <!--rich:fileUpload>-->
<section id="sect-Component_Reference-Rich_inputs-richfileUpload">
<title><sgmltag><rich:fileUpload></sgmltag></title>
<para>
- The <sgmltag><rich:fileUpload></sgmltag> component allows the user to upload files to a server. It features multiple uploads, automatic uploads, progress bars, restrictions on file types and sizes to be uploaded, and an embedded flash module.
+ The <sgmltag><rich:fileUpload></sgmltag> component allows the user to upload files to a server. It features multiple uploads, automatic uploads, progress bars, restrictions on file types and sizes to be uploaded, and an embedded Flash module.
</para>
- <para>
- Files are uploaded to either the temporary folder (different for each operating system) or to <acronym>RAM</acronym> (random-access memory), depending on the value of the <parameter>createTempFile</parameter> parameter of the Ajax4jsf Filter section in the <filename>web.xml</filename> for the project.
- </para>
- <para>
- Basic usage requires the <varname>uploadData</varname> attribute, pointing to the collection of uploaded files.
- </para>
- <example id="exam-Component_Reference-richfileUpload-Basic_usage_of_richfileUpload">
- <title>Basic usage of <sgmltag><rich:fileUpload></sgmltag></title>
-
-<programlisting language="XML" role="XML">
-<rich:fileUpload uploadData="#{bean.data}" />
-</programlisting>
- </example>
- <para>
- The <varname>fileUploadListener</varname> attribute can be used to call a function on the server side after each file is uploaded.
- </para>
- <para>
- The <varname>immediateUpload</varname> attribute can be set to <literal>true</literal> to upload files as soon as they are added to the list, rather than waiting for the user to press the <guibutton>Upload</guibutton>. The <varname>autoclear</varname> attribute can be set to <literal>true</literal> to automatically remove files from the list once they have been successfully uploaded.
- </para>
- <para>
- The <sgmltag><rich:fileUpload></sgmltag> component can place restrictions on the files that can be uploaded. The <varname>acceptedTypes</varname> attribute restricts the file types to just those listed. The <varname>maxFilesQuantity</varname> attribute restricts the maximum number of files that can be uploaded. Size restrictions can be placed on individual files by setting the <parameter>maxRequestSize</parameter> parameter of the Ajax4jsf Filter section in the <filename>web.xml</filename> file for the project.
- </para>
- <para>
- There are a number of event handlers specifc to the <sgmltag><rich:fileUpload></sgmltag> component:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <varname>onadd</varname> is triggered before a file is added to the list.
- </para>
- </listitem>
- <listitem>
- <para>
- <varname>onupload</varname> is triggered before a file is uploaded.
- </para>
- </listitem>
- <listitem>
- <para>
- <varname>onuploadcomplete</varname> is triggered after all files in the list have finished uploading.
- </para>
- </listitem>
- <listitem>
- <para>
- <varname>onuploadcanceled</varname> is triggered after an upload has been canceled.
- </para>
- </listitem>
- <listitem>
- <para>
- <varname>onerror</varname> is triggered when an error occurs during the upload process.
- </para>
- </listitem>
- </itemizedlist>
- <para>
- The <sgmltag><rich:fileUpload></sgmltag> component has an embedded Flash module that adds extra functionality. To enable the Flash module, set <code>allowFlash="true"</code>. The Flash module adds additional features to file selection, such as the ability to choose multiple files at once and the filtering of files by their type. Additionally, the Flash module provides a smoother animation of the progress bar during the upload process, as the progress polling is performed by Flash rather than Ajax.
- </para>
- <para>
- The text labels used in the component can be completely customized. Labels for the various controls of the component can be set using <varname>addControlLabel</varname>, <varname>clearAllControlLabel</varname>, <varname>clearControlLabel</varname>, <varname>stopEntryControlLabel</varname>, and <varname>uploadControlLabel</varname>. The status label for the upload can be set using the <varname>label</varname> attribute and the following wildcards:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <code>{B} {KB} {MB}</code>: the full size of the file to be uploaded, measured in bytes, kilobytes and megabytes respectively.
- </para>
- </listitem>
- <listitem>
- <para>
- <code>{_B} {_KB} {_MB}</code>: the amount of data uploaded so far, measured in bytes, kilobytes and megabytes respectively.
- </para>
- </listitem>
- <listitem>
- <para>
- <code>{ss} {mm} {hh}</code>: the elapsed time in seconds, minutes and hours respectively.
- </para>
- </listitem>
- </itemizedlist>
+
+ <section id="sect-Component_Reference-richfileUpload-Basic_usage">
+ <title>Basic usage</title>
+ <para>
+ Basic usage requires the <varname>uploadData</varname> attribute, pointing to the collection of uploaded files.
+ </para>
+ <example id="exam-Component_Reference-richfileUpload-Basic_usage">
+ <title>Basic usage</title>
+ <programlisting language="XML" role="XML"><xi:include parse="text" href="extras/exam-Component_Reference-richfileUpload-Basic_usage.xml_sample" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ </example>
+ </section>
+
+ <section id="sect-Component_Reference-richfileUpload-Interactivity_options">
+ <title>Interactivity options</title>
+ <para>
+ Files are uploaded to either the temporary folder (different for each operating system) or to <acronym>RAM</acronym> (random-access memory), depending on the value of the <parameter>createTempFile</parameter> parameter of the Ajax4jsf Filter section in the <filename>web.xml</filename> for the project.
+ </para>
+ <para>
+ Use the <varname>fileUploadListener</varname> attribute to call a function on the server side after each file is uploaded.
+ </para>
+ <para>
+ Set the <varname>immediateUpload</varname> attribute to <literal>true</literal> to upload files as soon as they are added to the list, rather than waiting for the user to press the <guibutton>Upload</guibutton> button. Set the <varname>autoclear</varname> attribute to <literal>true</literal> to automatically remove files from the list once they have been successfully uploaded.
+ </para>
+ <para>
+ The <sgmltag><rich:fileUpload></sgmltag> component can place restrictions on the files that can be uploaded. The <varname>acceptedTypes</varname> attribute restricts the file types to just those listed. The <varname>maxFilesQuantity</varname> attribute restricts the maximum number of files that can be uploaded. To enforce size restrictions on individual files, set the <parameter>maxRequestSize</parameter> parameter of the Ajax4jsf Filter section in the <filename>web.xml</filename> file for the project.
+ </para>
+ <para>
+ The text labels used in the component can be completely customized. Labels for the various controls of the component can be set using <varname>addControlLabel</varname>, <varname>clearAllControlLabel</varname>, <varname>clearControlLabel</varname>, <varname>stopEntryControlLabel</varname>, and <varname>uploadControlLabel</varname>. The status label for the upload can be set using the <varname>label</varname> attribute and the following wildcards:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <code>{B} {KB} {MB}</code>: the full size of the file to be uploaded, measured in bytes, kilobytes and megabytes respectively.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>{_B} {_KB} {_MB}</code>: the amount of data uploaded so far, measured in bytes, kilobytes and megabytes respectively.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>{ss} {mm} {hh}</code>: the elapsed time in seconds, minutes and hours respectively.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="sect-Component_Reference-richfileUpload-Flash_module">
+ <title>Flash module</title>
+ <para>
+ The <sgmltag><rich:fileUpload></sgmltag> component has an embedded Flash module that adds extra functionality. To enable the Flash module, set <code>allowFlash="true"</code>. The Flash module adds additional features to file selection, such as the ability to choose multiple files at once and the filtering of files by their type. Additionally, the Flash module provides a smoother animation of the progress bar during the upload process, as the progress polling is performed by Flash rather than Ajax.
+ </para>
+ </section>
+
+ <section id="sect-Component_Reference-richfileUpload-richfileUpload_client-side_events">
+ <title><sgmltag><rich:fileUpload></sgmltag> client-side events</title>
+ <para>
+ There are a number of event handlers specific to the <sgmltag><rich:fileUpload></sgmltag> component:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <varname>onadd</varname> is triggered before a file is added to the list.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <varname>onupload</varname> is triggered before a file is uploaded.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <varname>onuploadcomplete</varname> is triggered after all files in the list have finished uploading.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <varname>onuploadcanceled</varname> is triggered after an upload has been canceled.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <varname>onerror</varname> is triggered when an error occurs during the upload process.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="sect-Component_Reference-richfileUpload-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>: <classname>org.richfaces.fileUpload</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>: <classname>org.richfaces.component.html.HtmlFileUpload</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>: <classname>org.richfaces.fileUpload</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>: <classname>org.richfaces.renderkit.inplaceFileUpload</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>tag-class</parameter>: <classname>org.richfaces.taglib.fileUploadTag</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
</section>
- -->
<!--<rich:inplaceInput>-->
<section id="sect-Component_Reference-Rich_inputs-richinplaceInput">
Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml 2010-12-08 00:59:05 UTC (rev 20441)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml 2010-12-08 01:33:34 UTC (rev 20442)
@@ -1266,10 +1266,10 @@
Tables entries can be sorted by the user through either the basic method built in to the <sgmltag><rich:column></sgmltag> component, or by defining external sorting algorithms. Refer to <xref linkend="sect-Component_Reference-Tables_and_grids-richcolumn" /> for details on using the <sgmltag><rich:column></sgmltag> component in tables.
</para>
<note>
- <title>Sorting non-English tables</title>
- <para>
- To sort a table whose contents are not in English, add the <literal>org.richfaces.datatableUsesViewLocale</literal> context parameter to the project's <filename>web.xml</filename> settings file. Set the value of the context parameter to <literal>true</literal>.
- </para>
+ <title>Sorting non-English tables</title>
+ <para>
+ To sort a table whose contents are not in English, add the <literal>org.richfaces.datatableUsesViewLocale</literal> context parameter to the project's <filename>web.xml</filename> settings file. Set the value of the context parameter to <literal>true</literal>.
+ </para>
</note>
<section id="sect-Component_Reference-Tables_and_grids-Basic_sorting">
Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Trees.xml
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Trees.xml 2010-12-08 00:59:05 UTC (rev 20441)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Trees.xml 2010-12-08 01:33:34 UTC (rev 20442)
@@ -3,9 +3,19 @@
]>
<chapter id="chap-Component_Reference-Trees">
<title>Trees</title>
+ <!-- In development notification -->
+ <important>
+ <title>Documentation in development</title>
+ <para>
+ Some concepts covered in this chapter may refer to the previous version of <productname>Richfaces</productname>, version 3.3.3. This chapter is scheduled for review to ensure all information is up to date.
+ </para>
+ </important>
<para>
- Incomplete
+ Read this chapter for details on components that use tree structures.
</para>
+
+ <!-- TODO not in M5 -->
+ <!--
<section id="sect-Component_Reference-Trees-richchangeExpandListener">
<title><sgmltag><rich:changeExpandListener></sgmltag></title>
<para>
@@ -26,6 +36,7 @@
Incomplete
</para>
</section>
+ -->
<section id="sect-Component_Reference-Trees-richtree">
<title><sgmltag><rich:tree></sgmltag></title>
Added: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richfileUpload-Basic_usage.xml_sample
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richfileUpload-Basic_usage.xml_sample (rev 0)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richfileUpload-Basic_usage.xml_sample 2010-12-08 01:33:34 UTC (rev 20442)
@@ -0,0 +1 @@
+<rich:fileUpload uploadData="#{bean.data}" />
Modified: modules/docs/trunk/parent/pom.xml
===================================================================
--- modules/docs/trunk/parent/pom.xml 2010-12-08 00:59:05 UTC (rev 20441)
+++ modules/docs/trunk/parent/pom.xml 2010-12-08 01:33:34 UTC (rev 20442)
@@ -82,20 +82,20 @@
</format>
</formats>
<options>
- <xincludeSupported>true</xincludeSupported>
- <xmlTransformerType>saxon</xmlTransformerType>
- <docbookVersion>1.72.0</docbookVersion>
- <localeSeparator>-</localeSeparator>
- <transformerParameters>
- <property>
- <name>javax.xml.parsers.DocumentBuilderFactory</name>
- <value>org.apache.xerces.jaxp.DocumentBuilderFactoryImpl</value>
- </property>
- <property>
- <name>javax.xml.parsers.SAXParserFactory</name>
- <value>org.apache.xerces.jaxp.SAXParserFactoryImpl</value>
- </property>
- </transformerParameters>
+ <xincludeSupported>true</xincludeSupported>
+ <xmlTransformerType>saxon</xmlTransformerType>
+ <docbookVersion>1.72.0</docbookVersion>
+ <localeSeparator>-</localeSeparator>
+ <transformerParameters>
+ <property>
+ <name>javax.xml.parsers.DocumentBuilderFactory</name>
+ <value>org.apache.xerces.jaxp.DocumentBuilderFactoryImpl</value>
+ </property>
+ <property>
+ <name>javax.xml.parsers.SAXParserFactory</name>
+ <value>org.apache.xerces.jaxp.SAXParserFactoryImpl</value>
+ </property>
+ </transformerParameters>
</options>
</configuration>
</plugin>
14 years, 1 month
JBoss Rich Faces SVN: r20441 - in branches/RF-8742-1/ui/validator/ui: src/test/java/org/richfaces/convert and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2010-12-07 19:59:05 -0500 (Tue, 07 Dec 2010)
New Revision: 20441
Added:
branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/convert/MockConverterTest.java
branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/convert/TestCriteria.java
Modified:
branches/RF-8742-1/ui/validator/ui/pom.xml
Log:
CODING IN PROGRESS - issue RF-9217: CSV: development tests for client side(qunit)
https://jira.jboss.org/browse/RF-9217
Modified: branches/RF-8742-1/ui/validator/ui/pom.xml
===================================================================
--- branches/RF-8742-1/ui/validator/ui/pom.xml 2010-12-07 23:18:08 UTC (rev 20440)
+++ branches/RF-8742-1/ui/validator/ui/pom.xml 2010-12-08 00:59:05 UTC (rev 20441)
@@ -104,6 +104,12 @@
<artifactId>jsf-test-jetty</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.jboss.test-jsf</groupId>
+ <artifactId>jsf-test-qunit</artifactId>
+ <version>1.0.6-SNAPSHOT</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<scm>
Added: branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/convert/MockConverterTest.java
===================================================================
--- branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/convert/MockConverterTest.java (rev 0)
+++ branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/convert/MockConverterTest.java 2010-12-08 00:59:05 UTC (rev 20441)
@@ -0,0 +1,61 @@
+package org.richfaces.convert;
+
+import static org.junit.Assert.*;
+
+import java.util.List;
+
+import org.jboss.test.faces.mock.MockFacesEnvironment;
+import org.jboss.test.qunit.Qunit;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+
+import com.google.common.collect.ImmutableList;
+
+(a)RunWith(Parameterized.class)
+public class MockConverterTest {
+
+ @Rule
+ public final Qunit qunit = Qunit.builder().loadJsfResource("jquery.js").loadJsfResource("richfaces.js")
+ .loadJsfResource("richfaces-event.js").loadJsfResource("richfaces-csv.js", "org.richfaces").loadJsfResource("resource.js").build();
+
+ private final TestCriteria criteria;
+
+ private MockFacesEnvironment facesEnvironment;
+
+ public MockConverterTest(TestCriteria criteria) {
+ this.criteria = criteria;
+ }
+
+ @Before
+ public void setUp(){
+ this.facesEnvironment = MockFacesEnvironment.createEnvironment();
+ }
+
+ @After
+ public void tearDown(){
+ this.facesEnvironment.release();
+ this.facesEnvironment = null;
+ }
+ @Test
+ public void testConvert() throws Exception {
+
+ }
+
+ @Parameters
+ public static List<TestCriteria[]> getTestCriterias() {
+ return ImmutableList.of(pass("true"), pass("ok"), fail("123"));
+ }
+
+ private static TestCriteria[] pass(String string) {
+ return new TestCriteria[] { new TestCriteria(string) };
+ }
+
+ private static TestCriteria[] fail(String string) {
+ return new TestCriteria[] { new TestCriteria(string) };
+ }
+}
Property changes on: branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/convert/MockConverterTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/convert/TestCriteria.java
===================================================================
--- branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/convert/TestCriteria.java (rev 0)
+++ branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/convert/TestCriteria.java 2010-12-08 00:59:05 UTC (rev 20441)
@@ -0,0 +1,20 @@
+package org.richfaces.convert;
+
+public class TestCriteria {
+
+ private final String string;
+
+ public TestCriteria(String string) {
+ this.string = string;
+
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the string
+ */
+ public String getString() {
+ return string;
+ }
+
+}
Property changes on: branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/convert/TestCriteria.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 1 month
JBoss Rich Faces SVN: r20440 - in modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest: richExtendedDataTable and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-12-07 18:18:08 -0500 (Tue, 07 Dec 2010)
New Revision: 20440
Added:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richExtendedDataTable/TestExtendedDataTableSelection.java
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractComponentAttributes.java
Log:
added selection test for rich:extendedDataTable (RFPL-918)
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractComponentAttributes.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractComponentAttributes.java 2010-12-07 23:01:11 UTC (rev 20439)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractComponentAttributes.java 2010-12-07 23:18:08 UTC (rev 20440)
@@ -57,7 +57,7 @@
}
protected String getProperty(String propertyName) {
- final ElementLocator<?> locator = propertyLocator.format(propertyName);
+ final ElementLocator<?> locator = propertyLocator.format(propertyName, "");
return selenium.getValue(locator);
}
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richExtendedDataTable/TestExtendedDataTableSelection.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richExtendedDataTable/TestExtendedDataTableSelection.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richExtendedDataTable/TestExtendedDataTableSelection.java 2010-12-07 23:18:08 UTC (rev 20440)
@@ -0,0 +1,252 @@
+/*******************************************************************************
+ * 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.ftest.richExtendedDataTable;
+
+import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+import static org.richfaces.tests.metamer.ftest.richExtendedDataTable.TestExtendedDataTableSelection.Modifier.CTRL;
+import static org.richfaces.tests.metamer.ftest.richExtendedDataTable.TestExtendedDataTableSelection.Modifier.SHIFT;
+import static org.testng.Assert.assertEquals;
+
+import java.net.URL;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.TreeSet;
+
+import org.apache.commons.lang.ArrayUtils;
+import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang.math.IntRange;
+import org.jboss.test.selenium.framework.AjaxSelenium;
+import org.jboss.test.selenium.framework.AjaxSeleniumProxy;
+import org.jboss.test.selenium.locator.JQueryLocator;
+import org.jboss.test.selenium.utils.array.ArrayTransform;
+import org.jboss.test.selenium.waiting.retrievers.Retriever;
+import org.richfaces.tests.metamer.ftest.abstractions.AbstractDataTableTest;
+import org.richfaces.tests.metamer.ftest.model.ExtendedDataTable;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+/**
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
+ */
+public class TestExtendedDataTableSelection extends AbstractDataTableTest {
+
+ SelectionModel selection = new SelectionModel();
+ Collection<Integer> selected;
+
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath, "faces/components/richExtendedDataTable/selection.xhtml");
+ }
+
+ @BeforeClass
+ public void setupModel() {
+ model = new ExtendedDataTable(pjq("div.rf-edt[id$=richEDT]"));
+ }
+
+ @BeforeMethod
+ public void setupAttributes() {
+ attributes.setRows(10);
+ selected = new TreeSet<Integer>();
+ }
+
+ @Test
+ public void testSimpleSelection() {
+ selection.click(2);
+
+ assertEquals(selection.getPrevious(), selection());
+ assertEquals(selection.getCurrent(), selection(2));
+ }
+
+ @Test
+ public void testMultiSelectionUsingControl() {
+ Collection<Integer> forSelection = order(2, 5, 29, 16, 13, 21);
+
+ try {
+ for (int s : forSelection) {
+ selection.click(s, CTRL);
+
+ assertEquals(selection.getPrevious(), selected);
+ selected.add(s);
+ assertEquals(selection.getCurrent(), selected);
+ }
+ } catch (RuntimeException e) {
+ throw e;
+ }
+ }
+
+ @Test
+ public void testMultiSelectionUsingShiftOnOnePage() {
+ IntRange range = new IntRange(2, 5);
+
+ selection.click(range.getMinimumInteger());
+ selection.click(range.getMaximumInteger(), SHIFT);
+
+ assertEquals(selection.getPrevious(), selection(range.getMinimumInteger()));
+ assertEquals(selection.getCurrent(), selection(range));
+ }
+
+ @Test
+ public void testMultiSelectionUsingShiftBetweenPagesInReversedOrder() {
+ IntRange range = new IntRange(12, 35);
+
+ selection.click(range.getMaximumInteger());
+ selection.click(range.getMinimumInteger(), SHIFT);
+
+ assertEquals(selection.getPrevious(), selection(range.getMaximumInteger()));
+ assertEquals(selection.getCurrent(), selection(range));
+ }
+
+ @Test
+ public void testMultiSelectionUsingCtrlAndShiftCombinations() {
+ IntRange range1 = new IntRange(2, 14);
+ IntRange range2 = new IntRange(18, 31);
+
+ selection.click(range1.getMaximumInteger());
+ selection.click(range1.getMinimumInteger(), SHIFT);
+ selected.addAll(selection(range1));
+ verifySelected();
+
+ selection.click(range2.getMaximumInteger(), CTRL);
+ selected.addAll(selection(range2.getMaximumInteger()));
+ verifySelected();
+
+ selection.click(range2.getMinimumInteger(), CTRL, SHIFT);
+ selected.addAll(selection(range2));
+ verifySelected();
+ }
+
+ @Test
+ public void testMultiSelectionRemovingUsingCtrl() {
+ IntRange range1 = new IntRange(2, 14);
+
+ selection.click(range1.getMaximumInteger());
+ selection.click(range1.getMinimumInteger(), SHIFT);
+ selected.addAll(selection(range1));
+ verifySelected();
+
+ selection.click(4, CTRL);
+ selected.remove(4);
+ verifySelected();
+
+ selection.click(12, CTRL);
+ selected.remove(12);
+ verifySelected();
+ }
+
+ private Collection<Integer> order(int... selection) {
+ return Arrays.asList(ArrayUtils.toObject(selection));
+ }
+
+ private Collection<Integer> selection(int... selection) {
+ return new TreeSet<Integer>(order(selection));
+ }
+
+ private Collection<Integer> selection(IntRange range) {
+ return selection(range.toArray());
+ }
+
+ private void verifySelected() {
+ assertEquals(selection.getCurrent(), selected);
+ }
+
+ private class SelectionModel {
+ Retriever<String> retrieveCurrent = retrieveText.locator(pjq("span.currentSelection"));
+ Retriever<String> retrievePrevious = retrieveText.locator(pjq("span.previousSelection"));
+
+ public Collection<Integer> getCurrent() {
+ return getSelection(retrieveCurrent.retrieve());
+ }
+
+ public Collection<Integer> getPrevious() {
+ return getSelection(retrievePrevious.retrieve());
+ }
+
+ private Collection<Integer> getSelection(String selectionString) {
+ String[] splitted = StringUtils.split(selectionString, "[], ");
+ Integer[] transformed = new ArrayTransform<String, Integer>(Integer.class) {
+ @Override
+ public Integer transformation(String source) {
+ return Integer.valueOf(source);
+ }
+ }.transform(splitted);
+ return new TreeSet<Integer>(Arrays.asList(transformed));
+ }
+
+ public void click(int index, Modifier... modifiers) {
+ int page = getPageForIndex(index);
+ dataScroller2.gotoPage(page);
+
+ int row = getRowForIndex(index);
+ JQueryLocator element = model.getElement(1, row);
+
+ retrieveCurrent.initializeValue();
+ for (Modifier modifier : modifiers) {
+ modifier.down();
+ }
+ selenium.click(element);
+ for (Modifier modifier : modifiers) {
+ modifier.up();
+ }
+ waitAjax.waitForChange(retrieveCurrent);
+ }
+
+ private int getPageForIndex(int index) {
+ int rows = attributes.getRows();
+ return (index / rows) + 1;
+ }
+
+ private int getRowForIndex(int index) {
+ return 1 + index - ((dataScroller2.getCurrentPage() - 1) * attributes.getRows());
+ }
+ }
+
+ enum Modifier {
+ CTRL, SHIFT;
+
+ AjaxSelenium selenium = AjaxSeleniumProxy.getInstance();
+
+ public void up() {
+ switch (this) {
+ case CTRL:
+ selenium.controlKeyUp();
+ break;
+ case SHIFT:
+ selenium.shiftKeyUp();
+ break;
+ }
+ }
+
+ public void down() {
+ switch (this) {
+ case CTRL:
+ selenium.controlKeyDown();
+ break;
+ case SHIFT:
+ selenium.shiftKeyDown();
+ break;
+ }
+ }
+ }
+
+}
14 years, 1 month
JBoss Rich Faces SVN: r20439 - in modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer: bean and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-12-07 18:01:11 -0500 (Tue, 07 Dec 2010)
New Revision: 20439
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/CollectionConverter.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/ValueConverter.java
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attribute.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataTableBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichExtendedDataTableBean.java
Log:
Attribute supports conversion of String or Collection to the expected types (incl. the possibility to define collection's member type
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attribute.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attribute.java 2010-12-07 17:15:38 UTC (rev 20438)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attribute.java 2010-12-07 23:01:11 UTC (rev 20439)
@@ -22,9 +22,7 @@
package org.richfaces.tests.metamer;
import java.io.Serializable;
-import java.util.Arrays;
import java.util.Collection;
-import java.util.LinkedList;
import java.util.List;
import javax.faces.model.SelectItem;
@@ -32,7 +30,6 @@
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -50,6 +47,7 @@
private String name;
private Object value;
private Class<?> type;
+ private Class<?> memberType = Object.class;
private String help;
private List<SelectItem> selectOptions;
private Extensions extensions;
@@ -73,14 +71,23 @@
}
public Object getValue() {
+ if (value == null && type != null) {
+ if (Collection.class.isAssignableFrom(type)) {
+ CollectionConverter collectionConverter = new CollectionConverter(type, memberType);
+ value = collectionConverter.convert(null);
+ }
+ }
return value;
}
public void setValue(Object value) {
- if (value instanceof String) {
- if (type == Collection.class) {
- String[] splitted = StringUtils.split((String) value, ",[] ");
- value = new LinkedList<String>(Arrays.asList(splitted));
+ if (type != null) {
+ if (value instanceof String || value instanceof Collection) {
+ if (Collection.class.isAssignableFrom(type)) {
+ CollectionConverter collectionConverter = new CollectionConverter(type, memberType);
+ this.value = collectionConverter.convert(value);
+ return;
+ }
}
}
this.value = value;
@@ -130,6 +137,14 @@
public void setType(Class<?> type) {
this.type = type;
}
+
+ public Class<?> getMemberType() {
+ return memberType;
+ }
+
+ public void setMemberType(Class<?> memberType) {
+ this.memberType = memberType;
+ }
public boolean isBool() {
return type == Boolean.class || type == boolean.class;
Added: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/CollectionConverter.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/CollectionConverter.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/CollectionConverter.java 2010-12-07 23:01:11 UTC (rev 20439)
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * 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;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.apache.commons.lang.StringUtils;
+
+/**
+ * @author <a href="mailto:lfryc@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+public final class CollectionConverter<E, C extends Collection<E>> {
+
+ Class<C> collectionClass;
+ Class<E> memberClass;
+
+ public CollectionConverter(Class<?> collectionClass, Class<?> memberClass) {
+ this.collectionClass = (Class<C>) collectionClass;
+ this.memberClass = (Class<E>) memberClass;
+ }
+
+ public static <E, C extends Collection<E>> CollectionConverter<E, Collection<E>> getInstance(
+ Class<E> collectionClass, Class<C> memberClass) {
+ return new CollectionConverter<E, Collection<E>>(collectionClass, memberClass);
+ }
+
+ public C convert(Object value) {
+ Collection<?> collection = getTransformedValue(value);
+
+ if (collection.isEmpty()) {
+ return createCollection();
+ }
+
+ ValueConverter<E> memberConverter = ValueConverter.getInstance(memberClass);
+
+ C result = createCollection();
+
+ for (Object object : collection) {
+ result.add(memberConverter.convert(object));
+ }
+
+ return result;
+ }
+
+ private Collection<? extends Object> getTransformedValue(Object value) {
+ if (value == null) {
+ return Collections.EMPTY_LIST;
+ } else if (value instanceof String) {
+ String[] splitted = StringUtils.split((String) value, ",[] ");
+ return Arrays.asList(splitted);
+ } else if (value instanceof Collection) {
+ return (Collection) value;
+ } else {
+ throw new UnsupportedOperationException("the value '" + value + "' of class " + value.getClass()
+ + " is not supported in collection transformer");
+ }
+ }
+
+ private C createCollection() {
+ try {
+ return getConcreteClass().newInstance();
+ } catch (Exception e) {
+ throw new IllegalStateException("wasn't able to construct new collection of given type ("
+ + collectionClass.getName() + ")");
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ private Class<? extends C> getConcreteClass() {
+ if (!collectionClass.isInterface()) {
+ return collectionClass;
+ } else {
+ if (Set.class.isAssignableFrom(collectionClass)) {
+ return (Class<? extends C>) (Object) TreeSet.class;
+ }
+ if (Collection.class.isAssignableFrom(collectionClass)) {
+ return (Class<? extends C>) (Object) LinkedList.class;
+ }
+ throw new IllegalStateException("Unsupported collection of interface '" + collectionClass.getName() + "'");
+ }
+ }
+}
Added: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/ValueConverter.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/ValueConverter.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/ValueConverter.java 2010-12-07 23:01:11 UTC (rev 20439)
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * 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;
+
+import java.lang.reflect.Constructor;
+
+/**
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
+ */
+public final class ValueConverter<T> {
+
+ Class<T> type;
+
+ private ValueConverter(Class<?> type) {
+ this.type = (Class<T>) type;
+ }
+
+ public static <T> ValueConverter<T> getInstance(Class<T> type) {
+ return new ValueConverter<T>(type);
+ }
+
+ public T convert(Object value) {
+ if (value == null) {
+ return null;
+ } else if (type.isAssignableFrom(String.class)) {
+ return (T) value;
+ } else if (value instanceof String) {
+ return construct(value);
+ } else {
+ throw new UnsupportedOperationException("Can't convert the object of '" + value.getClass().getName()
+ + "' to '" + type.getName() + "'");
+ }
+ }
+
+ private T construct(Object value) {
+ try {
+ return getConstructor().newInstance(value);
+ } catch (Exception e) {
+ throw new UnsupportedOperationException("Can't construct the object of class '" + type.getName()
+ + "' from String");
+ }
+
+ }
+
+ public Constructor<T> getConstructor() {
+ try {
+ return type.getConstructor(String.class);
+ } catch (Exception e) {
+ throw new UnsupportedOperationException("Can't construct the object of class '" + type.getName()
+ + "' from String");
+ }
+ }
+
+}
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataTableBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataTableBean.java 2010-12-07 17:15:38 UTC (rev 20438)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataTableBean.java 2010-12-07 23:01:11 UTC (rev 20439)
@@ -22,7 +22,6 @@
package org.richfaces.tests.metamer.bean;
import java.io.Serializable;
-import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
@@ -92,7 +91,6 @@
attributes.setAttribute("rendered", true);
attributes.setAttribute("rows", 10);
- attributes.get("sortPriority").setType(Collection.class);
// hidden attributes
attributes.remove("filteringListeners");
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichExtendedDataTableBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichExtendedDataTableBean.java 2010-12-07 17:15:38 UTC (rev 20438)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichExtendedDataTableBean.java 2010-12-07 23:01:11 UTC (rev 20439)
@@ -25,6 +25,7 @@
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
+import java.util.TreeSet;
import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
@@ -92,6 +93,10 @@
attributes.setAttribute("rows", 30);
attributes.setAttribute("styleClass", "extended-data-table");
attributes.setAttribute("style", null);
+
+ // setup types
+ attributes.get("selection").setType(TreeSet.class);
+ attributes.get("selection").setMemberType(Integer.class);
// hidden attributes
attributes.remove("filterVar");
14 years, 1 month
JBoss Rich Faces SVN: r20438 - in modules/tests/metamer/trunk/application/src/main: webapp/components/richProgressBar and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-12-07 12:15:38 -0500 (Tue, 07 Dec 2010)
New Revision: 20438
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/static.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichProgressBarBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/ajaxMode.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/clientMode.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/list.xhtml
Log:
https://jira.jboss.org/browse/RFPL-864
* samples for progress bar fixed
* new sample with static progress bar added
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichProgressBarBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichProgressBarBean.java 2010-12-07 15:33:15 UTC (rev 20437)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichProgressBarBean.java 2010-12-07 17:15:38 UTC (rev 20438)
@@ -48,6 +48,9 @@
private Attributes attributes;
private boolean buttonRendered = true;
private Long startTime;
+ private boolean initialFacetRendered = true;
+ private boolean finishFacetRendered = true;
+ private boolean childrenRendered = false;
/**
* Initializes the managed bean.
@@ -60,9 +63,10 @@
attributes = Attributes.getUIComponentAttributes(UIProgressBar.class, getClass());
attributes.setAttribute("maxValue", 100);
- attributes.setAttribute("minValue", -1);
+ attributes.setAttribute("minValue", 0);
attributes.setAttribute("interval", 1000);
attributes.setAttribute("rendered", true);
+ attributes.setAttribute("value", -1);
// attributes tested in another way
attributes.remove("mode");
@@ -77,8 +81,8 @@
}
public String startProcess() {
- attributes.get("enabled").setValue(true);
- setButtonRendered(false);
+ attributes.setAttribute("enabled", true);
+ buttonRendered = false;
setStartTime(new Date().getTime());
return null;
}
@@ -87,16 +91,16 @@
if (Boolean.TRUE.equals(attributes.get("enabled").getValue())) {
Long current = (new Date().getTime() - startTime) / 1000;
if (current > 100) {
- setButtonRendered(true);
+ buttonRendered = true;
} else if (current.equals(0L)) {
- return new Long(1);
+ return 1L;
}
return (new Date().getTime() - startTime) / 1000;
}
if (startTime == null) {
- return Long.valueOf(-1);
+ return -1L;
} else {
- return Long.valueOf(101);
+ return 101L;
}
}
@@ -115,4 +119,28 @@
public void setButtonRendered(boolean buttonRendered) {
this.buttonRendered = buttonRendered;
}
+
+ public boolean isFinishFacetRendered() {
+ return finishFacetRendered;
+ }
+
+ public void setFinishFacetRendered(boolean finishFacetRendered) {
+ this.finishFacetRendered = finishFacetRendered;
+ }
+
+ public boolean isInitialFacetRendered() {
+ return initialFacetRendered;
+ }
+
+ public void setInitialFacetRendered(boolean initialFacetRendered) {
+ this.initialFacetRendered = initialFacetRendered;
+ }
+
+ public boolean isChildrenRendered() {
+ return childrenRendered;
+ }
+
+ public void setChildrenRendered(boolean childrenRendered) {
+ this.childrenRendered = childrenRendered;
+ }
}
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/ajaxMode.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/ajaxMode.xhtml 2010-12-07 15:33:15 UTC (rev 20437)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/ajaxMode.xhtml 2010-12-07 17:15:38 UTC (rev 20438)
@@ -41,7 +41,6 @@
<ui:define name="component">
<rich:progressBar id="progressBar"
- comleteClass="#{richProgressBarBean.attributes['completeClass'].value}"
data="#{richProgressBarBean.attributes['data'].value}"
enabled="#{richProgressBarBean.attributes['enabled'].value}"
finishClass="#{richProgressBarBean.attributes['finishClass'].value}"
@@ -56,6 +55,7 @@
onclick="#{richProgressBarBean.attributes['onclick'].value}"
oncomplete="#{richProgressBarBean.attributes['oncomplete'].value}"
ondblclick="#{richProgressBarBean.attributes['ondblclick'].value}"
+ onfinish="#{richProgressBarBean.attributes['onfinish'].value}"
onmousedown="#{richProgressBarBean.attributes['onmousedown'].value}"
onmousemove="#{richProgressBarBean.attributes['onmousemove'].value}"
onmouseout="#{richProgressBarBean.attributes['onmouseout'].value}"
@@ -63,9 +63,11 @@
onmouseup="#{richProgressBarBean.attributes['onmouseup'].value}"
onsubmit="#{richProgressBarBean.attributes['onsubmit'].value}"
parameters="#{richProgressBarBean.attributes['parameters'].value}"
- reRenderAfterComplete="#{richProgressBarBean.attributes['reRenderAfterComplete'].value}"
- remainClass="#{richProgressBarBean.attributes['remainClass'].value}"
+ progressClass="#{richProgressBarBean.attributes['progressClass'].value}"
+ remainingClass="#{richProgressBarBean.attributes['remainingClass'].value}"
rendered="#{richProgressBarBean.attributes['rendered'].value}"
+ style="#{richProgressBarBean.attributes['style'].value}"
+ styleClass="#{richProgressBarBean.attributes['styleClass'].value}"
value="#{richProgressBarBean.currentValue}"
>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/clientMode.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/clientMode.xhtml 2010-12-07 15:33:15 UTC (rev 20437)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/clientMode.xhtml 2010-12-07 17:15:38 UTC (rev 20438)
@@ -63,7 +63,6 @@
</script>
<rich:progressBar id="progressBar"
- comleteClass="#{richProgressBarBean.attributes['completeClass'].value}"
data="#{richProgressBarBean.attributes['data'].value}"
enabled="#{richProgressBarBean.attributes['enabled'].value}"
finishClass="#{richProgressBarBean.attributes['finishClass'].value}"
@@ -76,6 +75,7 @@
mode="client"
onbeforedomupdate="#{richProgressBarBean.attributes['onbeforedomupdate'].value}"
onclick="#{richProgressBarBean.attributes['onclick'].value}"
+ onfinish="#{richProgressBarBean.attributes['onfinish'].value}"
oncomplete="#{richProgressBarBean.attributes['oncomplete'].value}"
ondblclick="#{richProgressBarBean.attributes['ondblclick'].value}"
onmousedown="#{richProgressBarBean.attributes['onmousedown'].value}"
@@ -85,9 +85,11 @@
onmouseup="#{richProgressBarBean.attributes['onmouseup'].value}"
onsubmit="#{richProgressBarBean.attributes['onsubmit'].value}"
parameters="#{richProgressBarBean.attributes['parameters'].value}"
- reRenderAfterComplete="#{richProgressBarBean.attributes['reRenderAfterComplete'].value}"
- remainClass="#{richProgressBarBean.attributes['remainClass'].value}"
+ progressClass="#{richProgressBarBean.attributes['progressClass'].value}"
+ remainingClass="#{richProgressBarBean.attributes['remainingClass'].value}"
rendered="#{richProgressBarBean.attributes['rendered'].value}"
+ style="#{richProgressBarBean.attributes['style'].value}"
+ styleClass="#{richProgressBarBean.attributes['styleClass'].value}"
value="#{richProgressBarBean.currentValue}"
>
<f:facet name="initial">
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/list.xhtml 2010-12-07 15:33:15 UTC (rev 20437)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/list.xhtml 2010-12-07 17:15:38 UTC (rev 20438)
@@ -32,12 +32,16 @@
<ui:define name="links">
<metamer:testPageLink id="ajaxMode" outcome="ajaxMode" value="Ajax Mode">
- Simple page containing <b>rich:progressBar</b> in ajax mode and input boxes for all its attributes.
+ Simple page containing a <b>rich:progressBar</b> in ajax mode and input boxes for all its attributes.
</metamer:testPageLink>
<metamer:testPageLink id="clientMode" outcome="clientMode" value="Client Mode">
- Simple page containing <b>rich:progressBar</b> in client mode and input boxes for all its attributes.
+ Simple page containing a <b>rich:progressBar</b> in client mode and input boxes for all its attributes.
</metamer:testPageLink>
+
+ <metamer:testPageLink id="static" outcome="static" value="Static">
+ Simple page containing a static <b>rich:progressBar</b>. Can be used for testing styling attributes, min value, max value etc.
+ </metamer:testPageLink>
</ui:define>
</ui:composition>
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/static.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/static.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/static.xhtml 2010-12-07 17:15:38 UTC (rev 20438)
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:metamer="http://java.sun.com/jsf/composite/metamer"
+ xmlns:rich="http://richfaces.org/rich" xmlns:a4j="http://richfaces.org/a4j">
+
+ <!--
+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.
+ -->
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="head">
+ <f:metadata>
+ <f:viewParam name="templates" value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ </ui:define>
+
+ <ui:define name="component">
+ <h:panelGrid id="settingsPanel" columns="2">
+ Children rendered: <h:selectBooleanCheckbox value="#{richProgressBarBean.childrenRendered}" onclick="submit()" />
+ 'initial' facet rendered: <h:selectBooleanCheckbox value="#{richProgressBarBean.initialFacetRendered}" onclick="submit()" />
+ 'finish' facet rendered: <h:selectBooleanCheckbox value="#{richProgressBarBean.finishFacetRendered}" onclick="submit()" />
+ </h:panelGrid>
+
+ <rich:progressBar id="progressBar"
+ data="#{richProgressBarBean.attributes['data'].value}"
+ enabled="#{richProgressBarBean.attributes['enabled'].value}"
+ finishClass="#{richProgressBarBean.attributes['finishClass'].value}"
+ focus="#{richProgressBarBean.attributes['focus'].value}"
+ initialClass="#{richProgressBarBean.attributes['initialClass'].value}"
+ interval="#{richProgressBarBean.attributes['interval'].value}"
+ label="#{richProgressBarBean.attributes['label'].value}"
+ maxValue="#{richProgressBarBean.attributes['maxValue'].value}"
+ minValue="#{richProgressBarBean.attributes['minValue'].value}"
+ mode="client"
+ onbeforedomupdate="#{richProgressBarBean.attributes['onbeforedomupdate'].value}"
+ onclick="#{richProgressBarBean.attributes['onclick'].value}"
+ oncomplete="#{richProgressBarBean.attributes['oncomplete'].value}"
+ ondblclick="#{richProgressBarBean.attributes['ondblclick'].value}"
+ onfinish="#{richProgressBarBean.attributes['onfinish'].value}"
+ onmousedown="#{richProgressBarBean.attributes['onmousedown'].value}"
+ onmousemove="#{richProgressBarBean.attributes['onmousemove'].value}"
+ onmouseout="#{richProgressBarBean.attributes['onmouseout'].value}"
+ onmouseover="#{richProgressBarBean.attributes['onmouseover'].value}"
+ onmouseup="#{richProgressBarBean.attributes['onmouseup'].value}"
+ onsubmit="#{richProgressBarBean.attributes['onsubmit'].value}"
+ parameters="#{richProgressBarBean.attributes['parameters'].value}"
+ progressClass="#{richProgressBarBean.attributes['progressClass'].value}"
+ remainingClass="#{richProgressBarBean.attributes['remainingClass'].value}"
+ rendered="#{richProgressBarBean.attributes['rendered'].value}"
+ style="#{richProgressBarBean.attributes['style'].value}"
+ styleClass="#{richProgressBarBean.attributes['styleClass'].value}"
+ value="#{richProgressBarBean.attributes['value'].value}"
+ >
+
+ <h:outputText value="child + " rendered="#{richProgressBarBean.childrenRendered}" />
+
+ <f:facet name="initial">
+ <h:panelGroup rendered="#{richProgressBarBean.initialFacetRendered}">
+ <h:outputText id="initialOutput" value="Initial" />
+ </h:panelGroup>
+ </f:facet>
+ <f:facet name="finish">
+ <h:panelGroup rendered="#{richProgressBarBean.finishFacetRendered}">
+ <h:outputText id="completeOutput" value="Complete"/>
+ </h:panelGroup>
+ </f:facet>
+ </rich:progressBar>
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richProgressBarBean.attributes}" id="attributes" render="log"/>
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
14 years, 1 month
JBoss Rich Faces SVN: r20437 - trunk/examples/richfaces-showcase/src/main/webapp/richfaces/inputNumberSlider/samples.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2010-12-07 10:33:15 -0500 (Tue, 07 Dec 2010)
New Revision: 20437
Modified:
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/inputNumberSlider/samples/sliders-sample.xhtml
Log:
minor syntax corrections
Modified: trunk/examples/richfaces-showcase/src/main/webapp/richfaces/inputNumberSlider/samples/sliders-sample.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/inputNumberSlider/samples/sliders-sample.xhtml 2010-12-07 13:10:01 UTC (rev 20436)
+++ trunk/examples/richfaces-showcase/src/main/webapp/richfaces/inputNumberSlider/samples/sliders-sample.xhtml 2010-12-07 15:33:15 UTC (rev 20437)
@@ -8,22 +8,22 @@
<p>Here is an example of default inputNumberSlider:</p>
- <rich:inputNumberSlider value="#{50}" />
+ <rich:inputNumberSlider value="50" />
<p>Here is "minimalistic" input:</p>
- <rich:inputNumberSlider value="#{50}" showInput="false"
+ <rich:inputNumberSlider value="50" showInput="false"
enableManualInput="false" showBoundaryValues="false"
showToolTip="false" />
<p>Another variation of input:</p>
- <rich:inputNumberSlider value="#{500}" width="500" maxValue="#{1000}"
- step="#{50}" showArrows="true" showToolTip="false" />
+ <rich:inputNumberSlider value="500" width="500" maxValue="1000"
+ step="50" showArrows="true" showToolTip="false" />
<p>The same variant but the control disabled:</p>
- <rich:inputNumberSlider value="#{500}" width="500" maxValue="#{1000}"
- step="#{50}" showArrows="true" showToolTip="false" disabled="true" />
+ <rich:inputNumberSlider value="500" width="500" maxValue="1000"
+ step="50" showArrows="true" showToolTip="false" disabled="true" />
</ui:composition>
\ No newline at end of file
14 years, 1 month
JBoss Rich Faces SVN: r20436 - in modules/tests/metamer/trunk/application/src/main/webapp/components: richExtendedDataTable and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-12-07 08:10:01 -0500 (Tue, 07 Dec 2010)
New Revision: 20436
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/components1.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/components2.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/facets.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/filtering.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/scroller.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/sorting-using-column.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/sorting-using-component-control.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/components1.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/components2.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/facets.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/filtering.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/scroller.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/selection.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/sorting-using-column.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/sorting-using-component-control.xhtml
Log:
reimplemented rich:dataTable and rich:extendedDataTable samples using absolute addressing (RFPL-952, RFPL-912, RFPL-918)
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/components1.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/components1.xhtml 2010-12-07 13:08:57 UTC (rev 20435)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/components1.xhtml 2010-12-07 13:10:01 UTC (rev 20436)
@@ -27,6 +27,7 @@
-->
<ui:composition template="/templates/template.xhtml">
+ <ui:param name="componentId" value="richDataTable" />
<ui:define name="head">
<f:metadata>
@@ -41,10 +42,10 @@
<br/>
<h:outputText value="Show data in table: " />
<h:selectBooleanCheckbox id="noDataCheckbox" value="#{richDataTableBean.state}">
- <a4j:ajax render="richDataTable scroller1"/>
+ <a4j:ajax render="#{nestedComponentId} scroller1"/>
</h:selectBooleanCheckbox>
<br/><br/>
- <rich:dataScroller id="scroller1" for="richDataTable" page="#{richDataTableBean.page}" maxPages="7" render="richDataTable"/>
+ <rich:dataScroller id="scroller1" for="richDataTable" page="#{richDataTableBean.page}" maxPages="7" render="#{nestedComponentId}"/>
</ui:define>
<ui:define name="component">
@@ -174,7 +175,7 @@
</rich:column>
<f:facet name="footer">
- <rich:dataScroller id="scroller2" for="richDataTable" page="#{richDataTableBean.page}" maxPages="7" render="richDataTable" />
+ <rich:dataScroller id="scroller2" for="richDataTable" page="#{richDataTableBean.page}" maxPages="7" render="richDataTable scroller1" />
</f:facet>
</rich:dataTable>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/components2.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/components2.xhtml 2010-12-07 13:08:57 UTC (rev 20435)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/components2.xhtml 2010-12-07 13:10:01 UTC (rev 20436)
@@ -27,7 +27,8 @@
-->
<ui:composition template="/templates/template.xhtml">
-
+ <ui:param name="componentId" value="richDataTable" />
+
<ui:define name="head">
<f:metadata>
<f:viewParam name="templates" value="#{templateBean.templates}">
@@ -41,10 +42,10 @@
<br/>
<h:outputText value="Show data in table: " />
<h:selectBooleanCheckbox id="noDataCheckbox" value="#{richDataTableBean.state}">
- <a4j:ajax render="richDataTable scroller1"/>
+ <a4j:ajax render="#{nestedComponentId} scroller1"/>
</h:selectBooleanCheckbox>
<br/><br/>
- <rich:dataScroller id="scroller1" for="richDataTable" page="#{richDataTableBean.page}" maxPages="7" render="richDataTable"/>
+ <rich:dataScroller id="scroller1" for="richDataTable" page="#{richDataTableBean.page}" maxPages="7" render="#{nestedComponentId}"/>
</ui:define>
<ui:define name="component">
@@ -182,7 +183,7 @@
</rich:column>
<f:facet name="footer">
- <rich:dataScroller id="scroller2" for="richDataTable" page="#{richDataTableBean.page}" maxPages="7" render="richDataTable" />
+ <rich:dataScroller id="scroller2" for="richDataTable" page="#{richDataTableBean.page}" maxPages="7" render="richDataTable scroller1" />
</f:facet>
</rich:dataTable>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/facets.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/facets.xhtml 2010-12-07 13:08:57 UTC (rev 20435)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/facets.xhtml 2010-12-07 13:10:01 UTC (rev 20436)
@@ -27,6 +27,7 @@
-->
<ui:composition template="/templates/template.xhtml">
+ <ui:param name="componentId" value="richDataTable" />
<ui:define name="head">
<f:metadata>
@@ -41,7 +42,7 @@
<br/>
<h:outputText value="Show data in table: " />
<h:selectBooleanCheckbox id="noDataCheckbox" value="#{richDataTableBean.state}">
- <a4j:ajax render="richDataTable scroller1"/>
+ <a4j:ajax render="#{nestedComponentId}"/>
</h:selectBooleanCheckbox>
<br/><br/>
</ui:define>
@@ -106,7 +107,7 @@
<ui:define name="outOfTemplateAfter">
- <a4j:ajax render="richDataTable">
+ <a4j:ajax render="#{nestedComponentId}">
<h:panelGrid columns="2">
<h:outputLabel value="No Data Facet: " />
<h:inputText id="noDataInput" value="#{richDataTableBean.facets['noData']}" />
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/filtering.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/filtering.xhtml 2010-12-07 13:08:57 UTC (rev 20435)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/filtering.xhtml 2010-12-07 13:10:01 UTC (rev 20436)
@@ -28,6 +28,7 @@
-->
<ui:composition template="/templates/template.xhtml">
+ <ui:param name="componentId" value="richDataTable" />
<ui:define name="head">
<f:metadata>
@@ -42,10 +43,10 @@
<br/>
<h:outputText value="Show data in table: " />
<h:selectBooleanCheckbox id="noDataCheckbox" value="#{richDataTableBean.state}">
- <a4j:ajax render="richDataTable scroller1"/>
+ <a4j:ajax render="#{nestedComponentId} scroller1"/>
</h:selectBooleanCheckbox>
<br/><br/>
- <rich:dataScroller id="scroller1" for="richDataTable" page="#{richDataTableBean.page}" maxPages="7" render="richDataTable"/>
+ <rich:dataScroller id="scroller1" for="richDataTable" page="#{richDataTableBean.page}" maxPages="7" render="#{nestedComponentId}"/>
</ui:define>
<ui:define name="component">
@@ -160,7 +161,7 @@
</rich:column>
<f:facet name="footer">
- <rich:dataScroller id="scroller2" for="richDataTable" page="#{richDataTableBean.page}" maxPages="7" render="richDataTable" />
+ <rich:dataScroller id="scroller2" for="richDataTable" page="#{richDataTableBean.page}" maxPages="7" render="richDataTable scroller1" />
</f:facet>
</rich:dataTable>
</ui:define>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/scroller.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/scroller.xhtml 2010-12-07 13:08:57 UTC (rev 20435)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/scroller.xhtml 2010-12-07 13:10:01 UTC (rev 20436)
@@ -2,7 +2,8 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j"
- xmlns:metamer="http://java.sun.com/jsf/composite/metamer" xmlns:rich="http://richfaces.org/rich">
+ xmlns:metamer="http://java.sun.com/jsf/composite/metamer" xmlns:rich="http://richfaces.org/rich"
+ xmlns:c="http://java.sun.com/jsp/jstl/core">
<!--
JBoss, Home of Professional Open Source
@@ -27,6 +28,7 @@
-->
<ui:composition template="/templates/template.xhtml">
+ <ui:param name="componentId" value="richDataTable" />
<ui:define name="head">
<f:metadata>
@@ -41,14 +43,16 @@
<br/>
<h:outputText value="Show data in table: " />
<h:selectBooleanCheckbox id="noDataCheckbox" value="#{richDataTableBean.state}">
- <a4j:ajax render="richDataTable scroller1"/>
+ <a4j:ajax render="#{nestedComponentId}" />
</h:selectBooleanCheckbox>
+
<br/><br/>
- <rich:dataScroller id="scroller1" for="richDataTable" page="#{richDataTableBean.page}" maxPages="7" render="richDataTable"/>
+
+ <rich:dataScroller id="scroller1" for="richDataTable" page="#{richDataTableBean.page}" maxPages="7" render="#{nestedComponentId}"/>
</ui:define>
<ui:define name="component">
-
+
<rich:dataTable id="richDataTable"
filterVar="#{richDataTableBean.attributes['filterVar'].value}"
filteringListeners="#{richDataTableBean.attributes['filteringListeners'].value}"
@@ -108,14 +112,14 @@
</rich:column>
<f:facet name="footer">
- <rich:dataScroller id="scroller2" for="richDataTable" page="#{richDataTableBean.page}" maxPages="7" render="richDataTable" />
+ <rich:dataScroller id="scroller2" for="richDataTable" page="#{richDataTableBean.page}" maxPages="7" render="richDataTable scroller1" />
</f:facet>
</rich:dataTable>
</ui:define>
<ui:define name="outOfTemplateAfter">
-
+
<fieldset>
<legend>scroller1</legend>
@@ -143,23 +147,25 @@
<br/>
<fieldset>
+ <c:set var="nestedScrollerId" value="#{nestedComponentId}:scroller2" />
+
<legend>scroller2</legend>
<h:commandButton id="buttonFirst2" value="<< first">
- <rich:componentControl event="click" target="#{rich:clientId('scroller2')}" operation="switchToPage">
+ <rich:componentControl event="click" target="#{nestedScrollerId}" operation="switchToPage">
<f:param value="first" />
</rich:componentControl>
</h:commandButton>
<h:commandButton id="buttonPrev2" value="< previous">
- <rich:componentControl event="click" target="#{rich:clientId('scroller2')}" operation="previous" />
+ <rich:componentControl event="click" target="#{nestedScrollerId}" operation="previous" />
</h:commandButton>
<h:commandButton id="buttonNext2" value="next >">
- <rich:componentControl event="click" target="#{rich:clientId('scroller2')}" operation="next" />
+ <rich:componentControl event="click" target="#{nestedScrollerId}" operation="next" />
</h:commandButton>
<h:commandButton id="buttonLast2" value="last >>">
- <rich:componentControl event="click" target="#{rich:clientId('scroller2')}" operation="switchToPage">
+ <rich:componentControl event="click" target="#{nestedScrollerId}" operation="switchToPage">
<f:param value="last" />
</rich:componentControl>
</h:commandButton>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/simple.xhtml 2010-12-07 13:08:57 UTC (rev 20435)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/simple.xhtml 2010-12-07 13:10:01 UTC (rev 20436)
@@ -27,7 +27,8 @@
-->
<ui:composition template="/templates/template.xhtml">
-
+ <ui:param name="componentId" value="richDataTable" />
+
<ui:define name="head">
<f:metadata>
<f:viewParam name="templates" value="#{templateBean.templates}">
@@ -41,7 +42,7 @@
<br/>
<h:outputText value="Show data in table: " />
<h:selectBooleanCheckbox id="noDataCheckbox" value="#{richDataTableBean.state}">
- <a4j:ajax render="richDataTable scroller1"/>
+ <a4j:ajax render="#{nestedComponentId}" />
</h:selectBooleanCheckbox>
<br/><br/>
</ui:define>
@@ -72,7 +73,6 @@
</ui:define>
<ui:define name="outOfTemplateAfter">
-
<metamer:attributes value="#{richDataTableBean.attributes}" id="attributes" />
</ui:define>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/sorting-using-column.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/sorting-using-column.xhtml 2010-12-07 13:08:57 UTC (rev 20435)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/sorting-using-column.xhtml 2010-12-07 13:10:01 UTC (rev 20436)
@@ -27,6 +27,7 @@
-->
<ui:composition template="/templates/template.xhtml">
+ <ui:param name="componentId" value="richDataTable" />
<ui:define name="head">
<f:metadata>
@@ -41,10 +42,10 @@
<br/>
<h:outputText value="Show data in table: " />
<h:selectBooleanCheckbox id="noDataCheckbox" value="#{richDataTableBean.state}">
- <a4j:ajax render="richDataTable scroller1"/>
+ <a4j:ajax render="#{nestedComponentId} scroller1"/>
</h:selectBooleanCheckbox>
<br/><br/>
- <rich:dataScroller id="scroller1" for="richDataTable" page="#{richDataTableBean.page}" maxPages="7" render="richDataTable"/>
+ <rich:dataScroller id="scroller1" for="richDataTable" page="#{richDataTableBean.page}" maxPages="7" render="#{nestedComponentId}"/>
</ui:define>
<ui:define name="component">
@@ -96,16 +97,17 @@
</rich:column>
<f:facet name="footer">
- <rich:dataScroller id="scroller2" for="richDataTable" page="#{richDataTableBean.page}" maxPages="7" render="richDataTable" />
+ <rich:dataScroller id="scroller2" for="richDataTable" page="#{richDataTableBean.page}" maxPages="7" render="richDataTable scroller1" />
</f:facet>
</rich:dataTable>
- <a4j:commandButton id="sortReset" value="Reset Sorting" action="#{richDataTableBean.sorting.clear}" render="richDataTable" />
-
</ui:define>
<ui:define name="outOfTemplateAfter">
+ <a4j:commandButton id="sortReset" value="Reset Sorting" action="#{richDataTableBean.sorting.clear}" render="#{nestedComponentId} scroller1" />
+
+ <br /><br />
<metamer:attributes value="#{richDataTableBean.attributes}" id="attributes" />
</ui:define>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/sorting-using-component-control.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/sorting-using-component-control.xhtml 2010-12-07 13:08:57 UTC (rev 20435)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/sorting-using-component-control.xhtml 2010-12-07 13:10:01 UTC (rev 20436)
@@ -27,6 +27,7 @@
-->
<ui:composition template="/templates/template.xhtml">
+ <ui:param name="componentId" value="richDataTable" />
<ui:define name="head">
<f:metadata>
@@ -41,10 +42,10 @@
<br/>
<h:outputText value="Show data in table: " />
<h:selectBooleanCheckbox id="noDataCheckbox" value="#{richDataTableBean.state}">
- <a4j:ajax render="richDataTable scroller1"/>
+ <a4j:ajax render="#{nestedComponentId} scroller1"/>
</h:selectBooleanCheckbox>
<br/><br/>
- <rich:dataScroller id="scroller1" for="richDataTable" page="#{richDataTableBean.page}" maxPages="7" render="richDataTable"/>
+ <rich:dataScroller id="scroller1" for="richDataTable" page="#{richDataTableBean.page}" maxPages="7" render="#{nestedComponentId}"/>
</ui:define>
<ui:define name="component">
@@ -111,17 +112,21 @@
</rich:column>
<f:facet name="footer">
- <rich:dataScroller id="scroller2" for="richDataTable" page="#{richDataTableBean.page}" maxPages="7" render="richDataTable" />
+ <rich:dataScroller id="scroller2" for="richDataTable" page="#{richDataTableBean.page}" maxPages="7" render="richDataTable scroller1" />
</f:facet>
</rich:dataTable>
- <h:commandButton id="sortReset" value="Reset Sorting">
- <rich:componentControl event="click" target="richDataTable" operation="sort" />
- </h:commandButton>
+
</ui:define>
<ui:define name="outOfTemplateAfter">
+ <h:commandButton id="sortReset" value="Reset Sorting">
+ <rich:componentControl event="click" target="#{nestedComponentId}" operation="sort" />
+ </h:commandButton>
+
+ <br /><br />
+
<metamer:attributes value="#{richDataTableBean.attributes}" id="attributes" />
</ui:define>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/components1.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/components1.xhtml 2010-12-07 13:08:57 UTC (rev 20435)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/components1.xhtml 2010-12-07 13:10:01 UTC (rev 20436)
@@ -27,6 +27,7 @@
-->
<ui:composition template="/templates/template.xhtml">
+ <ui:param name="componentId" value="richEDT" />
<ui:define name="head">
<f:metadata>
@@ -88,10 +89,10 @@
<br/>
<h:outputText value="Show data in table: " />
<h:selectBooleanCheckbox id="noDataCheckbox" value="#{richExtendedDataTableBean.state}">
- <a4j:ajax render="richEDT scroller1"/>
+ <a4j:ajax render="#{nestedComponentId} scroller1"/>
</h:selectBooleanCheckbox>
<br/><br/>
- <rich:dataScroller id="scroller1" for="richEDT" page="#{richExtendedDataTableBean.page}" maxPages="7" render="richEDT"/>
+ <rich:dataScroller id="scroller1" for="richEDT" page="#{richExtendedDataTableBean.page}" maxPages="7" render="#{nestedComponentId}"/>
</ui:define>
<ui:define name="component">
@@ -230,7 +231,7 @@
</rich:column>
<f:facet name="footer">
- <rich:dataScroller id="scroller2" for="richEDT" page="#{richExtendedDataTableBean.page}" maxPages="7" render="richEDT" />
+ <rich:dataScroller id="scroller2" for="richEDT" page="#{richExtendedDataTableBean.page}" maxPages="7" render="richEDT scroller1" />
</f:facet>
</rich:extendedDataTable>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/components2.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/components2.xhtml 2010-12-07 13:08:57 UTC (rev 20435)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/components2.xhtml 2010-12-07 13:10:01 UTC (rev 20436)
@@ -27,6 +27,7 @@
-->
<ui:composition template="/templates/template.xhtml">
+ <ui:param name="componentId" value="richEDT" />
<ui:define name="head">
<f:metadata>
@@ -81,10 +82,10 @@
<br/>
<h:outputText value="Show data in table: " />
<h:selectBooleanCheckbox id="noDataCheckbox" value="#{richExtendedDataTableBean.state}">
- <a4j:ajax render="richEDT scroller1"/>
+ <a4j:ajax render="#{nestedComponentId} scroller1"/>
</h:selectBooleanCheckbox>
<br/><br/>
- <rich:dataScroller id="scroller1" for="richEDT" page="#{richExtendedDataTableBean.page}" maxPages="7" render="richEDT"/>
+ <rich:dataScroller id="scroller1" for="richEDT" page="#{richExtendedDataTableBean.page}" maxPages="7" render="#{nestedComponentId}"/>
</ui:define>
<ui:define name="component">
@@ -230,7 +231,7 @@
</rich:column>
<f:facet name="footer">
- <rich:dataScroller id="scroller2" for="richEDT" page="#{richExtendedDataTableBean.page}" maxPages="7" render="richEDT" />
+ <rich:dataScroller id="scroller2" for="richEDT" page="#{richExtendedDataTableBean.page}" maxPages="7" render="richEDT scroller1" />
</f:facet>
</rich:extendedDataTable>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/facets.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/facets.xhtml 2010-12-07 13:08:57 UTC (rev 20435)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/facets.xhtml 2010-12-07 13:10:01 UTC (rev 20436)
@@ -27,6 +27,7 @@
-->
<ui:composition template="/templates/template.xhtml">
+ <ui:param name="componentId" value="richEDT" />
<ui:define name="head">
<f:metadata>
@@ -46,7 +47,7 @@
<br/>
<h:outputText value="Show data in table: " />
<h:selectBooleanCheckbox id="noDataCheckbox" value="#{richExtendedDataTableBean.state}">
- <a4j:ajax render="richEDT scroller1"/>
+ <a4j:ajax render="#{nestedComponentId} scroller1"/>
</h:selectBooleanCheckbox>
<br/><br/>
</ui:define>
@@ -113,7 +114,7 @@
</ui:define>
<ui:define name="outOfTemplateAfter">
- <a4j:ajax render="richEDT">
+ <a4j:ajax render="#{nestedComponentId}">
<h:panelGrid columns="2">
<h:outputLabel value="No Data Facet: " />
<h:inputText id="noDataInput" value="#{richExtendedDataTableBean.facets['noData']}" />
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/filtering.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/filtering.xhtml 2010-12-07 13:08:57 UTC (rev 20435)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/filtering.xhtml 2010-12-07 13:10:01 UTC (rev 20436)
@@ -28,6 +28,7 @@
-->
<ui:composition template="/templates/template.xhtml">
+ <ui:param name="componentId" value="richEDT" />
<ui:define name="head">
<f:metadata>
@@ -79,10 +80,10 @@
<br/>
<h:outputText value="Show data in table: " />
<h:selectBooleanCheckbox id="noDataCheckbox" value="#{richExtendedDataTableBean.state}">
- <a4j:ajax render="richEDT scroller1"/>
+ <a4j:ajax render="#{nestedComponentId} scroller1"/>
</h:selectBooleanCheckbox>
<br/><br/>
- <rich:dataScroller id="scroller1" for="richEDT" page="#{richExtendedDataTableBean.page}" maxPages="7" render="richEDT"/>
+ <rich:dataScroller id="scroller1" for="richEDT" page="#{richExtendedDataTableBean.page}" maxPages="7" render="#{nestedComponentId}"/>
</ui:define>
<ui:define name="component">
@@ -217,7 +218,7 @@
</rich:column>
<f:facet name="footer">
- <rich:dataScroller id="scroller2" for="richEDT" page="#{richExtendedDataTableBean.page}" maxPages="7" render="richEDT" />
+ <rich:dataScroller id="scroller2" for="richEDT" page="#{richExtendedDataTableBean.page}" maxPages="7" render="richEDT scroller1" />
</f:facet>
</rich:extendedDataTable>
</ui:define>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/scroller.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/scroller.xhtml 2010-12-07 13:08:57 UTC (rev 20435)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/scroller.xhtml 2010-12-07 13:10:01 UTC (rev 20436)
@@ -2,7 +2,8 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j"
- xmlns:metamer="http://java.sun.com/jsf/composite/metamer" xmlns:rich="http://richfaces.org/rich">
+ xmlns:metamer="http://java.sun.com/jsf/composite/metamer" xmlns:rich="http://richfaces.org/rich"
+ xmlns:c="http://java.sun.com/jsp/jstl/core">
<!--
JBoss, Home of Professional Open Source
@@ -27,6 +28,7 @@
-->
<ui:composition template="/templates/template.xhtml">
+ <ui:param name="componentId" value="richEDT" />
<ui:define name="head">
<f:metadata>
@@ -46,10 +48,10 @@
<br/>
<h:outputText value="Show data in table: " />
<h:selectBooleanCheckbox id="noDataCheckbox" value="#{richExtendedDataTableBean.state}">
- <a4j:ajax render="richEDT scroller1"/>
+ <a4j:ajax render="#{nestedComponentId} scroller1"/>
</h:selectBooleanCheckbox>
<br/><br/>
- <rich:dataScroller id="scroller1" for="richEDT" page="#{richExtendedDataTableBean.page}" maxPages="7" render="richEDT"/>
+ <rich:dataScroller id="scroller1" for="richEDT" page="#{richExtendedDataTableBean.page}" maxPages="7" render="#{nestedComponentId}"/>
</ui:define>
<ui:define name="component">
@@ -106,7 +108,7 @@
</rich:column>
<f:facet name="footer">
- <rich:dataScroller id="scroller2" for="richEDT" page="#{richExtendedDataTableBean.page}" maxPages="7" render="richEDT" />
+ <rich:dataScroller id="scroller2" for="richEDT" page="#{richExtendedDataTableBean.page}" maxPages="7" render="richEDT scroller1" />
</f:facet>
</rich:extendedDataTable>
@@ -137,24 +139,26 @@
</h:commandButton>
</fieldset>
+ <c:set var="nestedScrollerId" value="#{nestedComponentId}:scroller2" />
+
<fieldset>
<legend>scroller2</legend>
<h:commandButton id="buttonFirst2" value="<< first">
- <rich:componentControl event="click" target="#{rich:clientId('scroller2')}" operation="switchToPage">
+ <rich:componentControl event="click" target="#{nestedScrollerId}" operation="switchToPage">
<f:param value="first" />
</rich:componentControl>
</h:commandButton>
<h:commandButton id="buttonPrev2" value="< previous">
- <rich:componentControl event="click" target="#{rich:clientId('scroller2')}" operation="previous" />
+ <rich:componentControl event="click" target="#{nestedScrollerId}" operation="previous" />
</h:commandButton>
<h:commandButton id="buttonNext2" value="next >">
- <rich:componentControl event="click" target="#{rich:clientId('scroller2')}" operation="next" />
+ <rich:componentControl event="click" target="#{nestedScrollerId}" operation="next" />
</h:commandButton>
<h:commandButton id="buttonLast2" value="last >>">
- <rich:componentControl event="click" target="#{rich:clientId('scroller2')}" operation="switchToPage">
+ <rich:componentControl event="click" target="#{nestedScrollerId}" operation="switchToPage">
<f:param value="last" />
</rich:componentControl>
</h:commandButton>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/selection.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/selection.xhtml 2010-12-07 13:08:57 UTC (rev 20435)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/selection.xhtml 2010-12-07 13:10:01 UTC (rev 20436)
@@ -27,6 +27,7 @@
-->
<ui:composition template="/templates/template.xhtml">
+ <ui:param name="componentId" value="richEDT" />
<ui:define name="head">
<f:metadata>
@@ -39,6 +40,13 @@
width: 300px !important;
height: 300px !important;
}
+ .currentSelection {
+ font-weight: bold;
+ }
+
+ .previousSelection {
+ color: gray;
+ }
</style>
</ui:define>
@@ -46,10 +54,10 @@
<br/>
<h:outputText value="Show data in table: " />
<h:selectBooleanCheckbox id="noDataCheckbox" value="#{richExtendedDataTableBean.state}">
- <a4j:ajax render="richEDT scroller1"/>
+ <a4j:ajax render="#{nestedComponentId} scroller1"/>
</h:selectBooleanCheckbox>
<br/><br/>
- <rich:dataScroller id="scroller1" for="richEDT" page="#{richExtendedDataTableBean.page}" maxPages="7" render="richEDT"/>
+ <rich:dataScroller id="scroller1" for="richEDT" page="#{richExtendedDataTableBean.page}" maxPages="7" render="#{nestedComponentId}"/>
</ui:define>
<ui:define name="component">
@@ -114,64 +122,21 @@
</f:facet>
</rich:extendedDataTable>
-
- <h:panelGrid columns="2">
- <h:outputLabel value="Previous Selection:" />
- <h:outputText id="previousSelection" value="#{richExtendedDataTableBean.attributes['selection'].value}" />
-
- <h:outputLabel value="CurrentSelection:" />
- <h:outputText id="currentSelection" value="#{richExtendedDataTableBean.attributes['selection'].value}" />
- </h:panelGrid>
</ui:define>
-
+
<ui:define name="outOfTemplateAfter">
- <fieldset>
- <legend>scroller1</legend>
+ <h:panelGrid columns="2">
+ <h:outputLabel ajaxRendered="true" value="CurrentSelection:" styleClass="currentSelection" />
+ <a4j:outputPanel ajaxRendered="true">
+ <h:outputText id="currentSelection" value="#{richExtendedDataTableBean.attributes['selection'].value}" styleClass="currentSelection" />
+ </a4j:outputPanel>
- <h:commandButton id="buttonFirst1" value="<< first">
- <rich:componentControl event="click" target="#{rich:clientId('scroller1')}" operation="switchToPage">
- <f:param value="first" />
- </rich:componentControl>
- </h:commandButton>
-
- <h:commandButton id="buttonPrev1" value="< previous">
- <rich:componentControl event="click" target="#{rich:clientId('scroller1')}" operation="previous" />
- </h:commandButton>
-
- <h:commandButton id="buttonNext1" value="next >">
- <rich:componentControl event="click" target="#{rich:clientId('scroller1')}" operation="next" />
- </h:commandButton>
-
- <h:commandButton id="buttonLast1" value="last >>">
- <rich:componentControl event="click" target="#{rich:clientId('scroller1')}" operation="switchToPage">
- <f:param value="last" />
- </rich:componentControl>
- </h:commandButton>
- </fieldset>
-
- <fieldset>
- <legend>scroller2</legend>
- <h:commandButton id="buttonFirst2" value="<< first">
- <rich:componentControl event="click" target="#{rich:clientId('scroller2')}" operation="switchToPage">
- <f:param value="first" />
- </rich:componentControl>
- </h:commandButton>
-
- <h:commandButton id="buttonPrev2" value="< previous">
- <rich:componentControl event="click" target="#{rich:clientId('scroller2')}" operation="previous" />
- </h:commandButton>
-
- <h:commandButton id="buttonNext2" value="next >">
- <rich:componentControl event="click" target="#{rich:clientId('scroller2')}" operation="next" />
- </h:commandButton>
-
- <h:commandButton id="buttonLast2" value="last >>">
- <rich:componentControl event="click" target="#{rich:clientId('scroller2')}" operation="switchToPage">
- <f:param value="last" />
- </rich:componentControl>
- </h:commandButton>
- </fieldset>
-
+ <h:outputLabel value="Previous Selection:" styleClass="previousSelection" />
+ <h:outputText id="previousSelection" value="#{richExtendedDataTableBean.attributes['selection'].value}" styleClass="previousSelection" />
+ </h:panelGrid>
+
+ <br /><br />
+
<metamer:attributes value="#{richExtendedDataTableBean.attributes}" id="attributes" />
</ui:define>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/simple.xhtml 2010-12-07 13:08:57 UTC (rev 20435)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/simple.xhtml 2010-12-07 13:10:01 UTC (rev 20436)
@@ -27,6 +27,7 @@
-->
<ui:composition template="/templates/template.xhtml">
+ <ui:param name="componentId" value="richEDT" />
<ui:define name="head">
<f:metadata>
@@ -46,7 +47,7 @@
<br/>
<h:outputText value="Show data in table: " />
<h:selectBooleanCheckbox id="noDataCheckbox" value="#{richExtendedDataTableBean.state}">
- <a4j:ajax render="richEDT scroller1"/>
+ <a4j:ajax render="#{nestedComponentId} scroller1"/>
</h:selectBooleanCheckbox>
<br/><br/>
</ui:define>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/sorting-using-column.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/sorting-using-column.xhtml 2010-12-07 13:08:57 UTC (rev 20435)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/sorting-using-column.xhtml 2010-12-07 13:10:01 UTC (rev 20436)
@@ -28,6 +28,7 @@
-->
<ui:composition template="/templates/template.xhtml">
+ <ui:param name="componentId" value="richEDT" />
<ui:define name="head">
<f:metadata>
@@ -79,10 +80,10 @@
<br/>
<h:outputText value="Show data in table: " />
<h:selectBooleanCheckbox id="noDataCheckbox" value="#{richExtendedDataTableBean.state}">
- <a4j:ajax render="richEDT scroller1"/>
+ <a4j:ajax render="#{nestedComponentId} scroller1"/>
</h:selectBooleanCheckbox>
<br/><br/>
- <rich:dataScroller id="scroller1" for="richEDT" page="#{richExtendedDataTableBean.page}" maxPages="7" render="table"/>
+ <rich:dataScroller id="scroller1" for="richEDT" page="#{richExtendedDataTableBean.page}" maxPages="7" render="#{nestedComponentId}"/>
</ui:define>
<ui:define name="component">
@@ -139,7 +140,7 @@
</rich:column>
<f:facet name="footer">
- <rich:dataScroller id="scroller2" for="richEDT" page="#{richExtendedDataTableBean.page}" maxPages="7" render="table" />
+ <rich:dataScroller id="scroller2" for="richEDT" page="#{richExtendedDataTableBean.page}" maxPages="7" render="richEDT scroller1" />
</f:facet>
</rich:extendedDataTable>
@@ -147,7 +148,7 @@
<ui:define name="outOfTemplateAfter">
- <a4j:commandButton id="sortReset" value="Reset Sorting" action="#{richExtendedDataTableBean.sorting.clear}" render="richEDT" />
+ <a4j:commandButton id="sortReset" value="Reset Sorting" action="#{richExtendedDataTableBean.sorting.clear}" render="richEDT scroller1" />
<br/><br/>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/sorting-using-component-control.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/sorting-using-component-control.xhtml 2010-12-07 13:08:57 UTC (rev 20435)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/sorting-using-component-control.xhtml 2010-12-07 13:10:01 UTC (rev 20436)
@@ -28,6 +28,7 @@
-->
<ui:composition template="/templates/template.xhtml">
+ <ui:param name="componentId" value="richEDT" />
<ui:define name="head">
<f:metadata>
@@ -79,10 +80,10 @@
<br/>
<h:outputText value="Show data in table: " />
<h:selectBooleanCheckbox id="noDataCheckbox" value="#{richExtendedDataTableBean.state}">
- <a4j:ajax render="richDataTable scroller1"/>
+ <a4j:ajax render="#{nestedComponentId} scroller1"/>
</h:selectBooleanCheckbox>
<br/><br/>
- <rich:dataScroller id="scroller1" for="richEDT" page="#{richExtendedDataTableBean.page}" maxPages="7" render="table"/>
+ <rich:dataScroller id="scroller1" for="richEDT" page="#{richExtendedDataTableBean.page}" maxPages="7" render="#{nestedComponentId}"/>
</ui:define>
<ui:define name="component">
@@ -155,7 +156,7 @@
</rich:column>
<f:facet name="footer">
- <rich:dataScroller id="scroller2" for="richEDT" page="#{richExtendedDataTableBean.page}" maxPages="7" render="table" />
+ <rich:dataScroller id="scroller2" for="richEDT" page="#{richExtendedDataTableBean.page}" maxPages="7" render="richEDT scroller1" />
</f:facet>
</rich:extendedDataTable>
@@ -164,7 +165,7 @@
<ui:define name="outOfTemplateAfter">
<h:commandButton id="sortReset" value="Reset Sorting">
- <rich:componentControl event="click" target="richEDT" operation="sort" />
+ <rich:componentControl event="click" target="#{nestedComponentId}" operation="sort" />
</h:commandButton>
<br/><br/>
14 years, 1 month
JBoss Rich Faces SVN: r20435 - in modules/tests/metamer/trunk/application/src/main: java/org/richfaces/tests/metamer/bean and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-12-07 08:08:57 -0500 (Tue, 07 Dec 2010)
New Revision: 20435
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Template.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/TemplateBean.java
modules/tests/metamer/trunk/application/src/main/webapp/templates/header.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/templates/template.xhtml
Log:
inferring nested component ID (RFPL-952)
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Template.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Template.java 2010-12-07 13:04:34 UTC (rev 20434)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Template.java 2010-12-07 13:08:57 UTC (rev 20435)
@@ -30,17 +30,17 @@
* @version $Revision$
*/
public enum Template {
- PLAIN ("plain", "Plain"),
- REDDIV ("redDiv", "Red div"),
- BLUEDIV ("blueDiv", "Blue div"),
- RICHDATATABLE1 ("richDataTable1", "Rich Data Table Row 1"),
- RICHDATATABLE2 ("richDataTable2", "Rich Data Table Row 2"),
- HDATATABLE1 ("hDataTable1", "JSF Data Table Row 1"),
- HDATATABLE2 ("hDataTable2", "JSF Data Table Row 2"),
- UIREPEAT1 ("uiRepeat1", "UI Repeat Row 1"),
- UIREPEAT2 ("uiRepeat2", "UI Repeat Row 2"),
- A4JREPEAT1 ("a4jRepeat1", "A4J Repeat Row 1"),
- A4JREPEAT2 ("a4jRepeat2", "A4J Repeat Row 2");
+ PLAIN ("plain", "Plain", ""),
+ REDDIV ("redDiv", "Red div", ""),
+ BLUEDIV ("blueDiv", "Blue div", ""),
+ RICHDATATABLE1 ("richDataTable1", "Rich Data Table Row 1", "containerRichDataTable1:0:"),
+ RICHDATATABLE2 ("richDataTable2", "Rich Data Table Row 2", "containerRichDataTable1:1:"),
+ HDATATABLE1 ("hDataTable1", "JSF Data Table Row 1", "containerHDataTable1:0:"),
+ HDATATABLE2 ("hDataTable2", "JSF Data Table Row 2", "containerHDataTable1:1:"),
+ UIREPEAT1 ("uiRepeat1", "UI Repeat Row 1", "containerUiRepeat1:0:"),
+ UIREPEAT2 ("uiRepeat2", "UI Repeat Row 2", "containerUiRepeat1:1:"),
+ A4JREPEAT1 ("a4jRepeat1", "A4J Repeat Row 1", "containerA4JRepeat1:0:"),
+ A4JREPEAT2 ("a4jRepeat2", "A4J Repeat Row 2", "containerA4JRepeat1:0:");
/**
* identifier of a template
@@ -51,6 +51,11 @@
* human-readable name of the template
*/
private String desc;
+
+ /**
+ * prefix of the component nested in this template
+ */
+ private String nestedComponentPrefix;
/**
* Private constructor.
@@ -58,9 +63,10 @@
* @param name
* @param prefix
*/
- private Template(String name, String desc) {
+ private Template(String name, String desc, String nestedComponentPrefix) {
this.name = name;
this.desc = desc;
+ this.nestedComponentPrefix = nestedComponentPrefix;
}
/**
@@ -78,6 +84,14 @@
public String getDesc() {
return desc;
}
+
+ /**
+ * Returns the prefix of component nested in this template
+ * @return
+ */
+ public String getNestedComponentPrefix() {
+ return nestedComponentPrefix;
+ }
/* (non-Javadoc)
* @see java.lang.Enum#toString()
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/TemplateBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/TemplateBean.java 2010-12-07 13:04:34 UTC (rev 20434)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/TemplateBean.java 2010-12-07 13:08:57 UTC (rev 20435)
@@ -77,6 +77,14 @@
this.templates.add(t);
}
}
+
+ public String getComponentPrefix() {
+ StringBuffer prefix = new StringBuffer("form:");
+ for (Template template : templates) {
+ prefix.append(template.getNestedComponentPrefix());
+ }
+ return prefix.toString();
+ }
public List<SelectItem> getAvailableTemplates() {
List<SelectItem> retVal = new ArrayList<SelectItem>();
Modified: modules/tests/metamer/trunk/application/src/main/webapp/templates/header.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/templates/header.xhtml 2010-12-07 13:04:34 UTC (rev 20434)
+++ modules/tests/metamer/trunk/application/src/main/webapp/templates/header.xhtml 2010-12-07 13:08:57 UTC (rev 20435)
@@ -44,7 +44,7 @@
</h:commandLink>
<h:graphicImage id="reRenderAllImage" library="images" name="refresh.png" title="Rerender All"
style="width: 36px;" alt="Rerender All">
- <a4j:ajax event="click" render="commonGrid" />
+ <a4j:ajax event="click" render="@all" />
</h:graphicImage>
</h:panelGrid>
</h:form>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/templates/template.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/templates/template.xhtml 2010-12-07 13:04:34 UTC (rev 20434)
+++ modules/tests/metamer/trunk/application/src/main/webapp/templates/template.xhtml 2010-12-07 13:08:57 UTC (rev 20435)
@@ -44,6 +44,10 @@
<div class="messages"><h:messages /></div>
<h:panelGroup id="commonGrid" layout="block" rendered="#{richBean.reComponent}">
+
+ <c:set var="nestedPrefix" value="#{templateBean.componentPrefix}" />
+ <c:set var="nestedComponentId" value="#{templateBean.componentPrefix}#{componentId}" />
+
<c:choose>
<c:when test="#{dontRenderForm}">
<div style="margin-bottom: 20px;"><ui:insert name="outOfTemplateBefore" /></div>
14 years, 1 month