JBoss Rich Faces SVN: r22048 - in modules/docs/trunk: Component_Development_Kit_Guide and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2011-03-04 00:29:47 -0500 (Fri, 04 Mar 2011)
New Revision: 22048
Modified:
modules/docs/trunk/Component_Development_Kit_Guide/pom.xml
modules/docs/trunk/Component_Reference/pom.xml
modules/docs/trunk/Developer_Guide/pom.xml
modules/docs/trunk/Migration_Guide/pom.xml
modules/docs/trunk/parent/pom.xml
modules/docs/trunk/pom.xml
Log:
[maven-release-plugin] prepare release 4.0.0.20110304-CR1
Modified: modules/docs/trunk/Component_Development_Kit_Guide/pom.xml
===================================================================
--- modules/docs/trunk/Component_Development_Kit_Guide/pom.xml 2011-03-04 04:08:00 UTC (rev 22047)
+++ modules/docs/trunk/Component_Development_Kit_Guide/pom.xml 2011-03-04 05:29:47 UTC (rev 22048)
@@ -4,14 +4,14 @@
<groupId>org.richfaces.docs</groupId>
<artifactId>richfaces-cdk-guide</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.0.0.20110304-CR1</version>
<packaging>jdocbook</packaging>
<name>RichFaces CDK Guide</name>
<parent>
<groupId>org.richfaces.docs</groupId>
<artifactId>docs-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.0.0.20110304-CR1</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
@@ -106,9 +106,9 @@
</profiles>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/trunk/Compo...</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/trunk/Componen...</developerConnection>
- <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/trunk/Component_De...</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0....</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0.201...</developerConnection>
+ <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/tags/4.0.0.2011030...</url>
</scm>
</project>
Modified: modules/docs/trunk/Component_Reference/pom.xml
===================================================================
--- modules/docs/trunk/Component_Reference/pom.xml 2011-03-04 04:08:00 UTC (rev 22047)
+++ modules/docs/trunk/Component_Reference/pom.xml 2011-03-04 05:29:47 UTC (rev 22048)
@@ -4,14 +4,14 @@
<groupId>org.richfaces.docs</groupId>
<artifactId>richfaces-component-reference</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.0.0.20110304-CR1</version>
<packaging>jdocbook</packaging>
<name>RichFaces Component Reference</name>
<parent>
<groupId>org.richfaces.docs</groupId>
<artifactId>docs-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.0.0.20110304-CR1</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
@@ -106,9 +106,9 @@
</profiles>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/trunk/Compo...</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/trunk/Componen...</developerConnection>
- <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/trunk/Component_Re...</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0....</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0.201...</developerConnection>
+ <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/tags/4.0.0.2011030...</url>
</scm>
</project>
Modified: modules/docs/trunk/Developer_Guide/pom.xml
===================================================================
--- modules/docs/trunk/Developer_Guide/pom.xml 2011-03-04 04:08:00 UTC (rev 22047)
+++ modules/docs/trunk/Developer_Guide/pom.xml 2011-03-04 05:29:47 UTC (rev 22048)
@@ -4,14 +4,14 @@
<groupId>org.richfaces.docs</groupId>
<artifactId>richfaces-developer-guide</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.0.0.20110304-CR1</version>
<packaging>jdocbook</packaging>
<name>RichFaces Developer Guide</name>
<parent>
<groupId>org.richfaces.docs</groupId>
<artifactId>docs-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.0.0.20110304-CR1</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
@@ -107,9 +107,9 @@
</profiles>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/trunk/Devel...</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/trunk/Develope...</developerConnection>
- <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/trunk/Developer_Guide</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0....</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0.201...</developerConnection>
+ <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/tags/4.0.0.2011030...</url>
</scm>
</project>
Modified: modules/docs/trunk/Migration_Guide/pom.xml
===================================================================
--- modules/docs/trunk/Migration_Guide/pom.xml 2011-03-04 04:08:00 UTC (rev 22047)
+++ modules/docs/trunk/Migration_Guide/pom.xml 2011-03-04 05:29:47 UTC (rev 22048)
@@ -4,14 +4,14 @@
<groupId>org.richfaces.docs</groupId>
<artifactId>richfaces-migration-guide</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.0.0.20110304-CR1</version>
<packaging>jdocbook</packaging>
<name>RichFaces Migration Guide</name>
<parent>
<groupId>org.richfaces.docs</groupId>
<artifactId>docs-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.0.0.20110304-CR1</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
@@ -107,9 +107,9 @@
</profiles>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/trunk/Migra...</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/trunk/Migratio...</developerConnection>
- <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/trunk/Migration_Guide</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0....</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0.201...</developerConnection>
+ <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/tags/4.0.0.2011030...</url>
</scm>
</project>
Modified: modules/docs/trunk/parent/pom.xml
===================================================================
--- modules/docs/trunk/parent/pom.xml 2011-03-04 04:08:00 UTC (rev 22047)
+++ modules/docs/trunk/parent/pom.xml 2011-03-04 05:29:47 UTC (rev 22048)
@@ -28,7 +28,7 @@
<groupId>org.richfaces.docs</groupId>
<artifactId>docs-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.0.0.20110304-CR1</version>
<name>Richfaces Docs: Parent</name>
<packaging>pom</packaging>
<url>http://richfaces.org</url>
@@ -219,8 +219,8 @@
-->
<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>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0....</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0.201...</developerConnection>
+ <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/tags/4.0.0.2011030...</url>
</scm>
</project>
Modified: modules/docs/trunk/pom.xml
===================================================================
--- modules/docs/trunk/pom.xml 2011-03-04 04:08:00 UTC (rev 22047)
+++ modules/docs/trunk/pom.xml 2011-03-04 05:29:47 UTC (rev 22048)
@@ -9,7 +9,7 @@
<groupId>org.richfaces.docs</groupId>
<artifactId>docs-aggregator</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.0.0.20110304-CR1</version>
<packaging>pom</packaging>
<name>RichFaces Document Aggregator</name>
@@ -22,9 +22,9 @@
</modules>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/trunk</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/trunk</developerConnection>
- <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/trunk</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0....</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0.201...</developerConnection>
+ <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/tags/4.0.0.2011030...</url>
</scm>
</project>
13 years, 1 month
JBoss Rich Faces SVN: r22047 - modules/docs/trunk/Component_Reference/src/main/docbook/en-US.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2011-03-03 23:08:00 -0500 (Thu, 03 Mar 2011)
New Revision: 22047
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Layout_and_appearance.xml
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Menus_and_toolbars.xml
Log:
Fixed Publican-related errors
Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Layout_and_appearance.xml
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Layout_and_appearance.xml 2011-03-04 03:56:18 UTC (rev 22046)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Layout_and_appearance.xml 2011-03-04 04:08:00 UTC (rev 22047)
@@ -46,7 +46,7 @@
</listitem>
<listitem>
<para>
- If the <varname>selector</varname> attribute does not match the <varname>id</varname> identifier attribute of any JSF components or clients on the page, it instead uses syntax defined by the <orgname>World Wide Web Consortium (<acronym>W3C</acronym>)</orgname> for the <acronym>CSS</acronym> rule selector. <!--<xref linkend="exam-Component_Reference-richjQuery-Example_selector_values" /> shows a list of examples of the selector syntax.--> Refer to the syntax specification at <ulink url="http://api.jquery.com/category/selectors/">http://api.jquery.com/category/selectors/</ulink> for full details.
+ If the <varname>selector</varname> attribute does not match the <varname>id</varname> identifier attribute of any JSF components or clients on the page, it instead uses syntax defined by the <orgname>World Wide Web Consortium (W3C)</orgname> for the <acronym>CSS</acronym> rule selector. <!--<xref linkend="exam-Component_Reference-richjQuery-Example_selector_values" /> shows a list of examples of the selector syntax.--> Refer to the syntax specification at <ulink url="http://api.jquery.com/category/selectors/">http://api.jquery.com/category/selectors/</ulink> for full details.
</para>
<!--
<example id="exam-Component_Reference-richjQuery-Example_selector_values">
Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Menus_and_toolbars.xml
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Menus_and_toolbars.xml 2011-03-04 03:56:18 UTC (rev 22046)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Menus_and_toolbars.xml 2011-03-04 04:08:00 UTC (rev 22047)
@@ -1061,7 +1061,9 @@
<imagedata fileref="images/figu-Component_Reference-richtoolbar-disc.png" format="PNG" />
</imageobject>
<textobject>
- A small circular disc to separate items.
+ <para>
+ A small circular disc to separate items.
+ </para>
</textobject>
</inlinemediaobject>
</para>
@@ -1074,7 +1076,9 @@
<imagedata fileref="images/figu-Component_Reference-richtoolbar-grid.png" format="PNG" />
</imageobject>
<textobject>
- A grid pattern to separate items.
+ <para>
+ A grid pattern to separate items.
+ </para>
</textobject>
</inlinemediaobject>
</para>
@@ -1087,7 +1091,9 @@
<imagedata fileref="images/figu-Component_Reference-richtoolbar-line.png" format="PNG" />
</imageobject>
<textobject>
- A vertical line to separate items.
+ <para>
+ A vertical line to separate items.
+ </para>
</textobject>
</inlinemediaobject>
</para>
@@ -1100,7 +1106,9 @@
<imagedata fileref="images/figu-Component_Reference-richtoolbar-square.png" format="PNG" />
</imageobject>
<textobject>
- A small square to separate items.
+ <para>
+ A small square to separate items.
+ </para>
</textobject>
</inlinemediaobject>
</para>
13 years, 1 month
JBoss Rich Faces SVN: r22046 - modules/docs/trunk/Developer_Guide/src/main/docbook/en-US.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2011-03-03 22:56:18 -0500 (Thu, 03 Mar 2011)
New Revision: 22046
Modified:
modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/Developer_Guide.xml
Log:
Removed skinning reference until complete
Modified: modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/Developer_Guide.xml
===================================================================
--- modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/Developer_Guide.xml 2011-03-04 03:54:03 UTC (rev 22045)
+++ modules/docs/trunk/Developer_Guide/src/main/docbook/en-US/Developer_Guide.xml 2011-03-04 03:56:18 UTC (rev 22046)
@@ -12,7 +12,7 @@
<xi:include href="chap-Developer_Guide-Skinning_and_theming.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<!-- Uncomment the following to include component skinning details. -->
- <xi:include href="appe-Developer_Guide-Style_classes_and_skin_parameters.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <!--<xi:include href="appe-Developer_Guide-Style_classes_and_skin_parameters.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />-->
<!-- <xi:include href="Revision_History.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> -->
</book>
13 years, 1 month
JBoss Rich Faces SVN: r22045 - modules/docs/trunk/Component_Reference/src/main/docbook/en-US.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2011-03-03 22:54:03 -0500 (Thu, 03 Mar 2011)
New Revision: 22045
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Drag_and_drop.xml
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Layout_and_appearance.xml
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Menus_and_toolbars.xml
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Output_and_messages.xml
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Panels_and_containers.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
Log:
Removed 'in development' notifications
Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Drag_and_drop.xml
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Drag_and_drop.xml 2011-03-04 03:48:12 UTC (rev 22044)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Drag_and_drop.xml 2011-03-04 03:54:03 UTC (rev 22045)
@@ -3,14 +3,6 @@
]>
<chapter id="chap-Component_Reference-Drag_and_drop">
<title>Drag and drop</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>
Read this chapter for details on adding drag and drop support to controls.
</para>
Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Layout_and_appearance.xml
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Layout_and_appearance.xml 2011-03-04 03:48:12 UTC (rev 22044)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Layout_and_appearance.xml 2011-03-04 03:54:03 UTC (rev 22045)
@@ -3,13 +3,6 @@
]>
<chapter id="chap-Component_Reference-Layout_and_appearance">
<title>Layout and appearance</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>
Read this chapter to alter the layout and appearance of web applications using special components.
</para>
Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Menus_and_toolbars.xml
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Menus_and_toolbars.xml 2011-03-04 03:48:12 UTC (rev 22044)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Menus_and_toolbars.xml 2011-03-04 03:54:03 UTC (rev 22045)
@@ -3,13 +3,6 @@
]>
<chapter id="chap-Component_Reference-Menus_and_toolbars">
<title>Menus and toolbars</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>
Read this chapter for details on menu and toolbar components.
</para>
Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Output_and_messages.xml
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Output_and_messages.xml 2011-03-04 03:48:12 UTC (rev 22044)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Output_and_messages.xml 2011-03-04 03:54:03 UTC (rev 22045)
@@ -3,13 +3,6 @@
]>
<chapter id="chap-Component_Reference-Output_and_messages">
<title>Output and messages</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>
Read this chapter for details on components that display messages and other feedback to the user.
</para>
Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Panels_and_containers.xml
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Panels_and_containers.xml 2011-03-04 03:48:12 UTC (rev 22044)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Panels_and_containers.xml 2011-03-04 03:54:03 UTC (rev 22045)
@@ -3,13 +3,6 @@
]>
<chapter id="chap-Component_Reference-Panels_and_containers">
<title>Panels and containers</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>
This chapter details those components which act as panels and containers to hold groups of other components.
</para>
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 2011-03-04 03:48:12 UTC (rev 22044)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Rich_inputs.xml 2011-03-04 03:54:03 UTC (rev 22045)
@@ -3,13 +3,6 @@
]>
<chapter id="chap-Component_Reference-Rich_inputs">
<title>Rich inputs</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>
This chapter details rich components for user input and interaction.
</para>
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 2011-03-04 03:48:12 UTC (rev 22044)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml 2011-03-04 03:54:03 UTC (rev 22045)
@@ -3,13 +3,6 @@
]>
<chapter id="chap-Component_Reference-Tables_and_grids">
<title>Tables and grids</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>
This chapter covers all components related to the display of tables and grids.
</para>
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 2011-03-04 03:48:12 UTC (rev 22044)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Trees.xml 2011-03-04 03:54:03 UTC (rev 22045)
@@ -3,13 +3,6 @@
]>
<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>
Read this chapter for details on components that use tree structures.
</para>
13 years, 1 month
JBoss Rich Faces SVN: r22044 - 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: 2011-03-03 22:48:12 -0500 (Thu, 03 Mar 2011)
New Revision: 22044
Added:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richcollapsibleSubTable-Basic_usage.xml_sample
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-richcollapsibleSubTable-Basic_usage.png
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml
Log:
Updated with collapsibleSubTable documentation
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 2011-03-03 18:23:56 UTC (rev 22043)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml 2011-03-04 03:48:12 UTC (rev 22044)
@@ -152,6 +152,153 @@
</section>
</section>
+ <!--<rich:dataTable>-->
+ <section id="sect-Component_Reference-Tables_and_grids-richdataTable">
+ <title><sgmltag><rich:dataTable></sgmltag></title>
+ <para>
+ The <sgmltag><rich:dataTable></sgmltag> component is used to render a table, including the table's header and footer. It works in conjunction with the <sgmltag><rich:column></sgmltag> and <sgmltag><rich:columnGroup></sgmltag> components to list the contents of a data model.
+ </para>
+ <note>
+ <title><sgmltag><rich:extendedDataTable></sgmltag></title>
+ <para>
+ The <sgmltag><rich:dataTable></sgmltag> component does not include extended table features, such as data scrolling, row selection, and column reordering. These features are available as part of the <sgmltag><rich:extendedDataTable></sgmltag> component; refer to <xref linkend="sect-Component_Reference-Tables_and_grids-richextendedDataTable" /> for further details.
+ </para>
+ </note>
+
+ <section id="sect-Component_Reference-richdataTable-Basic_usage">
+ <title>Basic usage</title>
+ <para>
+ The <varname>value</varname> attribute points to the data model, and the <varname>var</varname> attribute specifies a variable to use when iterating through the data model.
+ </para>
+ </section>
+
+ <section id="sect-Component_Reference-richdataTable-Customizing_the_table">
+ <title>Customizing the table</title>
+ <para>
+ The <varname>first</varname> attribute specifies which item in the data model to start from, and the <varname>rows</varname> attribute specifies the number of items to list. The <literal>header</literal>, <literal>footer</literal>, and <literal>caption</literal> facets can be used to display text, and to customize the appearance of the table through skinning. demonstrates a simple table implementation.
+ </para>
+ <example id="exam-Component_Reference-richdataTable-richdataTable_example">
+ <title><sgmltag><rich:dataTable></sgmltag> example</title>
+
+ <programlisting language="XML" role="XML"><xi:include href="extras/exam-Component_Reference-Tables_and_grids-richdataTable_example.xml_sample" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ </programlisting>
+ <blockquote>
+ <figure id="figu-Component_Reference-richdataTable_example-richdataTable_example">
+ <title><sgmltag><rich:dataTable></sgmltag> example</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/figu-Component_Reference-richdataTable_example.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <para>
+ A data table made using the <sgmltag><rich:dataTable></sgmltag> component.
+ </para>
+ </textobject>
+ </mediaobject>
+ </figure>
+ </blockquote>
+ </example>
+ <para>
+ For details on filtering and sorting data tables, refer to <xref linkend="sect-Component_Reference-Tables_and_grids-Table_filtering" /> and <xref linkend="sect-Component_Reference-Tables_and_grids-Table_sorting" />.
+ </para>
+ </section>
+
+ <section id="sect-Component_Reference-richdataTable-Partial_updates">
+ <title>Partial updates</title>
+ <para>
+ As <sgmltag><rich:dataTable></sgmltag> the component is based on the <sgmltag><a4j:repeat></sgmltag> component, it can be partially updated with Ajax. Refer to <xref linkend="sect-Component_Reference-a4jrepeat-Limited_views_and_partial_updates" /> for details on partially updating the <sgmltag><rich:dataTable></sgmltag> component.
+ </para>
+ </section>
+
+ <section id="sect-Component_Reference-richdataTable-JavaScript_API">
+ <title>JavaScript API</title>
+ <para>
+ The <sgmltag><rich:dataTable></sgmltag> component can be controlled through the JavaScript API. The JavaScript API provides the following functions:
+ </para>
+ <variablelist>
+ <varlistentry>
+ <term><function>expandAllSubTables()</function></term>
+ <listitem>
+ <para>
+ Expand any sub-tables contained in the data table.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><function>collapseAllSubTables()</function></term>
+ <listitem>
+ <para>
+ Collapse any sub-tables contained in the data table.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><function>switchSubTables()</function></term>
+ <listitem>
+ <para>
+ Switch the expanded or collapsed state of any sub-tables contained in the data table.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><function>filter(columnId, newFilterValue, [isClearPreviousFilters])</function></term>
+ <listitem>
+ <para>
+ Filter the table based on the column specified with the <parameter>columnId</parameter> parameter. Use the <parameter>newFilterValue</parameter> parameter as the filter value. The optional <parameter>isClearPreviousFilters</parameter> parameter is a boolean value which, if set to <literal>true</literal>, will clear any previous filters applied to the table.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><function>sort(columnId, [direction], [isClearPreviousSorting])</function></term>
+ <listitem>
+ <para>
+ Sort the table based on the column specified with the <parameter>columnId</parameter> parameter. The option <parameter>direction</parameter> parameter specifies whether to sort in ascending or descending order. The optional <parameter>isClearPreviousSorting</parameter> parameter is a boolean value which, if set to <literal>true</literal>, will clear any previous sorting applied to the table.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </section>
+
+ <section id="sect-Component_Reference-richdataTable-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>: <classname>org.richfaces.DataTable</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>: <classname>org.richfaces.component.html.HtmlDataTable</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>: <classname>org.richfaces.DataTable</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>: <classname>org.richfaces.DataTableRenderer</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>tag-class</parameter>: <classname>org.richfaces.taglib.DataTableTag</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <!-- TODO not in CR1
+ <section id="sect-Component_Reference-richdataTable-Style_classes_and_skin_parameters">
+ <title>Style classes and skin parameters</title>
+ <xi:include href="skinning/tabl-richdataTable.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ </section>
+ -->
+
+ </section>
+
<!--<rich:column>-->
<section id="sect-Component_Reference-Tables_and_grids-richcolumn">
<title><sgmltag><rich:column></sgmltag></title>
@@ -271,12 +418,14 @@
</itemizedlist>
</section>
+ <!-- TODO not in CR1
<section id="sect-Component_Reference-richcolumn-Style_classes_and_skin_parameters">
<title>Style classes and skin parameters</title>
<para>
The <sgmltag><rich:column></sgmltag> component uses the same style classes and skin parameters as the <sgmltag><rich:dataTable></sgmltag> component. Refer to <xref linkend="sect-Component_Reference-richdataTable-Style_classes_and_skin_parameters" /> for details.
</para>
</section>
+ -->
</section>
<!--<rich:columnGroup>-->
@@ -342,12 +491,14 @@
</itemizedlist>
</section>
+ <!-- TODO not in CR1
<section id="sect-Component_Reference-richcolumnGroup-Style_classes_and_skin_parameters">
<title>Style classes and skin parameters</title>
<para>
The <sgmltag><rich:columnGroup></sgmltag> component uses the same style classes and skin parameters as the <sgmltag><rich:dataTable></sgmltag> component. Refer to <xref linkend="sect-Component_Reference-richdataTable-Style_classes_and_skin_parameters" /> for details.
</para>
</section>
+ -->
</section>
<!-- Removed -->
@@ -414,561 +565,155 @@
</section>
</section>
-->
-
- <!-- TODO not in M2 -->
- <!--
- <section id="sect-Component_Reference-Tables_and_grids-richdataFilterSlider">
- <title><sgmltag><rich:dataFilterSlider></sgmltag></title>
- <itemizedlist>
- <listitem>
- <para>
- <parameter>component-type</parameter>: <classname>org.richfaces.DataFilterSlider</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-class</parameter>: <classname>org.richfaces.component.html.HtmlDataFilterSlider</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-family</parameter>: <classname>org.richfaces.DataFilterSlider</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>renderer-type</parameter>: <classname>org.richfaces.DataFilterSliderRenderer</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>tag-class</parameter>: <classname>org.richfaces.taglib.dataFilterSliderTag</classname>
- </para>
- </listitem>
- </itemizedlist>
+
+ <!--<rich:collapsibleSubTable>-->
+ <section id="sect-Component_Reference-Tables_and_grids-richcollapsibleSubTable">
+ <title><sgmltag><rich:collapsibleSubTable></sgmltag></title>
<para>
- The <sgmltag><rich:dataFilterSlider></sgmltag> components is a slider control that can be used for filtering data in a table. The range and increment of the slider control are defined using the <varname>startRange</varname>, <varname>endRange</varname>, and <varname>increment</varname> attributes.
+ The <sgmltag><rich:collapsibleSubTable></sgmltag> component acts as a child element to a <sgmltag><rich:dataTable></sgmltag> component. It allows sections of a table to be grouped into collapsible sections. The <sgmltag><rich:collapsibleSubTable></sgmltag> component works with the <sgmltag><rich:collapsibleSubTableToggler></sgmltag> component, which allows the user to expand and collapse the sub tables.
</para>
- <para>
- The slider is bound to a <classname>UIData</classname> component specified with the <varname>for</varname> attribute. The <varname>forValRef</varname> attribute refers to the <varname>value</varname> attribute used by the target component, and the <varname>filterBy</varname> attribute specifies which object member to filter according to the slider.
- </para>
- <para>
- The <varname>handleValue</varname> attribute keeps the current handle position on the slider control; filtering is based on this value. The <varname>storeResults</varname> attribute allows the <sgmltag><rich:dataFilterSlider></sgmltag> component to keep the target <classname>UIData</classname> component in session.
- </para>
- <para>
- The event defined with the <varname>submitOnSlide</varname> attribute is triggered when the handle value on the slider is changed.
- </para>
- <example id="exam-Component_Reference-richdataFilterSlider-richdataFilterSlider_example">
- <title><sgmltag><rich:dataFilterSlider></sgmltag> example</title>
-
-<programlisting language="XML" role="XML"><xi:include href="extras/exam-Component_Reference-Tables_and_grids-richdataFilterSlider_example.xml_sample" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" />
-</programlisting>
- <blockquote>
- <figure id="figu-Component_Reference-richdataFilterSlider_example-richdataFilterSlider_example">
- <title><sgmltag><rich:dataFilterSlider></sgmltag> example</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/figu-Component_Reference-richdataFilterSlider-richdataFilterSlider_example.png" format="PNG" />
- </imageobject>
- <textobject>
- <para>
- A table of car details, filtered using a slider.
- </para>
- </textobject>
- </mediaobject>
- </figure>
- </blockquote>
- </example>
- </section>
- -->
-
- <!--<rich:dataGrid>-->
- <section id="sect-Component_Reference-Tables_and_grids-richdataGrid">
- <title><sgmltag><rich:dataGrid></sgmltag></title>
- <para>
- The <sgmltag><rich:dataGrid></sgmltag> component is used to arrange data objects in a grid. Values in the grid can be updated dynamically from the data model, and Ajax updates can be limited to specific rows. The component supports <literal>header</literal>, <literal>footer</literal>, and <literal>caption</literal> facets.
- </para>
- <para>
- The <sgmltag><rich:dataGrid></sgmltag> component is similar in function to the JavaServer Faces <sgmltag><h:panelGrid></sgmltag> component. However, the <sgmltag><rich:dataGrid></sgmltag> component additionally allows iteration through the data model rather than just aligning child components in a grid layout.
- </para>
- <figure id="figu-Component_Reference-richdataGrid-The_richdataGrid_component">
- <title>The <sgmltag><rich:dataGrid></sgmltag> component</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/figu-Component_Reference-richdataGrid-The_richdataGrid_component.png" format="PNG" />
- </imageobject>
- <textobject>
- <para>
- The <sgmltag><rich:dataGrid></sgmltag> component displaying four elements in two columns, with a <literal>header</literal> facet, and <literal>footer</literal> facet containing a data-scrolling component.
- </para>
- </textobject>
- </mediaobject>
- </figure>
-
- <section id="sect-Component_Reference-richdataGrid-Basic_usage">
+
+ <section id="sect-Component_Reference-richcollapsibleSubTable-Basic_usage">
<title>Basic usage</title>
<para>
- The <sgmltag><rich:dataGrid></sgmltag> component requires the <varname>value</varname> attribute, which points to the data model, and the <varname>var</varname> attribute, which holds the current variable for the collection of data.
+ The <sgmltag><rich:collapsibleSubTable></sgmltag> component requires the same basic attributes as the <sgmltag><rich:dataTable></sgmltag> component. The <varname>value</varname> attribute points to the collection, and the <varname>var</varname> attribute specifies a variable to use when iterating through the collection.
</para>
- </section>
-
- <section id="sect-Component_Reference-richdataGrid-Customizing_the_grid">
- <title>Customizing the grid</title>
<para>
- The number of columns for the grid is specifed with the <varname>columns</varname> attribute, and the number of elements to layout among the columns is determined with the <varname>elements</varname> attribute. The <varname>first</varname> attribute references the zero-based element in the data model from which the grid starts.
+ In addition, the <sgmltag><rich:collapsibleSubTable></sgmltag> component typically needs a corresponding <sgmltag><rich:collapsibleSubTableToggler></sgmltag> component to allow expanding and collapsing. Declare the <varname>id</varname> identifier on the <sgmltag><rich:collapsibleSubTable></sgmltag> element so that the <sgmltag><rich:collapsibleSubTableToggler></sgmltag> component can reference it. Refer to <xref linkend="sect-Component_Reference-Tables_and_grids-richcollapsibleSubTableToggler" /> for details on the <sgmltag><rich:collapsibleSubTableToggler></sgmltag> component.
</para>
- <example id="exam-Component_Reference-richdataGrid-richdataGrid_example">
- <title><sgmltag><rich:dataGrid></sgmltag> example</title>
- <programlisting language="XML" role="XML"><xi:include href="extras/exam-Component_Reference-richdataGrid-richdataGrid_example.xml_sample" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- <blockquote>
- <figure id="figu-Component_Reference-richdataGrid_example-richdataGrid_example">
- <title><sgmltag><rich:dataGrid></sgmltag> example</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/figu-Component_Reference-richdataGrid-richdataGrid_example.png" format="PNG" />
- </imageobject>
- <textobject>
- <para>
- The result of the <sgmltag><rich:dataGrid></sgmltag> example, with the <literal>header</literal> facet, <literal>footer</literal> facet, and first element annotated.
- </para>
- </textobject>
- </mediaobject>
- </figure>
- </blockquote>
+ <example id="exam-Component_Reference-richcollapsibleSubTable-Basic_usage">
+ <title>Basic usage</title>
+ <programlisting language="XML" role="XML"><xi:include parse="text" href="extras/exam-Component_Reference-richcollapsibleSubTable-Basic_usage.xml_sample" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ <para>
+ The resulting tables contains multiple sub-tables, grouping the list of cars by vendor. Each sub-table can be expanded or collapsed using the toggle with the vendor's name. The screenshot shows all sub-tables collapsed except for the sub-table for Ford cars.
+ </para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/figu-Component_Reference-richcollapsibleSubTable-Basic_usage.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <para>
+ A data table containing multiple collapsible sub-tables.
+ </para>
+ </textobject>
+ </mediaobject>
</example>
</section>
-
- <!-- TODO
- <section id="sect-Component_Reference-richdataGrid-Multiple-page_grids">
- <title>Multiple-page grids</title>
- <para>
- The <sgmltag><rich:dataGrid></sgmltag> component can be used with the <sgmltag><rich:dataScroller></sgmltag> component to display multiple pages of grids. Refer to <xref linkend="sect-Component_Reference-Tables_and_grids-richdataScroller" /> for details on the <sgmltag><rich:dataScroller></sgmltag> component.
- </para>
- </section>
- -->
-
- <section id="sect-Component_Reference-richdataGrid-Patial_updates">
- <title>Patial updates</title>
- <para>
- As <sgmltag><rich:dataGrid></sgmltag> the component is based on the <sgmltag><a4j:repeat></sgmltag> component, it can be partially updated with Ajax. Refer to <xref linkend="sect-Component_Reference-a4jrepeat-Limited_views_and_partial_updates" /> for details on partially updating the <sgmltag><rich:dataGrid></sgmltag> component.
- </para>
- </section>
-
- <section id="sect-Component_Reference-richdataGrid-Reference_data">
- <title>Reference data</title>
- <itemizedlist>
- <listitem>
- <para>
- <parameter>component-type</parameter>: <classname>org.richfaces.DataGrid</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-class</parameter>: <classname>org.richfaces.component.html.HtmlDataGrid</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-family</parameter>: <classname>org.richfaces.DataGrid</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>renderer-type</parameter>: <classname>org.richfaces.DataGridRenderer</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>tag-class</parameter>: <classname>org.richfaces.taglib.DataGridTag</classname>
- </para>
- </listitem>
- </itemizedlist>
- </section>
- <section id="sect-Component_Reference-richdataGrid-Style_classes_and_skin_parameters">
- <title>Style classes and skin parameters</title>
+ <section id="sect-Component_Reference-richcollapsibleSubTable-Expanding_and_collapsing_the_sub-table">
+ <title>Expanding and collapsing the sub-table</title>
<para>
- The <sgmltag><rich:dataGrid></sgmltag> component uses the same style classes and skin parameters as the <sgmltag><rich:dataTable></sgmltag> component. Refer to <xref linkend="sect-Component_Reference-richdataTable-Style_classes_and_skin_parameters" /> for details.
+ Use the boolean <varname>expanded</varname> attribute to control the current state of the sub-table.
</para>
- </section>
- </section>
-
- <!--<rich:dataScroller>-->
- <section id="sect-Component_Reference-Tables_and_grids-richdataScroller">
- <title><sgmltag><rich:dataScroller></sgmltag></title>
- <para>
- The <sgmltag><rich:dataScroller></sgmltag> component is used for navigating through multiple pages of tables or grids.
- </para>
- <figure id="figu-Component_Reference-richdataScroller-The_richdataScroller_component">
- <title>The <sgmltag><rich:dataScroller></sgmltag> component</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/figu-Component_Reference-richdataScroller-The_richdataScroller_component.png" format="PNG" />
- </imageobject>
- <textobject>
- <para>
- A <sgmltag><rich:dataTable></sgmltag> component with a <sgmltag><rich:dataScroller></sgmltag> component contained in the <literal>footer</literal> facet.
- </para>
- </textobject>
- </mediaobject>
- </figure>
-
- <section id="sect-Component_Reference-richdataScroller-Basic_usage">
- <title>Basic usage</title>
<para>
- The <sgmltag><rich:dataScroller></sgmltag> must be placed in the <literal>footer</literal> facet of the table or grid it needs to control. Alternatively, use the <varname>for</varname> attribute to bind the parent table or grid to the scroller.
+ The switching mode for performing submissions is determined by the <code>expandMode</code> attribute, which can have one of the following three values:
</para>
- <para>
- The bound table or grid should also have the <varname>rows</varname> attribute defined to limit the number of rows per page.
- </para>
- <para>
- The <sgmltag><rich:dataScroller></sgmltag> component must be re-rendered whenever a filter changes on the bound table, so that the scroller matches the current model for the table.
- </para>
- <example id="exam-Component_Reference-richdataScroller-Basic_usage">
- <title>Basic usage</title>
- <programlisting language="XML" role="XML"><xi:include parse="text" href="extras/exam-Component_Reference-richdataScroller-Basic_usage.xml_sample" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- </example>
- </section>
-
- <section id="sect-Component_Reference-richdataScroller-Appearance_and_interactivity">
- <title>Appearance and interactivity</title>
- <para>
- The <varname>page</varname> attribute is a value-binding attribute used to define and save the current page number.
- </para>
- <para>
- The <sgmltag><rich:dataScroller></sgmltag> component provides a range of controllers for scrolling through tables and grids:
- </para>
<variablelist>
<varlistentry>
- <term>Controls for scrolling by a specific amount</term>
+ <term><literal>server</literal></term>
<listitem>
<para>
- The component includes controls for switching to the first page, the last page, the next page, and the previous page, as well as controls for fast-forwarding or rewinding by a set amount. Use the <varname>fastStep</varname> attribute to set the number of pages to skip when fast-forwarding or rewinding.
+ The default setting. Expansion of the <sgmltag><rich:collapsibleSubTable></sgmltag> component performs a common submission, completely re-rendering the page.
</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>ajax</literal></term>
+ <listitem>
<para>
- The appearance of these controls can be customized using the following facets: <literal>first</literal>, <literal>last</literal>, <literal>next</literal>, <literal>previous</literal>, <literal>fastforward</literal>, and <literal>rewind</literal>. Additionally, there are facets for the controls' disabled states: <literal>first_disabled</literal>, <literal>last_disabled</literal>, <literal>next_disabled</literal>, <literal>previous_disabled</literal>, <literal>fastforward_disabled</literal>, and <literal>rewind_disabled</literal>.
+ Expansion of the <sgmltag><rich:collapsibleSubTable></sgmltag> component performs an Ajax form submission, and the content of the data table is rendered.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term>Page controls</term>
+ <term><literal>client</literal></term>
<listitem>
<para>
- The component also features a series of numbered controls to jump to a specific page. Use the <varname>maxPages</varname> attribute to limit the number of page controls that appear. The current page control is highlighted.
+ Expansion of the <sgmltag><rich:collapsibleSubTable></sgmltag> component updates the data table on the client side.
</para>
</listitem>
</varlistentry>
</variablelist>
- <para>
- The <varname>pageIndexVar</varname> and <varname>pagesVar</varname> attributes are request-scope variables for the current page and the total number of pages. Use these attributes with the <literal>pages</literal> facet to provide information about the pages of the table, as shown in <xref linkend="exam-Component_Reference-richdataScroller-pages_facet" />.
- </para>
- <example id="exam-Component_Reference-richdataScroller-pages_facet">
- <title><literal>pages</literal> facet</title>
- <programlisting language="XML" role="XML"><xi:include parse="text" href="extras/exam-Component_Reference-richdataScroller-pages_facet.xml_sample" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- </example>
- <para>
- To add optional separators between controls, define the separators with the <literal>controlsSeparator</literal> facet.
- </para>
</section>
- <section id="sect-Component_Reference-richdataScroller-JavaScript_API">
- <title>JavaScript API</title>
- <para>
- The <sgmltag><rich:dataScroller></sgmltag> component can be controlled through the JavaScript API. The JavaScript API provides the following functions:
- </para>
- <variablelist>
- <varlistentry>
- <term><function>switchToPage(pageIndex)</function></term>
- <listitem>
- <para>
- Switch to the page specified with the <parameter>pageIndex</parameter> parameter.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><function>next()</function></term>
- <listitem>
- <para>
- Switch to the next page.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><function>previous()</function></term>
- <listitem>
- <para>
- Switch to the previous page.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><function>first()</function></term>
- <listitem>
- <para>
- Switch to the first page.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><function>last()</function></term>
- <listitem>
- <para>
- Switch to the last page.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><function>fastForward()</function></term>
- <listitem>
- <para>
- Step forward through the pages by the <varname>fastStep</varname> amount.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><function>fastRewind()</function></term>
- <listitem>
- <para>
- Step backward through the pages by the <varname>fastStep</varname> amount.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
-
- <section id="sect-Component_Reference-richdataScroller-Reference_data">
+ <section id="sect-Component_Reference-richcollapsibleSubTable-Reference_data">
<title>Reference data</title>
<itemizedlist>
<listitem>
<para>
- <parameter>component-type</parameter>: <classname>org.richfaces.DataScroller</classname>
+ <parameter>component-type</parameter>: <classname>org.richfaces.CollapsibleSubTable</classname>
</para>
</listitem>
<listitem>
<para>
- <parameter>component-class</parameter>: <classname>org.richfaces.component.html.HtmlDataScroller</classname>
+ <parameter>component-class</parameter>: <classname>org.richfaces.component.html.HtmlCollapsibleSubTable</classname>
</para>
</listitem>
<listitem>
<para>
- <parameter>component-family</parameter>: <classname>org.richfaces.DataScroller</classname>
+ <parameter>component-family</parameter>: <classname>org.richfaces.CollapsibleSubTable</classname>
</para>
</listitem>
<listitem>
<para>
- <parameter>renderer-type</parameter>: <classname>org.richfaces.DataScrollerRenderer</classname>
+ <parameter>renderer-type</parameter>: <classname>org.richfaces.CollapsibleSubTable</classname>
</para>
</listitem>
<listitem>
<para>
- <parameter>tag-class</parameter>: <classname>org.richfaces.taglib.DataScrollerTag</classname>
+ <parameter>tag-class</parameter>: <classname>org.richfaces.taglib.CollapsibleSubTableTag</classname>
</para>
</listitem>
</itemizedlist>
</section>
- </section>
-
- <!--<rich:dataTable>-->
- <section id="sect-Component_Reference-Tables_and_grids-richdataTable">
- <title><sgmltag><rich:dataTable></sgmltag></title>
- <para>
- The <sgmltag><rich:dataTable></sgmltag> component is used to render a table, including the table's header and footer. It works in conjunction with the <sgmltag><rich:column></sgmltag> and <sgmltag><rich:columnGroup></sgmltag> components to list the contents of a data model.
- </para>
- <note>
- <title><sgmltag><rich:extendedDataTable></sgmltag></title>
+
+ <section id="sect-Component_Reference-Tables_and_grids-richcollapsibleSubTableToggler">
+ <title><sgmltag><rich:collapsibleSubTableToggler></sgmltag></title>
<para>
- The <sgmltag><rich:dataTable></sgmltag> component does not include extended table features, such as data scrolling, row selection, and column reordering. These features are available as part of the <sgmltag><rich:extendedDataTable></sgmltag> component; refer to <xref linkend="sect-Component_Reference-Tables_and_grids-richextendedDataTable" /> for further details.
+ The <sgmltag><rich:collapsibleSubTableToggler></sgmltag> component provides a toggle control for the user to expand and collapse sub-tables.
</para>
- </note>
-
- <section id="sect-Component_Reference-richdataTable-Basic_usage">
- <title>Basic usage</title>
- <para>
- The <varname>value</varname> attribute points to the data model, and the <varname>var</varname> attribute specifies a variable to use when iterating through the data model.
- </para>
- </section>
-
- <section id="sect-Component_Reference-richdataTable-Customizing_the_table">
- <title>Customizing the table</title>
- <para>
- The <varname>first</varname> attribute specifies which item in the data model to start from, and the <varname>rows</varname> attribute specifies the number of items to list. The <literal>header</literal>, <literal>footer</literal>, and <literal>caption</literal> facets can be used to display text, and to customize the appearance of the table through skinning. demonstrates a simple table implementation.
- </para>
- <example id="exam-Component_Reference-richdataTable-richdataTable_example">
- <title><sgmltag><rich:dataTable></sgmltag> example</title>
-
- <programlisting language="XML" role="XML"><xi:include href="extras/exam-Component_Reference-Tables_and_grids-richdataTable_example.xml_sample" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" />
- </programlisting>
- <blockquote>
- <figure id="figu-Component_Reference-richdataTable_example-richdataTable_example">
- <title><sgmltag><rich:dataTable></sgmltag> example</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/figu-Component_Reference-richdataTable_example.png" format="PNG" />
- </imageobject>
- <textobject>
- <para>
- A data table made using the <sgmltag><rich:dataTable></sgmltag> component.
- </para>
- </textobject>
- </mediaobject>
- </figure>
- </blockquote>
- </example>
- <para>
- For details on filtering and sorting data tables, refer to <xref linkend="sect-Component_Reference-Tables_and_grids-Table_filtering" /> and <xref linkend="sect-Component_Reference-Tables_and_grids-Table_sorting" />.
- </para>
- </section>
-
- <section id="sect-Component_Reference-richdataTable-Partial_updates">
- <title>Partial updates</title>
- <para>
- As <sgmltag><rich:dataTable></sgmltag> the component is based on the <sgmltag><a4j:repeat></sgmltag> component, it can be partially updated with Ajax. Refer to <xref linkend="sect-Component_Reference-a4jrepeat-Limited_views_and_partial_updates" /> for details on partially updating the <sgmltag><rich:dataTable></sgmltag> component.
- </para>
- </section>
-
- <section id="sect-Component_Reference-richdataTable-JavaScript_API">
- <title>JavaScript API</title>
- <para>
- The <sgmltag><rich:dataTable></sgmltag> component can be controlled through the JavaScript API. The JavaScript API provides the following functions:
- </para>
- <variablelist>
- <varlistentry>
- <term><function>expandAllSubTables()</function></term>
- <listitem>
- <para>
- Expand any sub-tables contained in the data table.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><function>collapseAllSubTables()</function></term>
- <listitem>
- <para>
- Collapse any sub-tables contained in the data table.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><function>switchSubTables()</function></term>
- <listitem>
- <para>
- Switch the expanded or collapsed state of any sub-tables contained in the data table.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><function>filter(columnId, newFilterValue, [isClearPreviousFilters])</function></term>
- <listitem>
- <para>
- Filter the table based on the column specified with the <parameter>columnId</parameter> parameter. Use the <parameter>newFilterValue</parameter> parameter as the filter value. The optional <parameter>isClearPreviousFilters</parameter> parameter is a boolean value which, if set to <literal>true</literal>, will clear any previous filters applied to the table.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><function>sort(columnId, [direction], [isClearPreviousSorting])</function></term>
- <listitem>
- <para>
- Sort the table based on the column specified with the <parameter>columnId</parameter> parameter. The option <parameter>direction</parameter> parameter specifies whether to sort in ascending or descending order. The optional <parameter>isClearPreviousSorting</parameter> parameter is a boolean value which, if set to <literal>true</literal>, will clear any previous sorting applied to the table.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
-
- <section id="sect-Component_Reference-richdataTable-Reference_data">
- <title>Reference data</title>
- <itemizedlist>
- <listitem>
- <para>
- <parameter>component-type</parameter>: <classname>org.richfaces.DataTable</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-class</parameter>: <classname>org.richfaces.component.html.HtmlDataTable</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-family</parameter>: <classname>org.richfaces.DataTable</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>renderer-type</parameter>: <classname>org.richfaces.DataTableRenderer</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>tag-class</parameter>: <classname>org.richfaces.taglib.DataTableTag</classname>
- </para>
- </listitem>
- </itemizedlist>
- </section>
- <section id="sect-Component_Reference-richdataTable-Style_classes_and_skin_parameters">
- <title>Style classes and skin parameters</title>
- <xi:include href="skinning/tabl-richdataTable.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- </section>
-
- <!--
- <section id="sect-Component_Reference-Tables_and_grids-richcollapsibleSubTable">
- <title><sgmltag><rich:collapsibleSubTable></sgmltag></title>
- <para>
- <sgmltag><rich:collapsibleSubTable></sgmltag>
- </para>
-
- <section id="sect-Component_Reference-richdataTable-JavaScript_API">
- <title>JavaScript API</title>
+ <section id="sect-Component_Reference-richcollapsibleSubTableToggler-Basic_usage">
+ <title>Basic usage</title>
<para>
- The <sgmltag><rich:dataTable></sgmltag> component can be controlled through the JavaScript API. The JavaScript API provides the following functions:
+ The <sgmltag><rich:collapsibleSubTableToggler></sgmltag> component requires the <varname>for</varname> attribute. The <varname>for</varname> attribute references the <varname>id</varname> identifier of the <sgmltag><rich:collapsibleSubTable></sgmltag> component to control.
</para>
- <variablelist>
- <varlistentry>
- <term><function>expandAllSubTables()</function></term>
- <listitem>
- <para>
- Expand any sub-tables contained in the data table.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><function>collapseAllSubTables()</function></term>
- <listitem>
- <para>
- Collapse any sub-tables contained in the data table.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><function>switchSubTables()</function></term>
- <listitem>
- <para>
- Switch the expanded or collapsed state of any sub-tables contained in the data table.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><function>filter(columnId, newFilterValue, [isClearPreviousFilters])</function></term>
- <listitem>
- <para>
- Filter the table based on the column specified with the <parameter>columnId</parameter> parameter. Use the <parameter>newFilterValue</parameter> parameter as the filter value. The optional <parameter>isClearPreviousFilters</parameter> parameter is a boolean value which, if set to <literal>true</literal>, will clear any previous filters applied to the table.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><function>sort(columnId, [direction], [isClearPreviousSorting])</function></term>
- <listitem>
- <para>
- Sort the table based on the column specified with the <parameter>columnId</parameter> parameter. The option <parameter>direction</parameter> parameter specifies whether to sort in ascending or descending order. The optional <parameter>isClearPreviousSorting</parameter> parameter is a boolean value which, if set to <literal>true</literal>, will clear any previous sorting applied to the table.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
+ <para>
+ Refer to <xref linkend="exam-Component_Reference-richcollapsibleSubTable-Basic_usage" /> for an example using the <sgmltag><rich:collapsibleSubTable></sgmltag> component. In the example, the toggle control is placed in a column that spans the width of the table. Output text next to the toggle control displays the car vendor's name for that sub-table.
+ </para>
</section>
+
+ <section id="sect-Component_Reference-richcollapsibleSubTableToggler-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>: <classname>org.richfaces.CollapsibleSubTableToggler</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>: <classname>org.richfaces.component.html.HtmlCollapsibleSubTableToggler</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>: <classname>org.richfaces.CollapsibleSubTableToggler</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>: <classname>org.richfaces.CollapsibleSubTableToggler</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>tag-class</parameter>: <classname>org.richfaces.taglib.CollapsibleSubTableTogglerTag</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
</section>
- -->
-
</section>
<!--<rich:extendedDataTable>-->
@@ -1354,20 +1099,126 @@
</itemizedlist>
</section>
+ <!--TODO not in CR1
<section id="sect-Component_Reference-richextendedDataTable-Style_classes_and_skin_parameters">
<title>Style classes and skin parameters</title>
<xi:include href="skinning/tabl-richextendedDataTable.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
</section>
+ -->
</section>
- <!-- TODO
- <section id="sect-Component_Reference-Tables_and_grids-richsubTable">
- <title><sgmltag><rich:subTable></sgmltag></title>
+ <!--<rich:dataGrid>-->
+ <section id="sect-Component_Reference-Tables_and_grids-richdataGrid">
+ <title><sgmltag><rich:dataGrid></sgmltag></title>
<para>
- Incomplete
+ The <sgmltag><rich:dataGrid></sgmltag> component is used to arrange data objects in a grid. Values in the grid can be updated dynamically from the data model, and Ajax updates can be limited to specific rows. The component supports <literal>header</literal>, <literal>footer</literal>, and <literal>caption</literal> facets.
</para>
+ <para>
+ The <sgmltag><rich:dataGrid></sgmltag> component is similar in function to the JavaServer Faces <sgmltag><h:panelGrid></sgmltag> component. However, the <sgmltag><rich:dataGrid></sgmltag> component additionally allows iteration through the data model rather than just aligning child components in a grid layout.
+ </para>
+ <figure id="figu-Component_Reference-richdataGrid-The_richdataGrid_component">
+ <title>The <sgmltag><rich:dataGrid></sgmltag> component</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/figu-Component_Reference-richdataGrid-The_richdataGrid_component.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <para>
+ The <sgmltag><rich:dataGrid></sgmltag> component displaying four elements in two columns, with a <literal>header</literal> facet, and <literal>footer</literal> facet containing a data-scrolling component.
+ </para>
+ </textobject>
+ </mediaobject>
+ </figure>
+
+ <section id="sect-Component_Reference-richdataGrid-Basic_usage">
+ <title>Basic usage</title>
+ <para>
+ The <sgmltag><rich:dataGrid></sgmltag> component requires the <varname>value</varname> attribute, which points to the data model, and the <varname>var</varname> attribute, which holds the current variable for the collection of data.
+ </para>
+ </section>
+
+ <section id="sect-Component_Reference-richdataGrid-Customizing_the_grid">
+ <title>Customizing the grid</title>
+ <para>
+ The number of columns for the grid is specifed with the <varname>columns</varname> attribute, and the number of elements to layout among the columns is determined with the <varname>elements</varname> attribute. The <varname>first</varname> attribute references the zero-based element in the data model from which the grid starts.
+ </para>
+ <example id="exam-Component_Reference-richdataGrid-richdataGrid_example">
+ <title><sgmltag><rich:dataGrid></sgmltag> example</title>
+ <programlisting language="XML" role="XML"><xi:include href="extras/exam-Component_Reference-richdataGrid-richdataGrid_example.xml_sample" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ <blockquote>
+ <figure id="figu-Component_Reference-richdataGrid_example-richdataGrid_example">
+ <title><sgmltag><rich:dataGrid></sgmltag> example</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/figu-Component_Reference-richdataGrid-richdataGrid_example.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <para>
+ The result of the <sgmltag><rich:dataGrid></sgmltag> example, with the <literal>header</literal> facet, <literal>footer</literal> facet, and first element annotated.
+ </para>
+ </textobject>
+ </mediaobject>
+ </figure>
+ </blockquote>
+ </example>
+ </section>
+
+ <!-- TODO
+ <section id="sect-Component_Reference-richdataGrid-Multiple-page_grids">
+ <title>Multiple-page grids</title>
+ <para>
+ The <sgmltag><rich:dataGrid></sgmltag> component can be used with the <sgmltag><rich:dataScroller></sgmltag> component to display multiple pages of grids. Refer to <xref linkend="sect-Component_Reference-Tables_and_grids-richdataScroller" /> for details on the <sgmltag><rich:dataScroller></sgmltag> component.
+ </para>
+ </section>
+ -->
+
+ <section id="sect-Component_Reference-richdataGrid-Patial_updates">
+ <title>Patial updates</title>
+ <para>
+ As <sgmltag><rich:dataGrid></sgmltag> the component is based on the <sgmltag><a4j:repeat></sgmltag> component, it can be partially updated with Ajax. Refer to <xref linkend="sect-Component_Reference-a4jrepeat-Limited_views_and_partial_updates" /> for details on partially updating the <sgmltag><rich:dataGrid></sgmltag> component.
+ </para>
+ </section>
+
+ <section id="sect-Component_Reference-richdataGrid-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>: <classname>org.richfaces.DataGrid</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>: <classname>org.richfaces.component.html.HtmlDataGrid</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>: <classname>org.richfaces.DataGrid</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>: <classname>org.richfaces.DataGridRenderer</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>tag-class</parameter>: <classname>org.richfaces.taglib.DataGridTag</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <!-- TODO not in CR1
+ <section id="sect-Component_Reference-richdataGrid-Style_classes_and_skin_parameters">
+ <title>Style classes and skin parameters</title>
+ <para>
+ The <sgmltag><rich:dataGrid></sgmltag> component uses the same style classes and skin parameters as the <sgmltag><rich:dataTable></sgmltag> component. Refer to <xref linkend="sect-Component_Reference-richdataTable-Style_classes_and_skin_parameters" /> for details.
+ </para>
+ </section>
+ -->
</section>
- -->
<!--<rich:list>-->
<section id="sect-Component_Reference-Tables_and_grids-richlist">
@@ -1612,12 +1463,256 @@
</itemizedlist>
</section>
+ <!-- TODO not in CR1
<section id="sect-Component_Reference-richlist-Style_classes_and_skin_parameters">
<title>Style classes and skin parameters</title>
<xi:include href="skinning/tabl-richlist.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
</section>
+ -->
</section>
+ <!--<rich:dataScroller>-->
+ <section id="sect-Component_Reference-Tables_and_grids-richdataScroller">
+ <title><sgmltag><rich:dataScroller></sgmltag></title>
+ <para>
+ The <sgmltag><rich:dataScroller></sgmltag> component is used for navigating through multiple pages of tables or grids.
+ </para>
+ <figure id="figu-Component_Reference-richdataScroller-The_richdataScroller_component">
+ <title>The <sgmltag><rich:dataScroller></sgmltag> component</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/figu-Component_Reference-richdataScroller-The_richdataScroller_component.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <para>
+ A <sgmltag><rich:dataTable></sgmltag> component with a <sgmltag><rich:dataScroller></sgmltag> component contained in the <literal>footer</literal> facet.
+ </para>
+ </textobject>
+ </mediaobject>
+ </figure>
+
+ <section id="sect-Component_Reference-richdataScroller-Basic_usage">
+ <title>Basic usage</title>
+ <para>
+ The <sgmltag><rich:dataScroller></sgmltag> must be placed in the <literal>footer</literal> facet of the table or grid it needs to control. Alternatively, use the <varname>for</varname> attribute to bind the parent table or grid to the scroller.
+ </para>
+ <para>
+ The bound table or grid should also have the <varname>rows</varname> attribute defined to limit the number of rows per page.
+ </para>
+ <para>
+ The <sgmltag><rich:dataScroller></sgmltag> component must be re-rendered whenever a filter changes on the bound table, so that the scroller matches the current model for the table.
+ </para>
+ <example id="exam-Component_Reference-richdataScroller-Basic_usage">
+ <title>Basic usage</title>
+ <programlisting language="XML" role="XML"><xi:include parse="text" href="extras/exam-Component_Reference-richdataScroller-Basic_usage.xml_sample" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ </example>
+ </section>
+
+ <section id="sect-Component_Reference-richdataScroller-Appearance_and_interactivity">
+ <title>Appearance and interactivity</title>
+ <para>
+ The <varname>page</varname> attribute is a value-binding attribute used to define and save the current page number.
+ </para>
+ <para>
+ The <sgmltag><rich:dataScroller></sgmltag> component provides a range of controllers for scrolling through tables and grids:
+ </para>
+ <variablelist>
+ <varlistentry>
+ <term>Controls for scrolling by a specific amount</term>
+ <listitem>
+ <para>
+ The component includes controls for switching to the first page, the last page, the next page, and the previous page, as well as controls for fast-forwarding or rewinding by a set amount. Use the <varname>fastStep</varname> attribute to set the number of pages to skip when fast-forwarding or rewinding.
+ </para>
+ <para>
+ The appearance of these controls can be customized using the following facets: <literal>first</literal>, <literal>last</literal>, <literal>next</literal>, <literal>previous</literal>, <literal>fastforward</literal>, and <literal>rewind</literal>. Additionally, there are facets for the controls' disabled states: <literal>first_disabled</literal>, <literal>last_disabled</literal>, <literal>next_disabled</literal>, <literal>previous_disabled</literal>, <literal>fastforward_disabled</literal>, and <literal>rewind_disabled</literal>.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Page controls</term>
+ <listitem>
+ <para>
+ The component also features a series of numbered controls to jump to a specific page. Use the <varname>maxPages</varname> attribute to limit the number of page controls that appear. The current page control is highlighted.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <para>
+ The <varname>pageIndexVar</varname> and <varname>pagesVar</varname> attributes are request-scope variables for the current page and the total number of pages. Use these attributes with the <literal>pages</literal> facet to provide information about the pages of the table, as shown in <xref linkend="exam-Component_Reference-richdataScroller-pages_facet" />.
+ </para>
+ <example id="exam-Component_Reference-richdataScroller-pages_facet">
+ <title><literal>pages</literal> facet</title>
+ <programlisting language="XML" role="XML"><xi:include parse="text" href="extras/exam-Component_Reference-richdataScroller-pages_facet.xml_sample" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ </example>
+ <para>
+ To add optional separators between controls, define the separators with the <literal>controlsSeparator</literal> facet.
+ </para>
+ </section>
+
+ <section id="sect-Component_Reference-richdataScroller-JavaScript_API">
+ <title>JavaScript API</title>
+ <para>
+ The <sgmltag><rich:dataScroller></sgmltag> component can be controlled through the JavaScript API. The JavaScript API provides the following functions:
+ </para>
+ <variablelist>
+ <varlistentry>
+ <term><function>switchToPage(pageIndex)</function></term>
+ <listitem>
+ <para>
+ Switch to the page specified with the <parameter>pageIndex</parameter> parameter.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><function>next()</function></term>
+ <listitem>
+ <para>
+ Switch to the next page.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><function>previous()</function></term>
+ <listitem>
+ <para>
+ Switch to the previous page.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><function>first()</function></term>
+ <listitem>
+ <para>
+ Switch to the first page.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><function>last()</function></term>
+ <listitem>
+ <para>
+ Switch to the last page.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><function>fastForward()</function></term>
+ <listitem>
+ <para>
+ Step forward through the pages by the <varname>fastStep</varname> amount.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><function>fastRewind()</function></term>
+ <listitem>
+ <para>
+ Step backward through the pages by the <varname>fastStep</varname> amount.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </section>
+
+ <section id="sect-Component_Reference-richdataScroller-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>: <classname>org.richfaces.DataScroller</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>: <classname>org.richfaces.component.html.HtmlDataScroller</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>: <classname>org.richfaces.DataScroller</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>: <classname>org.richfaces.DataScrollerRenderer</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>tag-class</parameter>: <classname>org.richfaces.taglib.DataScrollerTag</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ </section>
+
+ <!-- TODO not in M2 -->
+ <!--
+ <section id="sect-Component_Reference-Tables_and_grids-richdataFilterSlider">
+ <title><sgmltag><rich:dataFilterSlider></sgmltag></title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>: <classname>org.richfaces.DataFilterSlider</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>: <classname>org.richfaces.component.html.HtmlDataFilterSlider</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>: <classname>org.richfaces.DataFilterSlider</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>: <classname>org.richfaces.DataFilterSliderRenderer</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>tag-class</parameter>: <classname>org.richfaces.taglib.dataFilterSliderTag</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The <sgmltag><rich:dataFilterSlider></sgmltag> components is a slider control that can be used for filtering data in a table. The range and increment of the slider control are defined using the <varname>startRange</varname>, <varname>endRange</varname>, and <varname>increment</varname> attributes.
+ </para>
+ <para>
+ The slider is bound to a <classname>UIData</classname> component specified with the <varname>for</varname> attribute. The <varname>forValRef</varname> attribute refers to the <varname>value</varname> attribute used by the target component, and the <varname>filterBy</varname> attribute specifies which object member to filter according to the slider.
+ </para>
+ <para>
+ The <varname>handleValue</varname> attribute keeps the current handle position on the slider control; filtering is based on this value. The <varname>storeResults</varname> attribute allows the <sgmltag><rich:dataFilterSlider></sgmltag> component to keep the target <classname>UIData</classname> component in session.
+ </para>
+ <para>
+ The event defined with the <varname>submitOnSlide</varname> attribute is triggered when the handle value on the slider is changed.
+ </para>
+ <example id="exam-Component_Reference-richdataFilterSlider-richdataFilterSlider_example">
+ <title><sgmltag><rich:dataFilterSlider></sgmltag> example</title>
+
+<programlisting language="XML" role="XML"><xi:include href="extras/exam-Component_Reference-Tables_and_grids-richdataFilterSlider_example.xml_sample" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" />
+</programlisting>
+ <blockquote>
+ <figure id="figu-Component_Reference-richdataFilterSlider_example-richdataFilterSlider_example">
+ <title><sgmltag><rich:dataFilterSlider></sgmltag> example</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/figu-Component_Reference-richdataFilterSlider-richdataFilterSlider_example.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <para>
+ A table of car details, filtered using a slider.
+ </para>
+ </textobject>
+ </mediaobject>
+ </figure>
+ </blockquote>
+ </example>
+ </section>
+ -->
+
<section id="sect-Component_Reference-Tables_and_grids-Table_filtering">
<title>Table filtering</title>
<!-- In development notification -->
Added: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richcollapsibleSubTable-Basic_usage.xml_sample
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richcollapsibleSubTable-Basic_usage.xml_sample (rev 0)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richcollapsibleSubTable-Basic_usage.xml_sample 2011-03-04 03:48:12 UTC (rev 22044)
@@ -0,0 +1,55 @@
+<rich:dataTable value="#{carsBean.inventoryVendorLists}" var="list">
+ <f:facet name="header">
+ <rich:columnGroup>
+ <rich:column colspan="6">
+ <h:outputText value="Cars marketplace" />
+ </rich:column>
+ <rich:column breakRowBefore="true">
+ <h:outputText value="Model" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="Price" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="Mileage" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="VIN Code" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="Items stock" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="Days Live" />
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+ <rich:column colspan="6">
+ <rich:collapsibleSubTableToggler for="sbtbl" />
+ <h:outputText value="#{list.vendor}" />
+ </rich:column>
+ <rich:collapsibleSubTable value="#{list.vendorItems}" var="item" id="sbtbl"
+ expandMode="client">
+ <rich:column>
+ <h:outputText value="#{item.model}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{item.price}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{item.mileage}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{item.vin}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{item.stock}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{item.daysLive}" />
+ </rich:column>
+ <f:facet name="footer">
+ <h:outputText value="Total of #{list.vendor} Cars: #{list.count}" />
+ </f:facet>
+ </rich:collapsibleSubTable>
+</rich:dataTable>
Added: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-richcollapsibleSubTable-Basic_usage.png
===================================================================
(Binary files differ)
Property changes on: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-richcollapsibleSubTable-Basic_usage.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
13 years, 1 month
JBoss Rich Faces SVN: r22043 - modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-03-03 13:23:56 -0500 (Thu, 03 Mar 2011)
New Revision: 22043
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/simple.xhtml
Log:
rich:inplaceInput - added @title
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/simple.xhtml 2011-03-03 18:22:26 UTC (rev 22042)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/simple.xhtml 2011-03-03 18:23:56 UTC (rev 22043)
@@ -83,6 +83,7 @@
style="#{richInplaceInputBean.attributes['style'].value}"
styleClass="#{richInplaceInputBean.attributes['styleClass'].value}"
tabindex="#{richInplaceInputBean.attributes['tabindex'].value}"
+ title="#{richInplaceInputBean.attributes['title'].value}"
validatorMessage="#{richInplaceInputBean.attributes['validatorMessage'].value}"
value="#{richInplaceInputBean.attributes['value'].value}"
valueChangeListener="#{richBean.valueChangeListener}"
13 years, 1 month
JBoss Rich Faces SVN: r22042 - branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2011-03-03 13:22:26 -0500 (Thu, 03 Mar 2011)
New Revision: 22042
Modified:
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataGridRenderer.java
Log:
RF-10666 Reviewer: Anton Belevich
Modified: branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataGridRenderer.java
===================================================================
--- branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataGridRenderer.java 2011-03-03 18:19:11 UTC (rev 22041)
+++ branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataGridRenderer.java 2011-03-03 18:22:26 UTC (rev 22042)
@@ -245,6 +245,7 @@
String classes = concatClasses("rf-dg", attributes.get(HtmlConstants.STYLE_CLASS_ATTR));
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, classes, null);
RenderKitUtils.renderAttribute(facesContext, "style", attributes.get(HtmlConstants.STYLE_ATTRIBUTE));
+ RenderKitUtils.renderAttribute(facesContext, HtmlConstants.TITLE_ATTRIBUTE, attributes.get(HtmlConstants.TITLE_ATTRIBUTE));
encodeCaption(writer, facesContext, dataGrid);
encodeHeader(writer, facesContext, dataGrid, false);
encodeFooter(writer, facesContext, dataGrid, false);
13 years, 1 month
JBoss Rich Faces SVN: r22041 - modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-03-03 13:19:11 -0500 (Thu, 03 Mar 2011)
New Revision: 22041
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/simple.xhtml
Log:
rich:inplaceInput - added @styleClass
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/simple.xhtml 2011-03-03 17:27:45 UTC (rev 22040)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/simple.xhtml 2011-03-03 18:19:11 UTC (rev 22041)
@@ -81,6 +81,7 @@
saveOnBlur="#{richInplaceInputBean.attributes['saveOnBlur'].value}"
showControls="#{richInplaceInputBean.attributes['showControls'].value}"
style="#{richInplaceInputBean.attributes['style'].value}"
+ styleClass="#{richInplaceInputBean.attributes['styleClass'].value}"
tabindex="#{richInplaceInputBean.attributes['tabindex'].value}"
validatorMessage="#{richInplaceInputBean.attributes['validatorMessage'].value}"
value="#{richInplaceInputBean.attributes['value'].value}"
13 years, 1 month
JBoss Rich Faces SVN: r22040 - in branches/4.0.X: ui/common/api/src/main/java/org/richfaces and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2011-03-03 12:27:45 -0500 (Thu, 03 Mar 2011)
New Revision: 22040
Added:
branches/4.0.X/ui/common/api/src/main/java/org/richfaces/application/
branches/4.0.X/ui/common/api/src/main/java/org/richfaces/application/FacesMessages.java
Removed:
branches/4.0.X/ui/common/api/src/main/java/org/richfaces/appplication/
Modified:
branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/param/samples/skinChange-sample.xhtml
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractDataScroller.java
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTree.java
branches/4.0.X/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanel.java
Log:
RF-10670 wrong packages names
-reviewed by Anton Belevich
Modified: branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/param/samples/skinChange-sample.xhtml
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/param/samples/skinChange-sample.xhtml 2011-03-03 17:06:59 UTC (rev 22039)
+++ branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/param/samples/skinChange-sample.xhtml 2011-03-03 17:27:45 UTC (rev 22040)
@@ -8,7 +8,7 @@
<h:form>
<rich:panel>
<f:facet name="header">
- <h:outputText value="Change Demo Appplication Skin To: " />
+ <h:outputText value="Change Demo Application Skin To: " />
</f:facet>
<h:panelGrid columns="2">
<h:link value="DeepMarine" includeViewParams="true">
Added: branches/4.0.X/ui/common/api/src/main/java/org/richfaces/application/FacesMessages.java
===================================================================
--- branches/4.0.X/ui/common/api/src/main/java/org/richfaces/application/FacesMessages.java (rev 0)
+++ branches/4.0.X/ui/common/api/src/main/java/org/richfaces/application/FacesMessages.java 2011-03-03 17:27:45 UTC (rev 22040)
@@ -0,0 +1,136 @@
+/*
+ * 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.application;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIInput;
+import javax.faces.component.UISelectMany;
+import javax.faces.component.UISelectOne;
+import javax.faces.convert.BigDecimalConverter;
+import javax.faces.convert.BigIntegerConverter;
+import javax.faces.convert.BooleanConverter;
+import javax.faces.convert.ByteConverter;
+import javax.faces.convert.CharacterConverter;
+import javax.faces.convert.DateTimeConverter;
+import javax.faces.convert.DoubleConverter;
+import javax.faces.convert.EnumConverter;
+import javax.faces.convert.FloatConverter;
+import javax.faces.convert.IntegerConverter;
+import javax.faces.convert.LongConverter;
+import javax.faces.convert.NumberConverter;
+import javax.faces.convert.ShortConverter;
+import javax.faces.validator.BeanValidator;
+import javax.faces.validator.DoubleRangeValidator;
+import javax.faces.validator.LengthValidator;
+import javax.faces.validator.LongRangeValidator;
+import javax.faces.validator.RegexValidator;
+
+import org.richfaces.l10n.MessageBundle;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+@MessageBundle(baseName = FacesMessage.FACES_MESSAGES)
+public enum FacesMessages {
+
+ UIINPUT_CONVERSION(UIInput.CONVERSION_MESSAGE_ID),
+ UIINPUT_REQUIRED(UIInput.REQUIRED_MESSAGE_ID),
+ UIINPUT_UPDATE(UIInput.UPDATE_MESSAGE_ID),
+ UISELECTONE_INVALID(UISelectOne.INVALID_MESSAGE_ID),
+ UISELECTMANY_INVALID(UISelectMany.INVALID_MESSAGE_ID),
+ BIG_DECIMAL_CONVERTER_DECIMAL(BigDecimalConverter.DECIMAL_ID),
+ BIG_DECIMAL_CONVERTER_DECIMAL_DETAIL(BigDecimalConverter.DECIMAL_ID, true),
+ BIG_INTEGER_CONVERTER_BIGINTEGER(BigIntegerConverter.BIGINTEGER_ID),
+ BIG_INTEGER_CONVERTER_BIGINTEGER_DETAIL(BigIntegerConverter.BIGINTEGER_ID, true),
+ BOOLEAN_CONVERTER_BOOLEAN(BooleanConverter.BOOLEAN_ID),
+ BOOLEAN_CONVERTER_BOOLEAN_DETAIL(BooleanConverter.BOOLEAN_ID, true),
+ BYTE_CONVERTER_BYTE(ByteConverter.BYTE_ID),
+ BYTE_CONVERTER_BYTE_DETAIL(ByteConverter.BYTE_ID, true),
+ CHARACTER_CONVERTER_CHARACTER(CharacterConverter.CHARACTER_ID),
+ CHARACTER_CONVERTER_CHARACTER_DETAIL(CharacterConverter.CHARACTER_ID, true),
+ DATE_TIME_CONVERTER_DATE(DateTimeConverter.DATE_ID),
+ DATE_TIME_CONVERTER_DATE_DETAIL(DateTimeConverter.DATE_ID, true),
+ DATE_TIME_CONVERTER_TIME(DateTimeConverter.TIME_ID),
+ DATE_TIME_CONVERTER_TIME_DETAIL(DateTimeConverter.TIME_ID, true),
+ DATE_TIME_CONVERTER_DATETIME(DateTimeConverter.DATETIME_ID),
+ DATE_TIME_CONVERTER_DATETIME_DETAIL(DateTimeConverter.DATETIME_ID, true),
+ DATE_TIME_CONVERTER_PATTERN_TYPE("javax.faces.converter.DateTimeConverter.PATTERN_TYPE"),
+ DOUBLE_CONVERTER_DOUBLE(DoubleConverter.DOUBLE_ID),
+ DOUBLE_CONVERTER_DOUBLE_DETAIL(DoubleConverter.DOUBLE_ID, true),
+ ENUM_CONVERTER_ENUM(EnumConverter.ENUM_ID),
+ ENUM_CONVERTER_ENUM_DETAIL(EnumConverter.ENUM_ID, true),
+ ENUM_CONVERTER_ENUM_NO_CLASS(EnumConverter.ENUM_NO_CLASS_ID),
+ ENUM_CONVERTER_ENUM_NO_CLASS_DETAIL(EnumConverter.ENUM_NO_CLASS_ID, true),
+ FLOAT_CONVERTER_FLOAT(FloatConverter.FLOAT_ID),
+ FLOAT_CONVERTER_FLOAT_DETAIL(FloatConverter.FLOAT_ID, true),
+ INTEGER_CONVERTER_INTEGER(IntegerConverter.INTEGER_ID),
+ INTEGER_CONVERTER_INTEGER_DETAIL(IntegerConverter.INTEGER_ID, true),
+ LONG_CONVERTER_LONG(LongConverter.LONG_ID),
+ LONG_CONVERTER_LONG_DETAIL(LongConverter.LONG_ID, true),
+ NUMBER_CONVERTER_CURRENCY(NumberConverter.CURRENCY_ID),
+ NUMBER_CONVERTER_CURRENCY_DETAIL(NumberConverter.CURRENCY_ID, true),
+ NUMBER_CONVERTER_PERCENT(NumberConverter.PERCENT_ID),
+ NUMBER_CONVERTER_PERCENT_DETAIL(NumberConverter.PERCENT_ID, true),
+ NUMBER_CONVERTER_NUMBER(NumberConverter.NUMBER_ID),
+ NUMBER_CONVERTER_NUMBER_DETAIL(NumberConverter.NUMBER_ID, true),
+ NUMBER_CONVERTER_PATTERN(NumberConverter.PATTERN_ID),
+ NUMBER_CONVERTER_PATTERN_DETAIL(NumberConverter.PATTERN_ID, true),
+ SHORT_CONVERTER_SHORT(ShortConverter.SHORT_ID),
+ SHORT_CONVERTER_SHORT_DETAIL(ShortConverter.SHORT_ID, true),
+ CONVERTER_STRING("javax.faces.converter.STRING"),
+ DOUBLE_RANGE_VALIDATOR_MAXIMUM(DoubleRangeValidator.MAXIMUM_MESSAGE_ID),
+ DOUBLE_RANGE_VALIDATOR_MINIMUM(DoubleRangeValidator.MINIMUM_MESSAGE_ID),
+ DOUBLE_RANGE_VALIDATOR_NOT_IN_RANGE(DoubleRangeValidator.NOT_IN_RANGE_MESSAGE_ID),
+ DOUBLE_RANGE_VALIDATOR_TYPE(DoubleRangeValidator.TYPE_MESSAGE_ID),
+ LENGTH_VALIDATOR_MAXIMUM(LengthValidator.MAXIMUM_MESSAGE_ID),
+ LENGTH_VALIDATOR_MINIMUM(LengthValidator.MINIMUM_MESSAGE_ID),
+ LONG_RANGE_VALIDATOR_MAXIMUM(LongRangeValidator.MAXIMUM_MESSAGE_ID),
+ LONG_RANGE_VALIDATOR_MINIMUM(LongRangeValidator.MINIMUM_MESSAGE_ID),
+ LONG_RANGE_VALIDATOR_NOT_IN_RANGE(LongRangeValidator.NOT_IN_RANGE_MESSAGE_ID),
+ LONG_RANGE_VALIDATOR_TYPE(LongRangeValidator.TYPE_MESSAGE_ID),
+ VALIDATOR_NOT_IN_RANGE("javax.faces.validator.NOT_IN_RANGE"),
+ REGEX_VALIDATOR_PATTERN_NOT_SET(RegexValidator.PATTERN_NOT_SET_MESSAGE_ID),
+ REGEX_VALIDATOR_PATTERN_NOT_SET_DETAIL(RegexValidator.PATTERN_NOT_SET_MESSAGE_ID, true),
+ REGEX_VALIDATOR_NOT_MATCHED(RegexValidator.NOT_MATCHED_MESSAGE_ID),
+ REGEX_VALIDATOR_NOT_MATCHED_DETAIL(RegexValidator.NOT_MATCHED_MESSAGE_ID, true),
+ REGEX_VALIDATOR_MATCH_EXCEPTION(RegexValidator.MATCH_EXCEPTION_MESSAGE_ID),
+ REGEX_VALIDATOR_MATCH_EXCEPTION_DETAIL(RegexValidator.MATCH_EXCEPTION_MESSAGE_ID, true),
+ BEAN_VALIDATOR_MESSAGE(BeanValidator.MESSAGE_ID);
+
+ private static final String DETAIL = "_detail";
+
+ private String key;
+
+ private FacesMessages(String key) {
+ this(key, false);
+ }
+
+ private FacesMessages(String key, boolean isDetail) {
+ this.key = isDetail ? key + DETAIL : key;
+ }
+
+ @Override
+ public String toString() {
+ return key;
+ }
+}
Modified: branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractDataScroller.java
===================================================================
--- branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractDataScroller.java 2011-03-03 17:06:59 UTC (rev 22039)
+++ branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractDataScroller.java 2011-03-03 17:27:45 UTC (rev 22040)
@@ -39,7 +39,7 @@
import org.richfaces.DataScrollerUtils;
import org.richfaces.application.MessageFactory;
import org.richfaces.application.ServiceTracker;
-import org.richfaces.appplication.FacesMessages;
+import org.richfaces.application.FacesMessages;
import org.richfaces.cdk.annotations.Attribute;
import org.richfaces.cdk.annotations.Facet;
import org.richfaces.cdk.annotations.JsfComponent;
Modified: branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTree.java
===================================================================
--- branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTree.java 2011-03-03 17:06:59 UTC (rev 22039)
+++ branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTree.java 2011-03-03 17:27:45 UTC (rev 22040)
@@ -51,7 +51,7 @@
import org.ajax4jsf.model.ExtendedDataModel;
import org.richfaces.application.MessageFactory;
import org.richfaces.application.ServiceTracker;
-import org.richfaces.appplication.FacesMessages;
+import org.richfaces.application.FacesMessages;
import org.richfaces.cdk.annotations.Attribute;
import org.richfaces.cdk.annotations.EventName;
import org.richfaces.cdk.annotations.JsfComponent;
Modified: branches/4.0.X/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanel.java
===================================================================
--- branches/4.0.X/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanel.java 2011-03-03 17:06:59 UTC (rev 22039)
+++ branches/4.0.X/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanel.java 2011-03-03 17:27:45 UTC (rev 22040)
@@ -49,7 +49,7 @@
import org.richfaces.application.MessageFactory;
import org.richfaces.application.ServiceTracker;
-import org.richfaces.appplication.FacesMessages;
+import org.richfaces.application.FacesMessages;
import org.richfaces.cdk.annotations.Attribute;
import org.richfaces.cdk.annotations.EventName;
import org.richfaces.cdk.annotations.JsfComponent;
13 years, 1 month
JBoss Rich Faces SVN: r22039 - branches/4.0.X/core/impl/src/main/resources/META-INF/resources.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2011-03-03 12:06:59 -0500 (Thu, 03 Mar 2011)
New Revision: 22039
Modified:
branches/4.0.X/core/impl/src/main/resources/META-INF/resources/jquery.js
Log:
https://jira.jboss.org/browse/RF-10686
reviewed by Konstantin Mishin
Modified: branches/4.0.X/core/impl/src/main/resources/META-INF/resources/jquery.js
===================================================================
--- branches/4.0.X/core/impl/src/main/resources/META-INF/resources/jquery.js 2011-03-03 16:43:50 UTC (rev 22038)
+++ branches/4.0.X/core/impl/src/main/resources/META-INF/resources/jquery.js 2011-03-03 17:06:59 UTC (rev 22039)
@@ -1,5 +1,5 @@
/*!
- * jQuery JavaScript Library v1.5
+ * jQuery JavaScript Library v1.5.1
* http://jquery.com/
*
* Copyright 2011, John Resig
@@ -11,7 +11,7 @@
* Copyright 2011, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
*
- * Date: Mon Jan 31 08:31:29 2011 -0500
+ * Date: Wed Feb 23 13:55:29 2011 -0500
*/
(function( window, undefined ) {
@@ -202,7 +202,7 @@
selector: "",
// The current version of jQuery being used
- jquery: "1.5",
+ jquery: "1.5.1",
// The default length of a jQuery object is 0
length: 0,
@@ -313,7 +313,7 @@
jQuery.fn.init.prototype = jQuery.fn;
jQuery.extend = jQuery.fn.extend = function() {
- var options, name, src, copy, copyIsArray, clone,
+ var options, name, src, copy, copyIsArray, clone,
target = arguments[0] || {},
i = 1,
length = arguments.length,
@@ -585,11 +585,9 @@
if ( data && rnotwhite.test(data) ) {
// Inspired by code by Andrea Giammarchi
// http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom...
- var head = document.getElementsByTagName("head")[0] || document.documentElement,
- script = document.createElement("script");
+ var head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement,
+ script = document.createElement( "script" );
- script.type = "text/javascript";
-
if ( jQuery.support.scriptEval() ) {
script.appendChild( document.createTextNode( data ) );
} else {
@@ -864,6 +862,12 @@
callbacks.shift().apply( context, args );
}
}
+ // We have to add a catch block for
+ // IE prior to 8 or else the finally
+ // block will never get executed
+ catch (e) {
+ throw e;
+ }
finally {
fired = [ context, args ];
firing = 0;
@@ -911,22 +915,22 @@
isRejected: failDeferred.isResolved,
// Get a promise for this deferred
// If obj is provided, the promise aspect is added to the object
- promise: function( obj , i /* internal */ ) {
+ promise: function( obj ) {
if ( obj == null ) {
if ( promise ) {
return promise;
}
promise = obj = {};
}
- i = promiseMethods.length;
+ var i = promiseMethods.length;
while( i-- ) {
- obj[ promiseMethods[ i ] ] = deferred[ promiseMethods[ i ] ];
+ obj[ promiseMethods[i] ] = deferred[ promiseMethods[i] ];
}
return obj;
}
} );
// Make sure only one callback list will be used
- deferred.then( failDeferred.cancel, deferred.cancel );
+ deferred.done( failDeferred.cancel ).fail( deferred.cancel );
// Unexpose cancel
delete deferred.cancel;
// Call given func if any
@@ -938,24 +942,34 @@
// Deferred helper
when: function( object ) {
- var args = arguments,
- length = args.length,
- deferred = length <= 1 && object && jQuery.isFunction( object.promise ) ?
+ var lastIndex = arguments.length,
+ deferred = lastIndex <= 1 && object && jQuery.isFunction( object.promise ) ?
object :
jQuery.Deferred(),
- promise = deferred.promise(),
- resolveArray;
+ promise = deferred.promise();
- if ( length > 1 ) {
- resolveArray = new Array( length );
- jQuery.each( args, function( index, element ) {
- jQuery.when( element ).then( function( value ) {
- resolveArray[ index ] = arguments.length > 1 ? slice.call( arguments, 0 ) : value;
- if( ! --length ) {
- deferred.resolveWith( promise, resolveArray );
- }
- }, deferred.reject );
- } );
+ if ( lastIndex > 1 ) {
+ var array = slice.call( arguments, 0 ),
+ count = lastIndex,
+ iCallback = function( index ) {
+ return function( value ) {
+ array[ index ] = arguments.length > 1 ? slice.call( arguments, 0 ) : value;
+ if ( !( --count ) ) {
+ deferred.resolveWith( promise, array );
+ }
+ };
+ };
+ while( ( lastIndex-- ) ) {
+ object = array[ lastIndex ];
+ if ( object && jQuery.isFunction( object.promise ) ) {
+ object.promise().then( iCallback(lastIndex), deferred.reject );
+ } else {
+ --count;
+ }
+ }
+ if ( !count ) {
+ deferred.resolveWith( promise, array );
+ }
} else if ( deferred !== object ) {
deferred.resolve( object );
}
@@ -1071,7 +1085,7 @@
}
// Expose jQuery to the global object
-return (window.jQuery = window.$ = jQuery);
+return jQuery;
})();
@@ -1088,7 +1102,8 @@
var all = div.getElementsByTagName("*"),
a = div.getElementsByTagName("a")[0],
select = document.createElement("select"),
- opt = select.appendChild( document.createElement("option") );
+ opt = select.appendChild( document.createElement("option") ),
+ input = div.getElementsByTagName("input")[0];
// Can't get basic test support
if ( !all || !all.length || !a ) {
@@ -1127,7 +1142,7 @@
// Make sure that if no value is specified for a checkbox
// that it defaults to "on".
// (WebKit defaults to "" instead)
- checkOn: div.getElementsByTagName("input")[0].value === "on",
+ checkOn: input.value === "on",
// Make sure that a selected-by-default option has a working selected property.
// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
@@ -1137,26 +1152,29 @@
deleteExpando: true,
optDisabled: false,
checkClone: false,
- _scriptEval: null,
noCloneEvent: true,
+ noCloneChecked: true,
boxModel: null,
inlineBlockNeedsLayout: false,
shrinkWrapBlocks: false,
reliableHiddenOffsets: true
};
+ input.checked = true;
+ jQuery.support.noCloneChecked = input.cloneNode( true ).checked;
+
// Make sure that the options inside disabled selects aren't marked as disabled
// (WebKit marks them as diabled)
select.disabled = true;
jQuery.support.optDisabled = !opt.disabled;
+ var _scriptEval = null;
jQuery.support.scriptEval = function() {
- if ( jQuery.support._scriptEval === null ) {
+ if ( _scriptEval === null ) {
var root = document.documentElement,
script = document.createElement("script"),
id = "script" + jQuery.now();
- script.type = "text/javascript";
try {
script.appendChild( document.createTextNode( "window." + id + "=1;" ) );
} catch(e) {}
@@ -1167,10 +1185,10 @@
// tag with appendChild/createTextNode
// (IE doesn't support this, fails, and uses .text instead)
if ( window[ id ] ) {
- jQuery.support._scriptEval = true;
+ _scriptEval = true;
delete window[ id ];
} else {
- jQuery.support._scriptEval = false;
+ _scriptEval = false;
}
root.removeChild( script );
@@ -1178,7 +1196,7 @@
root = script = id = null;
}
- return jQuery.support._scriptEval;
+ return _scriptEval;
};
// Test to see if it's possible to delete an expando from an element
@@ -1190,7 +1208,7 @@
jQuery.support.deleteExpando = false;
}
- if ( div.attachEvent && div.fireEvent ) {
+ if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
div.attachEvent("onclick", function click() {
// Cloning a node shouldn't copy over any
// bound event handlers (IE does this)
@@ -1321,7 +1339,7 @@
hasData: function( elem ) {
elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
- return !!elem && !jQuery.isEmptyObject(elem);
+ return !!elem && !isEmptyDataObject( elem );
},
data: function( elem, name, data, pvt /* Internal Use Only */ ) {
@@ -1361,11 +1379,18 @@
if ( !cache[ id ] ) {
cache[ id ] = {};
+
+ // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery
+ // metadata on plain JS objects when the object is serialized using
+ // JSON.stringify
+ if ( !isNode ) {
+ cache[ id ].toJSON = jQuery.noop;
+ }
}
// An object can be passed to jQuery.data instead of a key/value pair; this gets
// shallow copied over onto the existing cache
- if ( typeof name === "object" ) {
+ if ( typeof name === "object" || typeof name === "function" ) {
if ( pvt ) {
cache[ id ][ internalKey ] = jQuery.extend(cache[ id ][ internalKey ], name);
} else {
@@ -1427,7 +1452,7 @@
// If there is no data left in the cache, we want to continue
// and let the cache object itself get destroyed
- if ( !jQuery.isEmptyObject(thisCache) ) {
+ if ( !isEmptyDataObject(thisCache) ) {
return;
}
}
@@ -1439,7 +1464,7 @@
// Don't destroy the parent cache unless the internal data object
// had been the only thing left in it
- if ( !jQuery.isEmptyObject(cache[ id ]) ) {
+ if ( !isEmptyDataObject(cache[ id ]) ) {
return;
}
}
@@ -1460,6 +1485,13 @@
// data if it existed
if ( internalCache ) {
cache[ id ] = {};
+ // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery
+ // metadata on plain JS objects when the object is serialized using
+ // JSON.stringify
+ if ( !isNode ) {
+ cache[ id ].toJSON = jQuery.noop;
+ }
+
cache[ id ][ internalKey ] = internalCache;
// Otherwise, we need to eliminate the expando on the node to avoid
@@ -1588,9 +1620,22 @@
return data;
}
+// TODO: This is a hack for 1.5 ONLY to allow objects with a single toJSON
+// property to be considered empty objects; this property always exists in
+// order to make sure JSON.stringify does not expose internal metadata
+function isEmptyDataObject( obj ) {
+ for ( var name in obj ) {
+ if ( name !== "toJSON" ) {
+ return false;
+ }
+ }
+ return true;
+}
+
+
jQuery.extend({
queue: function( elem, type, data ) {
if ( !elem ) {
@@ -1888,6 +1933,11 @@
}
}
+ // Fixes Bug #2551 -- select.val() broken in IE after form.reset()
+ if ( one && !values.length && options.length ) {
+ return jQuery( options[ index ] ).val();
+ }
+
return values;
}
@@ -2081,8 +2131,7 @@
rescape = /[^\w\s.|`]/g,
fcleanup = function( nm ) {
return nm.replace(rescape, "\\$&");
- },
- eventKey = "events";
+ };
/*
* A number of helper functions used for managing events.
@@ -2098,17 +2147,22 @@
return;
}
- // For whatever reason, IE has trouble passing the window object
- // around, causing it to be cloned in the process
- if ( jQuery.isWindow( elem ) && ( elem !== window && !elem.frameElement ) ) {
- elem = window;
+ // TODO :: Use a try/catch until it's safe to pull this out (likely 1.6)
+ // Minor release fix for bug #8018
+ try {
+ // For whatever reason, IE has trouble passing the window object
+ // around, causing it to be cloned in the process
+ if ( jQuery.isWindow( elem ) && ( elem !== window && !elem.frameElement ) ) {
+ elem = window;
+ }
}
+ catch ( e ) {}
if ( handler === false ) {
handler = returnFalse;
} else if ( !handler ) {
// Fixes bug #7229. Fix recommended by jdalton
- return;
+ return;
}
var handleObjIn, handleObj;
@@ -2132,23 +2186,10 @@
return;
}
- var events = elemData[ eventKey ],
+ var events = elemData.events,
eventHandle = elemData.handle;
- if ( typeof events === "function" ) {
- // On plain objects events is a fn that holds the the data
- // which prevents this data from being JSON serialized
- // the function does not need to be called, it just contains the data
- eventHandle = events.handle;
- events = events.events;
-
- } else if ( !events ) {
- if ( !elem.nodeType ) {
- // On plain objects, create a fn that acts as the holder
- // of the values to avoid JSON serialization of event data
- elemData[ eventKey ] = elemData = function(){};
- }
-
+ if ( !events ) {
elemData.events = events = {};
}
@@ -2249,17 +2290,12 @@
var ret, type, fn, j, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType,
elemData = jQuery.hasData( elem ) && jQuery._data( elem ),
- events = elemData && elemData[ eventKey ];
+ events = elemData && elemData.events;
if ( !elemData || !events ) {
return;
}
- if ( typeof events === "function" ) {
- elemData = events;
- events = events.events;
- }
-
// types is actually an event object here
if ( types && types.type ) {
handler = types.handler;
@@ -2359,10 +2395,7 @@
delete elemData.events;
delete elemData.handle;
- if ( typeof elemData === "function" ) {
- jQuery.removeData( elem, eventKey, true );
-
- } else if ( jQuery.isEmptyObject( elemData ) ) {
+ if ( jQuery.isEmptyObject( elemData ) ) {
jQuery.removeData( elem, undefined, true );
}
}
@@ -2403,7 +2436,7 @@
// points to jQuery.expando
var internalKey = jQuery.expando,
internalCache = this[ internalKey ];
- if ( internalCache && internalCache.events && internalCache.events[type] ) {
+ if ( internalCache && internalCache.events && internalCache.events[ type ] ) {
jQuery.event.trigger( event, data, internalCache.handle.elem );
}
});
@@ -2429,9 +2462,7 @@
event.currentTarget = elem;
// Trigger the event, it is assumed that "handle" is a function
- var handle = elem.nodeType ?
- jQuery._data( elem, "handle" ) :
- (jQuery._data( elem, eventKey ) || {}).handle;
+ var handle = jQuery._data( elem, "handle" );
if ( handle ) {
handle.apply( elem, data );
@@ -2509,12 +2540,8 @@
event.namespace = event.namespace || namespace_sort.join(".");
- events = jQuery._data(this, eventKey);
+ events = jQuery._data(this, "events");
- if ( typeof events === "function" ) {
- events = events.events;
- }
-
handlers = (events || {})[ event.type ];
if ( events && handlers ) {
@@ -2680,7 +2707,7 @@
// Events bubbling up the document may have been marked as prevented
// by a handler lower down the tree; reflect the correct value.
- this.isDefaultPrevented = (src.defaultPrevented || src.returnValue === false ||
+ this.isDefaultPrevented = (src.defaultPrevented || src.returnValue === false ||
src.getPreventDefault && src.getPreventDefault()) ? returnTrue : returnFalse;
// Event type
@@ -2755,6 +2782,12 @@
// Firefox sometimes assigns relatedTarget a XUL element
// which we cannot access the parentNode property of
try {
+
+ // Chrome does something similar, the parentNode property
+ // can be accessed but is null.
+ if ( parent !== document && !parent.parentNode ) {
+ return;
+ }
// Traverse up the tree
while ( parent && parent !== this ) {
parent = parent.parentNode;
@@ -2805,8 +2838,7 @@
type = elem.type;
if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) {
- e.liveFired = undefined;
- return trigger( "submit", this, arguments );
+ trigger( "submit", this, arguments );
}
});
@@ -2815,8 +2847,7 @@
type = elem.type;
if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) {
- e.liveFired = undefined;
- return trigger( "submit", this, arguments );
+ trigger( "submit", this, arguments );
}
});
@@ -2879,7 +2910,7 @@
if ( data != null || val ) {
e.type = "change";
e.liveFired = undefined;
- return jQuery.event.trigger( e, arguments[1], elem );
+ jQuery.event.trigger( e, arguments[1], elem );
}
};
@@ -2893,7 +2924,7 @@
var elem = e.target, type = elem.type;
if ( type === "radio" || type === "checkbox" || elem.nodeName.toLowerCase() === "select" ) {
- return testChange.call( this, e );
+ testChange.call( this, e );
}
},
@@ -2905,7 +2936,7 @@
if ( (e.keyCode === 13 && elem.nodeName.toLowerCase() !== "textarea") ||
(e.keyCode === 32 && (type === "checkbox" || type === "radio")) ||
type === "select-multiple" ) {
- return testChange.call( this, e );
+ testChange.call( this, e );
}
},
@@ -2944,8 +2975,18 @@
}
function trigger( type, elem, args ) {
- args[0].type = type;
- return jQuery.event.handle.apply( elem, args );
+ // Piggyback on a donor event to simulate a different one.
+ // Fake originalEvent to avoid donor's stopPropagation, but if the
+ // simulated event prevents default then we do the same on the donor.
+ // Don't pass args or remember liveFired; they apply to the donor event.
+ var event = jQuery.extend( {}, args[ 0 ] );
+ event.type = type;
+ event.originalEvent = {};
+ event.liveFired = undefined;
+ jQuery.event.handle.call( elem, event );
+ if ( event.isDefaultPrevented() ) {
+ args[ 0 ].preventDefault();
+ }
}
// Create "bubbling" focus and blur events
@@ -2954,8 +2995,8 @@
jQuery.event.special[ fix ] = {
setup: function() {
this.addEventListener( orig, handler, true );
- },
- teardown: function() {
+ },
+ teardown: function() {
this.removeEventListener( orig, handler, true );
}
};
@@ -3148,12 +3189,8 @@
var stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret,
elems = [],
selectors = [],
- events = jQuery._data( this, eventKey );
+ events = jQuery._data( this, "events" );
- if ( typeof events === "function" ) {
- events = events.events;
- }
-
// Make sure we avoid non-left-click bubbling in Firefox (#3861) and disabled elements in IE (#6911)
if ( event.liveFired === this || !events || !events.live || event.target.disabled || event.button && event.type === "click" ) {
return;
@@ -3186,7 +3223,7 @@
for ( j = 0; j < live.length; j++ ) {
handleObj = live[j];
- if ( close.selector === handleObj.selector && (!namespace || namespace.test( handleObj.namespace )) ) {
+ if ( close.selector === handleObj.selector && (!namespace || namespace.test( handleObj.namespace )) && !close.elem.disabled ) {
elem = close.elem;
related = null;
@@ -3269,7 +3306,9 @@
done = 0,
toString = Object.prototype.toString,
hasDuplicate = false,
- baseHasDuplicate = true;
+ baseHasDuplicate = true,
+ rBackslash = /\\/g,
+ rNonWord = /\W/;
// Here we check if the JavaScript engine is using some sort of
// optimization where it does not always call our comparision
@@ -3468,7 +3507,7 @@
match.splice( 1, 1 );
if ( left.substr( left.length - 1 ) !== "\\" ) {
- match[1] = (match[1] || "").replace(/\\/g, "");
+ match[1] = (match[1] || "").replace( rBackslash, "" );
set = Expr.find[ type ]( match, context, isXML );
if ( set != null ) {
@@ -3607,13 +3646,16 @@
attrHandle: {
href: function( elem ) {
return elem.getAttribute( "href" );
+ },
+ type: function( elem ) {
+ return elem.getAttribute( "type" );
}
},
relative: {
"+": function(checkSet, part){
var isPartStr = typeof part === "string",
- isTag = isPartStr && !/\W/.test( part ),
+ isTag = isPartStr && !rNonWord.test( part ),
isPartStrNotTag = isPartStr && !isTag;
if ( isTag ) {
@@ -3641,7 +3683,7 @@
i = 0,
l = checkSet.length;
- if ( isPartStr && !/\W/.test( part ) ) {
+ if ( isPartStr && !rNonWord.test( part ) ) {
part = part.toLowerCase();
for ( ; i < l; i++ ) {
@@ -3675,7 +3717,7 @@
doneName = done++,
checkFn = dirCheck;
- if ( typeof part === "string" && !/\W/.test(part) ) {
+ if ( typeof part === "string" && !rNonWord.test( part ) ) {
part = part.toLowerCase();
nodeCheck = part;
checkFn = dirNodeCheck;
@@ -3689,7 +3731,7 @@
doneName = done++,
checkFn = dirCheck;
- if ( typeof part === "string" && !/\W/.test( part ) ) {
+ if ( typeof part === "string" && !rNonWord.test( part ) ) {
part = part.toLowerCase();
nodeCheck = part;
checkFn = dirNodeCheck;
@@ -3732,7 +3774,7 @@
},
preFilter: {
CLASS: function( match, curLoop, inplace, result, not, isXML ) {
- match = " " + match[1].replace(/\\/g, "") + " ";
+ match = " " + match[1].replace( rBackslash, "" ) + " ";
if ( isXML ) {
return match;
@@ -3755,11 +3797,11 @@
},
ID: function( match ) {
- return match[1].replace(/\\/g, "");
+ return match[1].replace( rBackslash, "" );
},
TAG: function( match, curLoop ) {
- return match[1].toLowerCase();
+ return match[1].replace( rBackslash, "" ).toLowerCase();
},
CHILD: function( match ) {
@@ -3790,14 +3832,14 @@
},
ATTR: function( match, curLoop, inplace, result, not, isXML ) {
- var name = match[1] = match[1].replace(/\\/g, "");
+ var name = match[1] = match[1].replace( rBackslash, "" );
if ( !isXML && Expr.attrMap[name] ) {
match[1] = Expr.attrMap[name];
}
// Handle if an un-quoted value was used
- match[4] = ( match[4] || match[5] || "" ).replace(/\\/g, "");
+ match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" );
if ( match[2] === "~=" ) {
match[4] = " " + match[4] + " ";
@@ -3852,7 +3894,9 @@
selected: function( elem ) {
// Accessing this property makes selected-by-default
// options in Safari work properly
- elem.parentNode.selectedIndex;
+ if ( elem.parentNode ) {
+ elem.parentNode.selectedIndex;
+ }
return elem.selected === true;
},
@@ -3874,7 +3918,9 @@
},
text: function( elem ) {
- return "text" === elem.type;
+ // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
+ // use getAttribute instead to test this case
+ return "text" === elem.getAttribute( 'type' );
},
radio: function( elem ) {
return "radio" === elem.type;
@@ -4407,7 +4453,8 @@
// and working up from there (Thanks to Andrew Dupont for the technique)
// IE 8 doesn't work on object elements
} else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
- var old = context.getAttribute( "id" ),
+ var oldContext = context,
+ old = context.getAttribute( "id" ),
nid = old || id,
hasParent = context.parentNode,
relativeHierarchySelector = /^\s*[+~]/.test( query );
@@ -4429,7 +4476,7 @@
} catch(pseudoError) {
} finally {
if ( !old ) {
- context.removeAttribute( "id" );
+ oldContext.removeAttribute( "id" );
}
}
}
@@ -4845,11 +4892,11 @@
}, function( name, fn ) {
jQuery.fn[ name ] = function( until, selector ) {
var ret = jQuery.map( this, fn, until ),
- // The variable 'args' was introduced in
- // https://github.com/jquery/jquery/commit/52a0238
- // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed.
- // http://code.google.com/p/v8/issues/detail?id=1050
- args = slice.call(arguments);
+ // The variable 'args' was introduced in
+ // https://github.com/jquery/jquery/commit/52a0238
+ // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed.
+ // http://code.google.com/p/v8/issues/detail?id=1050
+ args = slice.call(arguments);
if ( !runtil.test( name ) ) {
selector = until;
@@ -4959,7 +5006,7 @@
rtbody = /<tbody/i,
rhtml = /<|&#?\w+;/,
rnocache = /<(?:script|object|embed|option|style)/i,
- // checked="checked" or checked (html5)
+ // checked="checked" or checked
rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
wrapMap = {
option: [ 1, "<select multiple='multiple'>", "</select>" ],
@@ -5111,7 +5158,7 @@
}
if ( elem.parentNode ) {
- elem.parentNode.removeChild( elem );
+ elem.parentNode.removeChild( elem );
}
}
}
@@ -5136,7 +5183,7 @@
},
clone: function( dataAndEvents, deepDataAndEvents ) {
- dataAndEvents = dataAndEvents == null ? true : dataAndEvents;
+ dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
return this.map( function () {
@@ -5305,8 +5352,8 @@
}
var internalKey = jQuery.expando,
- oldData = jQuery.data( src ),
- curData = jQuery.data( dest, oldData );
+ oldData = jQuery.data( src ),
+ curData = jQuery.data( dest, oldData );
// Switch to use the internal data object, if it exists, for the next
// stage of data copying
@@ -5320,7 +5367,7 @@
for ( var type in events ) {
for ( var i = 0, l = events[ type ].length; i < l; i++ ) {
- jQuery.event.add( dest, type, events[ type ][ i ], events[ type ][ i ].data );
+ jQuery.event.add( dest, type + ( events[ type ][ i ].namespace ? "." : "" ) + events[ type ][ i ].namespace, events[ type ][ i ], events[ type ][ i ].data );
}
}
}
@@ -5441,6 +5488,18 @@
};
});
+function getAll( elem ) {
+ if ( "getElementsByTagName" in elem ) {
+ return elem.getElementsByTagName( "*" );
+
+ } else if ( "querySelectorAll" in elem ) {
+ return elem.querySelectorAll( "*" );
+
+ } else {
+ return [];
+ }
+}
+
jQuery.extend({
clone: function( elem, dataAndEvents, deepDataAndEvents ) {
var clone = elem.cloneNode(true),
@@ -5448,17 +5507,20 @@
destElements,
i;
- if ( !jQuery.support.noCloneEvent && (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
+ if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
+ (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
// IE copies events bound via attachEvent when using cloneNode.
// Calling detachEvent on the clone will also remove the events
// from the original. In order to get around this, we use some
// proprietary methods to clear the events. Thanks to MooTools
// guys for this hotness.
+ cloneFixAttributes( elem, clone );
+
// Using Sizzle here is crazy slow, so we use getElementsByTagName
// instead
- srcElements = elem.getElementsByTagName("*");
- destElements = clone.getElementsByTagName("*");
+ srcElements = getAll( elem );
+ destElements = getAll( clone );
// Weird iteration because IE will replace the length property
// with an element if you are cloning the body and one of the
@@ -5466,30 +5528,25 @@
for ( i = 0; srcElements[i]; ++i ) {
cloneFixAttributes( srcElements[i], destElements[i] );
}
-
- cloneFixAttributes( elem, clone );
}
// Copy the events from the original to the clone
if ( dataAndEvents ) {
-
cloneCopyEvent( elem, clone );
- if ( deepDataAndEvents && "getElementsByTagName" in elem ) {
+ if ( deepDataAndEvents ) {
+ srcElements = getAll( elem );
+ destElements = getAll( clone );
- srcElements = elem.getElementsByTagName("*");
- destElements = clone.getElementsByTagName("*");
-
- if ( srcElements.length ) {
- for ( i = 0; srcElements[i]; ++i ) {
- cloneCopyEvent( srcElements[i], destElements[i] );
- }
+ for ( i = 0; srcElements[i]; ++i ) {
+ cloneCopyEvent( srcElements[i], destElements[i] );
}
}
}
+
// Return the cloned set
return clone;
- },
+},
clean: function( elems, context, fragment, scripts ) {
context = context || document;
@@ -5910,7 +5967,7 @@
if ( document.documentElement.currentStyle ) {
currentStyle = function( elem, name ) {
- var left,
+ var left,
ret = elem.currentStyle && elem.currentStyle[ name ],
rsLeft = elem.runtimeStyle && elem.runtimeStyle[ name ],
style = elem.style;
@@ -5988,8 +6045,10 @@
rbracket = /\[\]$/,
rCRLF = /\r?\n/g,
rhash = /#.*$/,
- rheaders = /^(.*?):\s*(.*?)\r?$/mg, // IE leaves an \r character at EOL
+ rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
rinput = /^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
+ // #7653, #8125, #8152: local protocol detection
+ rlocalProtocol = /(?:^file|^widget|\-extension):$/,
rnoContent = /^(?:GET|HEAD)$/,
rprotocol = /^\/\//,
rquery = /\?/,
@@ -5997,7 +6056,11 @@
rselectTextarea = /^(?:select|textarea)/i,
rspacesAjax = /\s+/,
rts = /([?&])_=[^&]*/,
- rurl = /^(\w+:)\/\/([^\/?#:]+)(?::(\d+))?/,
+ rucHeaders = /(^|\-)([a-z])/g,
+ rucHeadersFunc = function( _, $1, $2 ) {
+ return $1 + $2.toUpperCase();
+ },
+ rurl = /^([\w\+\.\-]+:)\/\/([^\/?#:]*)(?::(\d+))?/,
// Keep a copy of the old load method
_load = jQuery.fn.load,
@@ -6018,8 +6081,29 @@
* 2) the catchall symbol "*" can be used
* 3) selection will start with transport dataType and THEN go to "*" if needed
*/
- transports = {};
+ transports = {},
+ // Document location
+ ajaxLocation,
+
+ // Document location segments
+ ajaxLocParts;
+
+// #8138, IE may throw an exception when accessing
+// a field from document.location if document.domain has been set
+try {
+ ajaxLocation = document.location.href;
+} catch( e ) {
+ // Use the href attribute of an A element
+ // since IE will modify it given document.location
+ ajaxLocation = document.createElement( "a" );
+ ajaxLocation.href = "";
+ ajaxLocation = ajaxLocation.href;
+}
+
+// Segment location into parts
+ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() );
+
// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
function addToPrefiltersOrTransports( structure ) {
@@ -6057,7 +6141,7 @@
}
//Base inspection function for prefilters and transports
-function inspectPrefiltersOrTransports( structure, options, originalOptions, jXHR,
+function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR,
dataType /* internal */, inspected /* internal */ ) {
dataType = dataType || options.dataTypes[ 0 ];
@@ -6072,16 +6156,16 @@
selection;
for(; i < length && ( executeOnly || !selection ); i++ ) {
- selection = list[ i ]( options, originalOptions, jXHR );
+ selection = list[ i ]( options, originalOptions, jqXHR );
// If we got redirected to another dataType
- // we try there if not done already
+ // we try there if executing only and not done already
if ( typeof selection === "string" ) {
- if ( inspected[ selection ] ) {
+ if ( !executeOnly || inspected[ selection ] ) {
selection = undefined;
} else {
options.dataTypes.unshift( selection );
selection = inspectPrefiltersOrTransports(
- structure, options, originalOptions, jXHR, selection, inspected );
+ structure, options, originalOptions, jqXHR, selection, inspected );
}
}
}
@@ -6089,7 +6173,7 @@
// we try the catchall dataType if not done already
if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) {
selection = inspectPrefiltersOrTransports(
- structure, options, originalOptions, jXHR, "*", inspected );
+ structure, options, originalOptions, jqXHR, "*", inspected );
}
// unnecessary when only executing (prefilters)
// but it'll be ignored by the caller in that case
@@ -6121,7 +6205,7 @@
if ( jQuery.isFunction( params ) ) {
// We assume that it's the callback
callback = params;
- params = null;
+ params = undefined;
// Otherwise, build a param string
} else if ( typeof params === "object" ) {
@@ -6139,14 +6223,14 @@
dataType: "html",
data: params,
// Complete callback (responseText is used internally)
- complete: function( jXHR, status, responseText ) {
- // Store the response as specified by the jXHR object
- responseText = jXHR.responseText;
+ complete: function( jqXHR, status, responseText ) {
+ // Store the response as specified by the jqXHR object
+ responseText = jqXHR.responseText;
// If successful, inject the HTML into all the matched elements
- if ( jXHR.isResolved() ) {
+ if ( jqXHR.isResolved() ) {
// #4825: Get the actual response in case
// a dataFilter is present in ajaxSettings
- jXHR.done(function( r ) {
+ jqXHR.done(function( r ) {
responseText = r;
});
// See if a selector was specified
@@ -6165,7 +6249,7 @@
}
if ( callback ) {
- self.each( callback, [ responseText, status, jXHR ] );
+ self.each( callback, [ responseText, status, jqXHR ] );
}
}
});
@@ -6213,7 +6297,7 @@
if ( jQuery.isFunction( data ) ) {
type = type || callback;
callback = data;
- data = null;
+ data = undefined;
}
return jQuery.ajax({
@@ -6229,22 +6313,39 @@
jQuery.extend({
getScript: function( url, callback ) {
- return jQuery.get( url, null, callback, "script" );
+ return jQuery.get( url, undefined, callback, "script" );
},
getJSON: function( url, data, callback ) {
return jQuery.get( url, data, callback, "json" );
},
- ajaxSetup: function( settings ) {
- jQuery.extend( true, jQuery.ajaxSettings, settings );
- if ( settings.context ) {
- jQuery.ajaxSettings.context = settings.context;
+ // Creates a full fledged settings object into target
+ // with both ajaxSettings and settings fields.
+ // If target is omitted, writes into ajaxSettings.
+ ajaxSetup: function ( target, settings ) {
+ if ( !settings ) {
+ // Only one parameter, we extend ajaxSettings
+ settings = target;
+ target = jQuery.extend( true, jQuery.ajaxSettings, settings );
+ } else {
+ // target was provided, we extend into it
+ jQuery.extend( true, target, jQuery.ajaxSettings, settings );
}
+ // Flatten fields we don't want deep extended
+ for( var field in { context: 1, url: 1 } ) {
+ if ( field in settings ) {
+ target[ field ] = settings[ field ];
+ } else if( field in jQuery.ajaxSettings ) {
+ target[ field ] = jQuery.ajaxSettings[ field ];
+ }
+ }
+ return target;
},
ajaxSettings: {
- url: location.href,
+ url: ajaxLocation,
+ isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
global: true,
type: "GET",
contentType: "application/x-www-form-urlencoded",
@@ -6306,9 +6407,8 @@
// Main method
ajax: function( url, options ) {
- // If options is not an object,
- // we simulate pre-1.5 signature
- if ( typeof options !== "object" ) {
+ // If url is an object, simulate pre-1.5 signature
+ if ( typeof url === "object" ) {
options = url;
url = undefined;
}
@@ -6317,19 +6417,22 @@
options = options || {};
var // Create the final options object
- s = jQuery.extend( true, {}, jQuery.ajaxSettings, options ),
- // Callbacks contexts
- // We force the original context if it exists
- // or take it from jQuery.ajaxSettings otherwise
- // (plain objects used as context get extended)
- callbackContext =
- ( s.context = ( "context" in options ? options : jQuery.ajaxSettings ).context ) || s,
- globalEventContext = callbackContext === s ? jQuery.event : jQuery( callbackContext ),
+ s = jQuery.ajaxSetup( {}, options ),
+ // Callbacks context
+ callbackContext = s.context || s,
+ // Context for global events
+ // It's the callbackContext if one was provided in the options
+ // and if it's a DOM node or a jQuery collection
+ globalEventContext = callbackContext !== s &&
+ ( callbackContext.nodeType || callbackContext instanceof jQuery ) ?
+ jQuery( callbackContext ) : jQuery.event,
// Deferreds
deferred = jQuery.Deferred(),
completeDeferred = jQuery._Deferred(),
// Status-dependent callbacks
statusCode = s.statusCode || {},
+ // ifModified key
+ ifModifiedKey,
// Headers (they are sent all at once)
requestHeaders = {},
// Response headers
@@ -6340,22 +6443,22 @@
// timeout handle
timeoutTimer,
// Cross-domain detection vars
- loc = document.location,
- protocol = loc.protocol || "http:",
parts,
- // The jXHR state
+ // The jqXHR state
state = 0,
+ // To know if global events are to be dispatched
+ fireGlobals,
// Loop variable
i,
// Fake xhr
- jXHR = {
+ jqXHR = {
readyState: 0,
// Caches the header
setRequestHeader: function( name, value ) {
- if ( state === 0 ) {
- requestHeaders[ name.toLowerCase() ] = value;
+ if ( !state ) {
+ requestHeaders[ name.toLowerCase().replace( rucHeaders, rucHeadersFunc ) ] = value;
}
return this;
},
@@ -6377,9 +6480,17 @@
}
match = responseHeaders[ key.toLowerCase() ];
}
- return match || null;
+ return match === undefined ? null : match;
},
+ // Overrides response content-type header
+ overrideMimeType: function( type ) {
+ if ( !state ) {
+ s.mimeType = type;
+ }
+ return this;
+ },
+
// Cancel the request
abort: function( statusText ) {
statusText = statusText || "abort";
@@ -6394,7 +6505,7 @@
// Callback for when everything is done
// It is defined here because jslint complains if it is declared
// at the end of the function (which would be more logical and readable)
- function done( status, statusText, responses, headers) {
+ function done( status, statusText, responses, headers ) {
// Called once
if ( state === 2 ) {
@@ -6410,19 +6521,19 @@
}
// Dereference transport for early garbage collection
- // (no matter how long the jXHR object will be used)
+ // (no matter how long the jqXHR object will be used)
transport = undefined;
// Cache response headers
responseHeadersString = headers || "";
// Set readyState
- jXHR.readyState = status ? 4 : 0;
+ jqXHR.readyState = status ? 4 : 0;
var isSuccess,
success,
error,
- response = responses ? ajaxHandleResponses( s, jXHR, responses ) : undefined,
+ response = responses ? ajaxHandleResponses( s, jqXHR, responses ) : undefined,
lastModified,
etag;
@@ -6432,11 +6543,11 @@
// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
if ( s.ifModified ) {
- if ( ( lastModified = jXHR.getResponseHeader( "Last-Modified" ) ) ) {
- jQuery.lastModified[ s.url ] = lastModified;
+ if ( ( lastModified = jqXHR.getResponseHeader( "Last-Modified" ) ) ) {
+ jQuery.lastModified[ ifModifiedKey ] = lastModified;
}
- if ( ( etag = jXHR.getResponseHeader( "Etag" ) ) ) {
- jQuery.etag[ s.url ] = etag;
+ if ( ( etag = jqXHR.getResponseHeader( "Etag" ) ) ) {
+ jQuery.etag[ ifModifiedKey ] = etag;
}
}
@@ -6463,7 +6574,7 @@
// We extract error from statusText
// then normalize statusText and status for non-aborts
error = statusText;
- if( status ) {
+ if( !statusText || status ) {
statusText = "error";
if ( status < 0 ) {
status = 0;
@@ -6472,30 +6583,30 @@
}
// Set data for the fake xhr object
- jXHR.status = status;
- jXHR.statusText = statusText;
+ jqXHR.status = status;
+ jqXHR.statusText = statusText;
// Success/Error
if ( isSuccess ) {
- deferred.resolveWith( callbackContext, [ success, statusText, jXHR ] );
+ deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
} else {
- deferred.rejectWith( callbackContext, [ jXHR, statusText, error ] );
+ deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
}
// Status-dependent callbacks
- jXHR.statusCode( statusCode );
+ jqXHR.statusCode( statusCode );
statusCode = undefined;
- if ( s.global ) {
+ if ( fireGlobals ) {
globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ),
- [ jXHR, s, isSuccess ? success : error ] );
+ [ jqXHR, s, isSuccess ? success : error ] );
}
// Complete
- completeDeferred.resolveWith( callbackContext, [ jXHR, statusText ] );
+ completeDeferred.resolveWith( callbackContext, [ jqXHR, statusText ] );
- if ( s.global ) {
- globalEventContext.trigger( "ajaxComplete", [ jXHR, s] );
+ if ( fireGlobals ) {
+ globalEventContext.trigger( "ajaxComplete", [ jqXHR, s] );
// Handle the global AJAX counter
if ( !( --jQuery.active ) ) {
jQuery.event.trigger( "ajaxStop" );
@@ -6504,13 +6615,13 @@
}
// Attach deferreds
- deferred.promise( jXHR );
- jXHR.success = jXHR.done;
- jXHR.error = jXHR.fail;
- jXHR.complete = completeDeferred.done;
+ deferred.promise( jqXHR );
+ jqXHR.success = jqXHR.done;
+ jqXHR.error = jqXHR.fail;
+ jqXHR.complete = completeDeferred.done;
// Status-dependent callbacks
- jXHR.statusCode = function( map ) {
+ jqXHR.statusCode = function( map ) {
if ( map ) {
var tmp;
if ( state < 2 ) {
@@ -6518,8 +6629,8 @@
statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ];
}
} else {
- tmp = map[ jXHR.status ];
- jXHR.then( tmp, tmp );
+ tmp = map[ jqXHR.status ];
+ jqXHR.then( tmp, tmp );
}
}
return this;
@@ -6528,7 +6639,7 @@
// Remove hash character (#7531: and string promotion)
// Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
// We also use the url parameter if available
- s.url = ( "" + ( url || s.url ) ).replace( rhash, "" ).replace( rprotocol, protocol + "//" );
+ s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
// Extract dataTypes list
s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( rspacesAjax );
@@ -6537,9 +6648,9 @@
if ( !s.crossDomain ) {
parts = rurl.exec( s.url.toLowerCase() );
s.crossDomain = !!( parts &&
- ( parts[ 1 ] != protocol || parts[ 2 ] != loc.hostname ||
+ ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] ||
( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
- ( loc.port || ( protocol === "http:" ? 80 : 443 ) ) )
+ ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
);
}
@@ -6549,8 +6660,16 @@
}
// Apply prefilters
- inspectPrefiltersOrTransports( prefilters, s, options, jXHR );
+ inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
+ // If request was aborted inside a prefiler, stop there
+ if ( state === 2 ) {
+ return false;
+ }
+
+ // We can fire global events as of now if asked to
+ fireGlobals = s.global;
+
// Uppercase the type
s.type = s.type.toUpperCase();
@@ -6558,7 +6677,7 @@
s.hasContent = !rnoContent.test( s.type );
// Watch for a new set of requests
- if ( s.global && jQuery.active++ === 0 ) {
+ if ( fireGlobals && jQuery.active++ === 0 ) {
jQuery.event.trigger( "ajaxStart" );
}
@@ -6570,6 +6689,9 @@
s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data;
}
+ // Get ifModifiedKey before adding the anti-cache parameter
+ ifModifiedKey = s.url;
+
// Add anti-cache in url if needed
if ( s.cache === false ) {
@@ -6584,77 +6706,77 @@
// Set the correct header, if data is being sent
if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
- requestHeaders[ "content-type" ] = s.contentType;
+ requestHeaders[ "Content-Type" ] = s.contentType;
}
// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
if ( s.ifModified ) {
- if ( jQuery.lastModified[ s.url ] ) {
- requestHeaders[ "if-modified-since" ] = jQuery.lastModified[ s.url ];
+ ifModifiedKey = ifModifiedKey || s.url;
+ if ( jQuery.lastModified[ ifModifiedKey ] ) {
+ requestHeaders[ "If-Modified-Since" ] = jQuery.lastModified[ ifModifiedKey ];
}
- if ( jQuery.etag[ s.url ] ) {
- requestHeaders[ "if-none-match" ] = jQuery.etag[ s.url ];
+ if ( jQuery.etag[ ifModifiedKey ] ) {
+ requestHeaders[ "If-None-Match" ] = jQuery.etag[ ifModifiedKey ];
}
}
// Set the Accepts header for the server, depending on the dataType
- requestHeaders.accept = s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
+ requestHeaders.Accept = s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", */*; q=0.01" : "" ) :
s.accepts[ "*" ];
// Check for headers option
for ( i in s.headers ) {
- requestHeaders[ i.toLowerCase() ] = s.headers[ i ];
+ jqXHR.setRequestHeader( i, s.headers[ i ] );
}
// Allow custom headers/mimetypes and early abort
- if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jXHR, s ) === false || state === 2 ) ) {
+ if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
// Abort if not done already
- done( 0, "abort" );
- // Return false
- jXHR = false;
+ jqXHR.abort();
+ return false;
- } else {
+ }
- // Install callbacks on deferreds
- for ( i in { success: 1, error: 1, complete: 1 } ) {
- jXHR[ i ]( s[ i ] );
- }
+ // Install callbacks on deferreds
+ for ( i in { success: 1, error: 1, complete: 1 } ) {
+ jqXHR[ i ]( s[ i ] );
+ }
- // Get transport
- transport = inspectPrefiltersOrTransports( transports, s, options, jXHR );
+ // Get transport
+ transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
- // If no transport, we auto-abort
- if ( !transport ) {
- done( -1, "No Transport" );
- } else {
- // Set state as sending
- state = jXHR.readyState = 1;
- // Send global event
- if ( s.global ) {
- globalEventContext.trigger( "ajaxSend", [ jXHR, s ] );
- }
- // Timeout
- if ( s.async && s.timeout > 0 ) {
- timeoutTimer = setTimeout( function(){
- jXHR.abort( "timeout" );
- }, s.timeout );
- }
+ // If no transport, we auto-abort
+ if ( !transport ) {
+ done( -1, "No Transport" );
+ } else {
+ jqXHR.readyState = 1;
+ // Send global event
+ if ( fireGlobals ) {
+ globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
+ }
+ // Timeout
+ if ( s.async && s.timeout > 0 ) {
+ timeoutTimer = setTimeout( function(){
+ jqXHR.abort( "timeout" );
+ }, s.timeout );
+ }
- try {
- transport.send( requestHeaders, done );
- } catch (e) {
- // Propagate exception as error if not done
- if ( status < 2 ) {
- done( -1, e );
- // Simply rethrow otherwise
- } else {
- jQuery.error( e );
- }
+ try {
+ state = 1;
+ transport.send( requestHeaders, done );
+ } catch (e) {
+ // Propagate exception as error if not done
+ if ( status < 2 ) {
+ done( -1, e );
+ // Simply rethrow otherwise
+ } else {
+ jQuery.error( e );
}
}
}
- return jXHR;
+
+ return jqXHR;
},
// Serialize an array of form elements or a set of
@@ -6673,7 +6795,7 @@
}
// If an array was passed in, assume that it is an array of form elements.
- if ( jQuery.isArray( a ) || a.jquery ) {
+ if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
// Serialize the form elements
jQuery.each( a, function() {
add( this.name, this.value );
@@ -6720,9 +6842,9 @@
// Serialize object item.
} else {
- jQuery.each( obj, function( k, v ) {
- buildParams( prefix + "[" + k + "]", v, traditional, add );
- });
+ for ( var name in obj ) {
+ buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
+ }
}
} else {
@@ -6749,7 +6871,7 @@
* - finds the right dataType (mediates between content-type and expected dataType)
* - returns the corresponding response
*/
-function ajaxHandleResponses( s, jXHR, responses ) {
+function ajaxHandleResponses( s, jqXHR, responses ) {
var contents = s.contents,
dataTypes = s.dataTypes,
@@ -6762,7 +6884,7 @@
// Fill responseXXX fields
for( type in responseFields ) {
if ( type in responses ) {
- jXHR[ responseFields[type] ] = responses[ type ];
+ jqXHR[ responseFields[type] ] = responses[ type ];
}
}
@@ -6770,7 +6892,7 @@
while( dataTypes[ 0 ] === "*" ) {
dataTypes.shift();
if ( ct === undefined ) {
- ct = jXHR.getResponseHeader( "content-type" );
+ ct = s.mimeType || jqXHR.getResponseHeader( "content-type" );
}
}
@@ -6822,8 +6944,9 @@
}
var dataTypes = s.dataTypes,
- converters = s.converters,
+ converters = {},
i,
+ key,
length = dataTypes.length,
tmp,
// Current and previous dataTypes
@@ -6840,6 +6963,16 @@
// For each dataType in the chain
for( i = 1; i < length; i++ ) {
+ // Create converters map
+ // with lowercased keys
+ if ( i === 1 ) {
+ for( key in s.converters ) {
+ if( typeof key === "string" ) {
+ converters[ key.toLowerCase() ] = s.converters[ key ];
+ }
+ }
+ }
+
// Get the dataTypes
prev = current;
current = dataTypes[ i ];
@@ -6902,9 +7035,9 @@
});
// Detect, normalize options and install callbacks for jsonp requests
-jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, dataIsString /* internal */ ) {
+jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
- dataIsString = ( typeof s.data === "string" );
+ var dataIsString = ( typeof s.data === "string" );
if ( s.dataTypes[ 0 ] === "jsonp" ||
originalSettings.jsonpCallback ||
@@ -6918,7 +7051,15 @@
previous = window[ jsonpCallback ],
url = s.url,
data = s.data,
- replace = "$1" + jsonpCallback + "$2";
+ replace = "$1" + jsonpCallback + "$2",
+ cleanUp = function() {
+ // Set callback back to previous value
+ window[ jsonpCallback ] = previous;
+ // Call if it was a function and we have a response
+ if ( responseContainer && jQuery.isFunction( previous ) ) {
+ window[ jsonpCallback ]( responseContainer[ 0 ] );
+ }
+ };
if ( s.jsonp !== false ) {
url = url.replace( jsre, replace );
@@ -6936,32 +7077,17 @@
s.url = url;
s.data = data;
+ // Install callback
window[ jsonpCallback ] = function( response ) {
responseContainer = [ response ];
};
- s.complete = [ function() {
+ // Install cleanUp function
+ jqXHR.then( cleanUp, cleanUp );
- // Set callback back to previous value
- window[ jsonpCallback ] = previous;
-
- // Call if it was a function and we have a response
- if ( previous) {
- if ( responseContainer && jQuery.isFunction( previous ) ) {
- window[ jsonpCallback ] ( responseContainer[ 0 ] );
- }
- } else {
- // else, more memory leak avoidance
- try{
- delete window[ jsonpCallback ];
- } catch( e ) {}
- }
-
- }, s.complete ];
-
// Use data converter to retrieve json after script execution
s.converters["script json"] = function() {
- if ( ! responseContainer ) {
+ if ( !responseContainer ) {
jQuery.error( jsonpCallback + " was not called" );
}
return responseContainer[ 0 ];
@@ -6981,10 +7107,10 @@
// Install script dataType
jQuery.ajaxSetup({
accepts: {
- script: "text/javascript, application/javascript"
+ script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
},
contents: {
- script: /javascript/
+ script: /javascript|ecmascript/
},
converters: {
"text script": function( text ) {
@@ -7012,7 +7138,7 @@
if ( s.crossDomain ) {
var script,
- head = document.getElementsByTagName( "head" )[ 0 ] || document.documentElement;
+ head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement;
return {
@@ -7067,18 +7193,36 @@
-var // Next active xhr id
+var // #5280: next active xhr id and list of active xhrs' callbacks
xhrId = jQuery.now(),
+ xhrCallbacks,
- // active xhrs
- xhrs = {},
-
- // #5280: see below
- xhrUnloadAbortInstalled,
-
// XHR used to determine supports properties
testXHR;
+// #5280: Internet Explorer will keep connections alive if we don't abort on unload
+function xhrOnUnloadAbort() {
+ jQuery( window ).unload(function() {
+ // Abort all pending requests
+ for ( var key in xhrCallbacks ) {
+ xhrCallbacks[ key ]( 0, 1 );
+ }
+ });
+}
+
+// Functions to create xhrs
+function createStandardXHR() {
+ try {
+ return new window.XMLHttpRequest();
+ } catch( e ) {}
+}
+
+function createActiveXHR() {
+ try {
+ return new window.ActiveXObject( "Microsoft.XMLHTTP" );
+ } catch( e ) {}
+}
+
// Create the request object
// (This is still attached to ajaxSettings for backward compatibility)
jQuery.ajaxSettings.xhr = window.ActiveXObject ?
@@ -7089,27 +7233,13 @@
* we need a fallback.
*/
function() {
- if ( window.location.protocol !== "file:" ) {
- try {
- return new window.XMLHttpRequest();
- } catch( xhrError ) {}
- }
-
- try {
- return new window.ActiveXObject("Microsoft.XMLHTTP");
- } catch( activeError ) {}
+ return !this.isLocal && createStandardXHR() || createActiveXHR();
} :
// For all other browsers, use the standard XMLHttpRequest object
- function() {
- return new window.XMLHttpRequest();
- };
+ createStandardXHR;
// Test if we can create an xhr object
-try {
- testXHR = jQuery.ajaxSettings.xhr();
-} catch( xhrCreationException ) {}
-
-//Does this browser support XHR requests?
+testXHR = jQuery.ajaxSettings.xhr();
jQuery.support.ajax = !!testXHR;
// Does this browser support crossDomain XHR requests
@@ -7130,26 +7260,10 @@
return {
send: function( headers, complete ) {
- // #5280: we need to abort on unload or IE will keep connections alive
- if ( !xhrUnloadAbortInstalled ) {
-
- xhrUnloadAbortInstalled = 1;
-
- jQuery(window).bind( "unload", function() {
-
- // Abort all pending requests
- jQuery.each( xhrs, function( _, xhr ) {
- if ( xhr.onreadystatechange ) {
- xhr.onreadystatechange( 1 );
- }
- } );
-
- } );
- }
-
// Get a new xhr
var xhr = s.xhr(),
- handle;
+ handle,
+ i;
// Open the socket
// Passing null username, generates a login popup on Opera (#2865)
@@ -7159,19 +7273,31 @@
xhr.open( s.type, s.url, s.async );
}
+ // Apply custom fields if provided
+ if ( s.xhrFields ) {
+ for ( i in s.xhrFields ) {
+ xhr[ i ] = s.xhrFields[ i ];
+ }
+ }
+
+ // Override mime type if needed
+ if ( s.mimeType && xhr.overrideMimeType ) {
+ xhr.overrideMimeType( s.mimeType );
+ }
+
// Requested-With header
// Not set for crossDomain requests with no content
// (see why at http://trac.dojotoolkit.org/ticket/9486)
// Won't change header if already provided
- if ( !( s.crossDomain && !s.hasContent ) && !headers["x-requested-with"] ) {
- headers[ "x-requested-with" ] = "XMLHttpRequest";
+ if ( !( s.crossDomain && !s.hasContent ) && !headers["X-Requested-With"] ) {
+ headers[ "X-Requested-With" ] = "XMLHttpRequest";
}
// Need an extra try/catch for cross domain requests in Firefox 3
try {
- jQuery.each( headers, function( key, value ) {
- xhr.setRequestHeader( key, value );
- } );
+ for ( i in headers ) {
+ xhr.setRequestHeader( i, headers[ i ] );
+ }
} catch( _ ) {}
// Do send the request
@@ -7182,75 +7308,79 @@
// Listener
callback = function( _, isAbort ) {
- // Was never called and is aborted or complete
- if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
+ var status,
+ statusText,
+ responseHeaders,
+ responses,
+ xml;
- // Only called once
- callback = 0;
+ // Firefox throws exceptions when accessing properties
+ // of an xhr when a network error occured
+ // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:...
+ try {
- // Do not keep as active anymore
- if ( handle ) {
- xhr.onreadystatechange = jQuery.noop;
- delete xhrs[ handle ];
- }
+ // Was never called and is aborted or complete
+ if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
- // If it's an abort
- if ( isAbort ) {
- // Abort it manually if needed
- if ( xhr.readyState !== 4 ) {
- xhr.abort();
+ // Only called once
+ callback = undefined;
+
+ // Do not keep as active anymore
+ if ( handle ) {
+ xhr.onreadystatechange = jQuery.noop;
+ delete xhrCallbacks[ handle ];
}
- } else {
- // Get info
- var status = xhr.status,
- statusText,
- responseHeaders = xhr.getAllResponseHeaders(),
- responses = {},
+
+ // If it's an abort
+ if ( isAbort ) {
+ // Abort it manually if needed
+ if ( xhr.readyState !== 4 ) {
+ xhr.abort();
+ }
+ } else {
+ status = xhr.status;
+ responseHeaders = xhr.getAllResponseHeaders();
+ responses = {};
xml = xhr.responseXML;
- // Construct response list
- if ( xml && xml.documentElement /* #4958 */ ) {
- responses.xml = xml;
- }
- responses.text = xhr.responseText;
+ // Construct response list
+ if ( xml && xml.documentElement /* #4958 */ ) {
+ responses.xml = xml;
+ }
+ responses.text = xhr.responseText;
- // Firefox throws an exception when accessing
- // statusText for faulty cross-domain requests
- try {
- statusText = xhr.statusText;
- } catch( e ) {
- // We normalize with Webkit giving an empty statusText
- statusText = "";
- }
+ // Firefox throws an exception when accessing
+ // statusText for faulty cross-domain requests
+ try {
+ statusText = xhr.statusText;
+ } catch( e ) {
+ // We normalize with Webkit giving an empty statusText
+ statusText = "";
+ }
- // Filter status for non standard behaviours
- status =
- // Opera returns 0 when it should be 304
- // Webkit returns 0 for failing cross-domain no matter the real status
- status === 0 ?
- (
- // Webkit, Firefox: filter out faulty cross-domain requests
- !s.crossDomain || statusText ?
- (
- // Opera: filter out real aborts #6060
- responseHeaders ?
- 304 :
- 0
- ) :
- // We assume 302 but could be anything cross-domain related
- 302
- ) :
- (
- // IE sometimes returns 1223 when it should be 204 (see #1450)
- status == 1223 ?
- 204 :
- status
- );
+ // Filter status for non standard behaviors
- // Call complete
- complete( status, statusText, responses, responseHeaders );
+ // If the request is local and we have data: assume a success
+ // (success with no data won't get notified, that's the best we
+ // can do given current implementations)
+ if ( !status && s.isLocal && !s.crossDomain ) {
+ status = responses.text ? 200 : 404;
+ // IE - #1450: sometimes returns 1223 when it should be 204
+ } else if ( status === 1223 ) {
+ status = 204;
+ }
+ }
}
+ } catch( firefoxAccessException ) {
+ if ( !isAbort ) {
+ complete( -1, firefoxAccessException );
+ }
}
+
+ // Call complete if needed
+ if ( responses ) {
+ complete( status, statusText, responses, responseHeaders );
+ }
};
// if we're in sync mode or it's in cache
@@ -7259,10 +7389,15 @@
if ( !s.async || xhr.readyState === 4 ) {
callback();
} else {
- // Add to list of active xhrs
+ // Create the active xhrs callbacks list if needed
+ // and attach the unload handler
+ if ( !xhrCallbacks ) {
+ xhrCallbacks = {};
+ xhrOnUnloadAbort();
+ }
+ // Add to list of active xhrs callbacks
handle = xhrId++;
- xhrs[ handle ] = xhr;
- xhr.onreadystatechange = callback;
+ xhr.onreadystatechange = xhrCallbacks[ handle ] = callback;
}
},
@@ -7464,11 +7599,11 @@
} else {
var parts = rfxnum.exec(val),
- start = e.cur() || 0;
+ start = e.cur();
if ( parts ) {
var end = parseFloat( parts[2] ),
- unit = parts[3] || "px";
+ unit = parts[3] || ( jQuery.cssNumber[ name ] ? "" : "px" );
// We need to compute starting value
if ( unit !== "px" ) {
@@ -7615,8 +7750,12 @@
return this.elem[ this.prop ];
}
- var r = parseFloat( jQuery.css( this.elem, this.prop ) );
- return r || 0;
+ var parsed,
+ r = jQuery.css( this.elem, this.prop );
+ // Empty strings, null, undefined and "auto" are converted to 0,
+ // complex values such as "rotate(1rad)" are returned as is,
+ // simple values such as "10px" are parsed to Float.
+ return isNaN( parsed = parseFloat( r ) ) ? !r || r === "auto" ? 0 : r : parsed;
},
// Start an animation from one number to another
@@ -7627,7 +7766,7 @@
this.startTime = jQuery.now();
this.start = from;
this.end = to;
- this.unit = unit || this.unit || "px";
+ this.unit = unit || this.unit || ( jQuery.cssNumber[ this.prop ] ? "" : "px" );
this.now = this.start;
this.pos = this.state = 0;
@@ -8078,7 +8217,7 @@
if ( win ) {
win.scrollTo(
!i ? val : jQuery(win).scrollLeft(),
- i ? val : jQuery(win).scrollTop()
+ i ? val : jQuery(win).scrollTop()
);
} else {
@@ -8173,4 +8312,5 @@
});
+window.jQuery = window.$ = jQuery;
})(window);
13 years, 1 month