JBoss Rich Faces SVN: r10064 - trunk/test-applications/jsp/src/main/webapp/ModalPanel.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-08-13 08:13:06 -0400 (Wed, 13 Aug 2008)
New Revision: 10064
Modified:
trunk/test-applications/jsp/src/main/webapp/ModalPanel/ModalPanel.jsp
Log:
+br
Modified: trunk/test-applications/jsp/src/main/webapp/ModalPanel/ModalPanel.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/ModalPanel/ModalPanel.jsp 2008-08-13 11:58:19 UTC (rev 10063)
+++ trunk/test-applications/jsp/src/main/webapp/ModalPanel/ModalPanel.jsp 2008-08-13 12:13:06 UTC (rev 10064)
@@ -13,7 +13,11 @@
}
</script>
<style>
-.rich-mpnl-mask-div {
+.dr-mpnl-shadow {
+ top: 5px;
+ left: 5px;
+ opacity: 0.9;
+ filter: alpha(opacity = 200);
}
</style>
@@ -24,8 +28,7 @@
<rich:modalPanel id="modalPanelID"
binding="#{modalPanel.htmlModalPanel}"
visualOptions="#{modalPanel.visualOptions}" left="#{modalPanel.left}"
- top="#{modalPanel.top}"
- height="#{modalPanel.height}"
+ top="#{modalPanel.top}" height="#{modalPanel.height}"
width="#{modalPanel.width}" moveable="#{modalPanel.moveable}"
resizeable="#{modalPanel.resizeable}"
keepVisualState="#{modalPanel.keepVisualState}"
@@ -33,7 +36,7 @@
autosized="#{modalPanel.autosized}"
shadowDepth="#{modalPanel.shadowDepth}"
shadowOpacity="#{modalPanel.shadowOpacity}"
- showWhenRendered="true"
+ showWhenRendered="#{modalPanel.showWhenRendered}"
trimOverlayedElements="#{modalPanel.trimOverlayedElements}"
controlsClass="#{style.controlsClass}"
headerClass="#{style.headerClass}" styleClass="#{style.styleClass}"
@@ -44,39 +47,39 @@
onmaskmousemove="#{event.onmaskmousemove}"
onmaskmouseout="#{event.onmaskmouseout}"
onmaskmouseover="#{event.onmaskmouseover}"
- onmaskmouseup="#{event.onmaskmouseup}"
- onmove="#{event.onmove}"
- onresize="#{event.onresize}" onshow="#{event.onshow}"
+ onmaskmouseup="#{event.onmaskmouseup}" onmove="#{event.onmove}"
+ onresize="#{event.onresize}" onshow="#{event.onshow}"
onbeforehide="#{event.onbeforehide}"
- onbeforeshow="#{event.onbeforeshow}" tridentIVEngineSelectBehavior="hide">
+ onbeforeshow="#{event.onbeforeshow}"
+ tridentIVEngineSelectBehavior="hide" >
<f:facet name="header">
<h:outputText value="Heder goes here..." />
</f:facet>
<f:facet name="controls">
- <h:graphicImage value="/pics/error.gif" onclick="Richfaces.hideModalPanel('modalPanelID'); return false;" />
+ <h:graphicImage value="/pics/error.gif"
+ onclick="Richfaces.hideModalPanel('modalPanelID'); return false;" />
</f:facet>
-
+
<div style="FONT-WEIGHT: bold;">rich:findComponent</div>
<h:panelGrid columns="2" id="findComponentID">
- <tbody id="tbodyID">
- <tr>
- <td>
- <a4j:commandLink value="getSize" reRender="findID" onclick="javascript:multiply(#{rich:findComponent('modalPanelID').height},#{rich:findComponent('modalPanelID').width});"></a4j:commandLink>
- </td>
- </tr>
- <tr>
- <td>
- <h:outputText/>
- </td>
- </tr>
+ <tbody id="tbodyID">
+ <tr>
+ <td><a4j:commandLink value="getSize" reRender="findID"
+ onclick="javascript:multiply(#{rich:findComponent('modalPanelID').height},#{rich:findComponent('modalPanelID').width});"></a4j:commandLink>
+ </td>
+ </tr>
+ <tr>
+ <td><h:outputText /></td>
+ </tr>
</tbody>
</h:panelGrid>
<br />
<h:outputText value="This is Modal Panel example" styleClass="text1" />
- <h:selectOneMenu value="#{richBean.srcContainer}" >
+ <br/>
+ <h:selectOneMenu value="#{richBean.srcContainer}">
<f:selectItems value="#{richBean.listContainer}" />
</h:selectOneMenu>
-
+
<h:inputText value="#{modalPanel.inputTextTest}" />
<h:selectOneListbox value="#{modalPanel.selectOneListboxTest}">
<f:selectItem itemLabel="1" itemValue="1" />
@@ -84,54 +87,86 @@
<f:selectItem itemLabel="3" itemValue="3" />
</h:selectOneListbox>
- <f:verbatim><br /><br /></f:verbatim>
+ <f:verbatim>
+ <br />
+ <br />
+ </f:verbatim>
<rich:spacer width="20" height="20"></rich:spacer>
- <h:outputLink value="http://localhost:8081/jsp/"><f:verbatim>http://localhost:8081/jsp/</f:verbatim></h:outputLink>
- <f:verbatim><br /><br /></f:verbatim>
- <a4j:commandLink onclick="Richfaces.showModalPanel('modalPanel2ID');return false;" value="show ModalPanel 2"></a4j:commandLink>
- <f:verbatim><br /><br /></f:verbatim>
- <h:outputLink onclick="Richfaces.hideModalPanel('modalPanelID');return false;" ><f:verbatim>Close</f:verbatim></h:outputLink>
+ <h:outputLink value="http://localhost:8081/jsp/">
+ <f:verbatim>http://localhost:8081/jsp/</f:verbatim>
+ </h:outputLink>
+ <f:verbatim>
+ <br />
+ <br />
+ </f:verbatim>
+ <a4j:commandLink
+ onclick="Richfaces.showModalPanel('modalPanel2ID');return false;"
+ value="show ModalPanel 2"></a4j:commandLink>
+ <f:verbatim>
+ <br />
+ <br />
+ </f:verbatim>
+ <h:outputLink
+ onclick="Richfaces.hideModalPanel('modalPanelID');return false;">
+ <f:verbatim>Close</f:verbatim>
+ </h:outputLink>
+ <br />
</rich:modalPanel>
<rich:modalPanel id="modalPanel2ID" autosized="true" resizeable="false">
<br />
<h:inputText value="input"></h:inputText>
<br />
- <h:outputLink onclick="Richfaces.hideModalPanel('modalPanel2ID');return false;" ><f:verbatim>Close</f:verbatim></h:outputLink>
- <rich:pickList id="pickListID" >
+ <h:outputLink
+ onclick="Richfaces.hideModalPanel('modalPanel2ID');return false;">
+ <f:verbatim>Close</f:verbatim>
+ </h:outputLink>
+ <rich:pickList id="pickListID">
<f:selectItem itemValue="selectItem 0" itemLabel="selectItem 0" />
<f:selectItem itemValue="selectItem 1" itemLabel="selectItem 1" />
<f:selectItem itemValue="selectItem 2" itemLabel="selectItem 2" />
-
+
</rich:pickList>
<br />
<a4j:commandButton reRender="pickListID" value="refresh target"></a4j:commandButton>
</rich:modalPanel>
- <rich:modalPanel id="modalPanel3ID" minHeight="100" minWidth="200" moveable="true" autosized="true" resizeable="false">
+ <rich:modalPanel id="modalPanel3ID" minHeight="100" minWidth="200"
+ moveable="true" autosized="true" resizeable="false">
<f:facet name="header">
<h:outputText value="Events..." />
</f:facet>
<f:facet name="controls">
- <h:commandLink value="Close" onclick="Richfaces.hideModalPanel('modalPanel3ID');" />
+ <h:commandLink value="Close"
+ onclick="Richfaces.hideModalPanel('modalPanel3ID');" />
</f:facet>
<h:outputText value="Eventsaaaaaaaaaaaaaaaa ..." />
<rich:calendar popup="true" />
</rich:modalPanel>
-
- <a onclick="Richfaces.showModalPanel('modalPanelID');" href="#">show ModalPanel 1</a>
+
+ <a
+ onclick="Richfaces.showModalPanel('modalPanelID');"
+ href="#">show ModalPanel 1</a>
<br />
- <a4j:commandLink onclick="Richfaces.showModalPanel('modalPanel2ID');return false;" value="show ModalPanel 2"></a4j:commandLink>
- <f:verbatim><br /></f:verbatim>
+ <a4j:commandLink
+ onclick="Richfaces.showModalPanel('modalPanel2ID');return false;"
+ value="show ModalPanel 2"></a4j:commandLink>
+ <f:verbatim>
+ <br />
+ </f:verbatim>
<h:outputText value="click on image for open Modal Panel 3" />
<h:graphicImage value="/pics/info.gif">
- <rich:componentControl event="onclick" for="modalPanel3ID" operation="show"></rich:componentControl>
+ <rich:componentControl event="onclick" for="modalPanel3ID"
+ operation="show"></rich:componentControl>
</h:graphicImage>
<f:verbatim>
- <br /><br />
- <div id="idDiv1" align="center" style="position: relative; font-size: 50px; z-index: 2; color: navy" >z-index1</div>
- <div id="idDiv2" align="center" style="position: relative; font-size: 50px; z-index: 2; color: navy">z-index2</div>
+ <br />
+ <br />
+ <div id="idDiv1" align="center"
+ style="position: relative; font-size: 50px; z-index: 2; color: navy">z-index1</div>
+ <div id="idDiv2" align="center"
+ style="position: relative; font-size: 50px; z-index: 2; color: navy">z-index2</div>
</f:verbatim>
</f:subview>
16 years, 5 months
JBoss Rich Faces SVN: r10063 - trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-08-13 07:58:19 -0400 (Wed, 13 Aug 2008)
New Revision: 10063
Modified:
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js
Log:
RF-4177
Modified: trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js
===================================================================
--- trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js 2008-08-13 11:42:11 UTC (rev 10062)
+++ trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js 2008-08-13 11:58:19 UTC (rev 10063)
@@ -217,6 +217,7 @@
//http://jira.jboss.com/jira/browse/RF-2953
//this.defaultRowHeight = this._calcDefaultRowHeight();
+ var scrollTop = this.scrollBox.element.scrollTop;
this.scrollBox.hide();
//this.sizeBox.setHeight(this.defaultRowHeight * this.grid.dataModel.getCount() + fixH);
this.helpObject1.moveToY(this.sizeBox.element.offsetHeight+ this.defaultRowHeight + 5);
@@ -228,6 +229,7 @@
this.adjustDataPosition(this.currentPos);
}
this.scrollBox.show();
+ this.scrollBox.element.scrollTop = scrollTop;
var viewWidth = this.scrollBox.getViewportWidth();
this.container.setWidth(viewWidth);
16 years, 5 months
JBoss Rich Faces SVN: r10062 - trunk/docs/faq/en/src/main/docbook/module.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2008-08-13 07:42:11 -0400 (Wed, 13 Aug 2008)
New Revision: 10062
Modified:
trunk/docs/faq/en/src/main/docbook/module/RFCfaq.xml
Log:
RF-4080: Developer guide does not contain details for web.xml configuration to successfully integrate fileUpload component with myfaces framework
Modified: trunk/docs/faq/en/src/main/docbook/module/RFCfaq.xml
===================================================================
--- trunk/docs/faq/en/src/main/docbook/module/RFCfaq.xml 2008-08-13 11:38:47 UTC (rev 10061)
+++ trunk/docs/faq/en/src/main/docbook/module/RFCfaq.xml 2008-08-13 11:42:11 UTC (rev 10062)
@@ -1,72 +1,74 @@
<?xml version='1.0' encoding='UTF-8'?>
<chapter id="FAQ" xreflabel="FAQ">
- <?dbhtml filename="FAQ.html"?>
- <sectioninfo>
- <keywordset>
- <keyword>RichFaces</keyword>
- </keywordset>
- </sectioninfo>
- <title>FAQ</title>
- <section>
- <?dbhtml filename="WherecouldIfindadditionalinformationonRichFaces.html"?>
- <title>Where could I find additional information on RichFaces?</title>
- <para>
- Most important links for RichFaces can be found <ulink
- url="http://jboss.com/index.html?module=bb&op=viewtopic&t=104575"
- >here</ulink>.
- </para>
- </section>
- <section>
- <?dbhtml filename="Wherearebinary/sourcedistributionforRichFacesrelease.html"?>
- <title>Where are binary/source distribution for RichFaces?</title>
- <para>
- <!-- RichFaces are built using CDK (Component Development Kit).
+ <?dbhtml filename="FAQ.html"?>
+ <sectioninfo>
+ <keywordset>
+ <keyword>RichFaces</keyword>
+ </keywordset>
+ </sectioninfo>
+ <title>FAQ</title>
+ <section>
+ <?dbhtml filename="WherecouldIfindadditionalinformationonRichFaces.html"?>
+ <title>Where could I find additional information on RichFaces?</title>
+ <para> Most important links for RichFaces can be found <ulink
+ url="http://jboss.com/index.html?module=bb&op=viewtopic&t=104575"
+ >here</ulink>. </para>
+ </section>
+ <section>
+ <?dbhtml filename="Wherearebinary/sourcedistributionforRichFacesrelease.html"?>
+ <title>Where are binary/source distribution for RichFaces?</title>
+ <para>
+ <!-- RichFaces are built using CDK (Component Development Kit).
CDK generates the library based on the meta-data, component templates and hand-written java classes.
What you see in the richfaces-ui-3.1.0-src.zip is a truly source, i.e. a source for CDK.
To the debug purpose, you need the source code that is generated by CDK before it is compiled into the binary.
-->
- There are two places where you can find binary/source distribution:
- <itemizedlist>
- <listitem>
- JBoss RichFaces Downloads area which can be found <ulink url="http://labs.jboss.com/jbossrichfaces/downloads/">here</ulink>.
- Source distribution you can see in the <code>richfaces-ui-3.2.1-src.zip</code>.
- Binary stored in <code>richfaces-ui-3.2.1-bin.zip</code>
- </listitem>
- <listitem>
- If you use Maven, Maven knows the place where all distributions are stored.
- Actual links to the Maven repository can be found <ulink url="http://jboss.com/index.html?module=bb&op=viewtopic&t=104575">here</ulink>
- </listitem>
- </itemizedlist>
- </para>
- </section>
+ There are two places where you can find binary/source distribution: <itemizedlist>
+ <listitem> JBoss RichFaces Downloads area which can be found
+ <ulink
+ url="http://labs.jboss.com/jbossrichfaces/downloads/"
+ >here</ulink>. Source distribution you
+ can see in the
+ <code>richfaces-ui-3.2.1-src.zip</code>. Binary
+ stored in <code>richfaces-ui-3.2.1-bin.zip</code>
+ </listitem>
+ <listitem> If you use Maven, Maven knows the place where all
+ distributions are stored. Actual links to the
+ Maven repository can be found <ulink
+ url="http://jboss.com/index.html?module=bb&op=viewtopic&t=104575"
+ >here</ulink>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </section>
- <section>
- <?dbhtml filename="HowtobuildRichFacessnapshotmanually.html"?>
- <title>How to build RichFaces snapshot manually?</title>
- <para>This <ulink
- url="http://labs.jboss.com/wiki/HowToBuildRichFacesSnapshotManually"
- > wiki article</ulink> helps you to find an answer.</para>
- </section>
+ <section>
+ <?dbhtml filename="HowtobuildRichFacessnapshotmanually.html"?>
+ <title>How to build RichFaces snapshot manually?</title>
+ <para>This <ulink
+ url="http://labs.jboss.com/wiki/HowToBuildRichFacesSnapshotManually"
+ > wiki article</ulink> helps you to find an answer.</para>
+ </section>
- <section>
- <?dbhtml filename="HowtobuildRichFacessnapshotmanually.html"?>
- <title>How to configure Maven for RichFaces</title>
- <itemizedlist>
- <listitem>
- <para>Download and install Maven if you have not it yet installed.
- Follow the instruction at <ulink
- url="http://maven.apache.org/download.html">
- http://maven.apache.org/download.html</ulink>.</para>
- </listitem>
+ <section>
+ <?dbhtml filename="HowtobuildRichFacessnapshotmanually.html"?>
+ <title>How to configure Maven for RichFaces</title>
+ <itemizedlist>
+ <listitem>
+ <para>Download and install Maven if you have not it yet
+ installed. Follow the instruction at <ulink
+ url="http://maven.apache.org/download.html"
+ >
+ http://maven.apache.org/download.html</ulink>.</para>
+ </listitem>
- <listitem>
- <para>Open
- <Maven-Root>/conf/settings.xml
- file to edit</para>
+ <listitem>
+ <para>Open <Maven-Root>/conf/settings.xml file
+ to edit</para>
- <para>Add into the <code><profile></code>
- section:</para>
- <programlisting role="XML"><![CDATA[
+ <para>Add into the <code><profile></code>
+ section:</para>
+ <programlisting role="XML"><![CDATA[
<id>RichFaces</id>
<repositories>
<repository>
@@ -128,103 +130,113 @@
</pluginRepository>
</pluginRepositories>
]]></programlisting>
- <para> Add into the
- <code><activeProfiles></code> section:</para>
- <programlisting role="XML"><![CDATA[<activeProfile>RichFaces</activeProfile>]]></programlisting>
+ <para> Add into the
+ <code><activeProfiles></code>
+ section:</para>
+ <programlisting role="XML"><![CDATA[<activeProfile>RichFaces</activeProfile>]]></programlisting>
- </listitem>
+ </listitem>
- </itemizedlist>
- </section>
+ </itemizedlist>
+ </section>
- <section>
- <?dbhtml filename="WhatstructureofRichFacesSVNrepositoryis.html"?>
- <title>What is the structure of RichFaces SVN repository?</title>
- <para>RichFaces repository structure overview can be found <ulink
- url="http://labs.jboss.com/wiki/RichFacesRepositoryStructureOverview"
- >here</ulink>.</para>
- </section>
+ <section>
+ <?dbhtml filename="WhatstructureofRichFacesSVNrepositoryis.html"?>
+ <title>What is the structure of RichFaces SVN repository?</title>
+ <para>RichFaces repository structure overview can be found <ulink
+ url="http://labs.jboss.com/wiki/RichFacesRepositoryStructureOverview"
+ >here</ulink>.</para>
+ </section>
- <section>
- <?dbhtml filename="Howtobuildrichfaces-samplesapplications.html"?>
- <title>How to build richfaces-samples applications?</title>
- <para>How to build and how to use richfaces-samples applications in Eclipse is
- described <ulink
- url="http://labs.jboss.com/wiki/RichFacesRepositoryStructureOverview"
- >here</ulink>.</para>
- </section>
+ <section>
+ <?dbhtml filename="Howtobuildrichfaces-samplesapplications.html"?>
+ <title>How to build richfaces-samples applications?</title>
+ <para>How to build and how to use richfaces-samples applications in Eclipse is
+ described <ulink
+ url="http://labs.jboss.com/wiki/RichFacesRepositoryStructureOverview"
+ >here</ulink>.</para>
+ </section>
- <section>
- <?dbhtml filename="IstheredemoforRichFacescomponents.html"?>
- <title>Where could I find a demo for RichFaces components?</title>
- <para>Online demo Web applications that show the most important functionality of
- RichFaces components are available <ulink
- url="http://livedemo.exadel.com/richfaces-demo/">here</ulink>.</para>
- <para>War file of a nightly build can be found <ulink
- url="http://maven.exadel.com/org/richfaces/samples/richfaces-demo/3.1.0-SNAPSHOT/"
- >here</ulink>.</para>
- <para>Source Code (SVN) can be found <ulink
- url="http://anonsvn.jboss.org/repos/richfaces/trunk/samples/richfaces-demo/"
- >here</ulink>.</para>
- <para>See also <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=113454"
- >how to prevent richfaces-demo deployment failed</ulink>.</para>
- </section>
+ <section>
+ <?dbhtml filename="IstheredemoforRichFacescomponents.html"?>
+ <title>Where could I find a demo for RichFaces components?</title>
+ <para>Online demo Web applications that show the most important functionality of
+ RichFaces components are available <ulink
+ url="http://livedemo.exadel.com/richfaces-demo/"
+ >here</ulink>.</para>
+ <para>War file of a nightly build can be found <ulink
+ url="http://maven.exadel.com/org/richfaces/samples/richfaces-demo/3.1.0-SNAPSHOT/"
+ >here</ulink>.</para>
+ <para>Source Code (SVN) can be found <ulink
+ url="http://anonsvn.jboss.org/repos/richfaces/trunk/samples/richfaces-demo/"
+ >here</ulink>.</para>
+ <para>See also <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=113454"
+ >how to prevent richfaces-demo deployment
+ failed</ulink>.</para>
+ </section>
- <section>
- <?dbhtml filename="HowtouseSkinnability.html"?>
- <title>How to use Skinnability?</title>
- <para><ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=111143"
- >Here</ulink> is an article that explains the Skinnability basics.</para>
- <para> For information you can also see discussion about this problem on the <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=103772"
- >RichFaces Users Forum</ulink></para>
- <para>Also, the effect of predefined skins on the application whole look-and-feel
- could be seen <ulink url="http://livedemo.exadel.com/richfaces-demo/"
- >here</ulink>.</para>
- </section>
+ <section>
+ <?dbhtml filename="HowtouseSkinnability.html"?>
+ <title>How to use Skinnability?</title>
+ <para><ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=111143"
+ >Here</ulink> is an article that explains the Skinnability
+ basics.</para>
+ <para> For information you can also see discussion about this problem on the
+ <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=103772"
+ >RichFaces Users Forum</ulink></para>
+ <para>Also, the effect of predefined skins on the application whole
+ look-and-feel could be seen <ulink
+ url="http://livedemo.exadel.com/richfaces-demo/"
+ >here</ulink>.</para>
+ </section>
- <section>
- <?dbhtml filename="Whythereisaproblemwithprototypes.html"?>
- <title>Why does a problem with prototypes in RichFaces 3.1.0 happen? The
- Prototype.Browser() function can't be found.</title>
- <para>RichFaces 3.1.0 has been released with the latest Prototype 1.5.1.1. The
- conflict happens because on your page an older version of prototypes that
- can be added from Tomahawk 1.1.6 is used. See the solution for the problem
- <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=118526&a..."
- >here.</ulink></para>
- </section>
+ <section>
+ <?dbhtml filename="Whythereisaproblemwithprototypes.html"?>
+ <title>Why does a problem with prototypes in RichFaces 3.1.0 happen? The
+ Prototype.Browser() function can't be found.</title>
+ <para>RichFaces 3.1.0 has been released with the latest Prototype 1.5.1.1. The
+ conflict happens because on your page an older version of prototypes
+ that can be added from Tomahawk 1.1.6 is used. See the solution for
+ the problem <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=118526&a..."
+ >here.</ulink></para>
+ </section>
- <section>
- <?dbhtml filename="WhyRichFaceslibrarycondataTablecomp.html"?>
- <title>Why RichFaces library contains <rich:dataTable> component,
- though there is the standard <h:dataTable>?</title>
- <para>The article about <emphasis role="bold"
- ><property><rich:dataTable></property></emphasis> flexibility can be found <ulink
- url="http://labs.jboss.com/wiki/RichFacesArticleDataTable"
- >here</ulink>.</para>
- <para>Source code (SVN) could be found <ulink
- url="http://anonsvn.jboss.org/repos/richfaces/trunk/samples/richfaces-art-data..."
- >here</ulink>.</para>
- <para> Online demo for a Web application is available <ulink
- url=" http://livedemo.exadel.com/richfaces-art-datatable/"
- >here</ulink>.</para>
- </section>
+ <section>
+ <?dbhtml filename="WhyRichFaceslibrarycondataTablecomp.html"?>
+ <title>Why RichFaces library contains <rich:dataTable> component,
+ though there is the standard <h:dataTable>?</title>
+ <para>The article about <emphasis role="bold">
+ <property><rich:dataTable></property>
+ </emphasis> flexibility can be found <ulink
+ url="http://labs.jboss.com/wiki/RichFacesArticleDataTable"
+ >here</ulink>.</para>
+ <para>Source code (SVN) could be found <ulink
+ url="http://anonsvn.jboss.org/repos/richfaces/trunk/samples/richfaces-art-data..."
+ >here</ulink>.</para>
+ <para> Online demo for a Web application is available <ulink
+ url=" http://livedemo.exadel.com/richfaces-art-datatable/"
+ >here</ulink>.</para>
+ </section>
- <section id="Organizewizards">
- <?dbhtml filename="Organizewizards.html"?>
- <title>How to organize wizards using the <rich:modalPanel> component?</title>
- <para>It's necessary to put <emphasis role="bold"
- ><property><a4j:include></property></emphasis> inside the <emphasis
- role="bold"><property><rich:modalPanel></property></emphasis> and perform
- navigation inside it, as it's shown in the example below:</para>
+ <section id="Organizewizards">
+ <?dbhtml filename="Organizewizards.html"?>
+ <title>How to organize wizards using the <rich:modalPanel>
+ component?</title>
+ <para>It's necessary to put <emphasis role="bold">
+ <property><a4j:include></property>
+ </emphasis> inside the <emphasis role="bold">
+ <property><rich:modalPanel></property>
+ </emphasis> and perform navigation inside it, as it's shown
+ in the example below:</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<f:verbatim>
<a href="javascript:Richfaces.showModalPanel('_panel',{left:'auto', top:'auto'})">Show Modal Panel</a>
</f:verbatim>
@@ -265,75 +277,80 @@
...
]]></programlisting>
- <para>The discussion about <emphasis role="bold"
- ><property><a4j:include></property></emphasis> and navigation rules can be found on
- the <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4062036#..."
- >Ajax Users Forum</ulink>.</para>
- </section>
+ <para>The discussion about <emphasis role="bold">
+ <property><a4j:include></property>
+ </emphasis> and navigation rules can be found on the <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4062036#..."
+ >Ajax Users Forum</ulink>.</para>
+ </section>
- <section>
- <?dbhtml filename="Howtopreventmodalpanelfromclosure.html"?>
- <title>How to prevent modalPanel from closing when the validation inside fails?</title>
- <para>Examples of validation in <emphasis role="bold"
- ><property><rich:modalPanel></property></emphasis> could be found in the
- <ulink url="http://labs.jboss.com/wiki/ModalPanelValidation">Wiki
- article</ulink> and on the <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061517"
- >RichFaces Users Forum</ulink>. </para>
- </section>
+ <section>
+ <?dbhtml filename="Howtopreventmodalpanelfromclosure.html"?>
+ <title>How to prevent modalPanel from closing when the validation inside fails?</title>
+ <para>Examples of validation in <emphasis role="bold">
+ <property><rich:modalPanel></property>
+ </emphasis> could be found in the <ulink
+ url="http://labs.jboss.com/wiki/ModalPanelValidation">Wiki
+ article</ulink> and on the <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061517"
+ >RichFaces Users Forum</ulink>. </para>
+ </section>
- <section>
- <?dbhtml filename="HowtousesuggestionBox.html"?>
- <title>Why when I use suggestionBox inside the modalPanel content the popup
- suggestion list doesn't show since it is behind the modalPanel.</title>
- <para>To solve this problem you should use the latest versions of RichFaces.</para>
- <para> Most important links for RichFaces can be found <ulink
- url="http://jboss.com/index.html?module=bb&op=viewtopic&t=104575"
- >here</ulink>.</para>
+ <section>
+ <?dbhtml filename="HowtousesuggestionBox.html"?>
+ <title>Why when I use suggestionBox inside the modalPanel content the popup
+ suggestion list doesn't show since it is behind the
+ modalPanel.</title>
+ <para>To solve this problem you should use the latest versions of RichFaces.</para>
+ <para> Most important links for RichFaces can be found <ulink
+ url="http://jboss.com/index.html?module=bb&op=viewtopic&t=104575"
+ >here</ulink>.</para>
- </section>
+ </section>
- <section>
- <?dbhtml filename="DoesRichFacesworkwithfacelets.html"?>
- <title>Does RichFaces work with facelets?</title>
- <para>Main <ulink url="http://livedemo.exadel.com/richfaces-demo/"> demo</ulink> of
- RichFaces is a facelets based application. Full Facelets support is one of
- the main features. Hence, the answer is yes.</para>
- </section>
+ <section>
+ <?dbhtml filename="DoesRichFacesworkwithfacelets.html"?>
+ <title>Does RichFaces work with facelets?</title>
+ <para>Main <ulink url="http://livedemo.exadel.com/richfaces-demo/"> demo</ulink>
+ of RichFaces is a facelets based application. Full Facelets support is
+ one of the main features. Hence, the answer is yes.</para>
+ </section>
- <section>
- <?dbhtml filename="Isitpossibletocreatedynamicmenu.html"?>
- <title>Is it possible to create dynamic menu using <rich:dropDownMenu>
- component?</title>
- <para><emphasis role="bold"><property><rich:dropDownMenu></property></emphasis> is a
- standard JSF component. Thus, creation of the menu dynamically from the Java
- Script code is the same as for any other jsf component.</para>
- <para>For more information follow the <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=110983"
- >link</ulink>.</para>
- </section>
+ <section>
+ <?dbhtml filename="Isitpossibletocreatedynamicmenu.html"?>
+ <title>Is it possible to create dynamic menu using
+ <rich:dropDownMenu> component?</title>
+ <para><emphasis role="bold">
+ <property><rich:dropDownMenu></property>
+ </emphasis> is a standard JSF component. Thus, creation of the menu
+ dynamically from the Java Script code is the same as for any other jsf
+ component.</para>
+ <para>For more information follow the <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=110983"
+ >link</ulink>.</para>
+ </section>
- <section>
- <?dbhtml filename="Isitpossibletocustomizelookofdatascroller.html"?>
- <title>Is it possible to customize the look of datascroller (the forward/back
- buttons) and replace them with an images?</title>
- <para>The answer is yes. </para>
- <para>Component provides two controllers groups for switching:</para>
- <itemizedlist>
- <listitem>Page numbers for switching onto a particular page</listitem>
- <listitem>The controls of fast switching: "first",
- "last", "next",
- "previous", "fastforward",
- "fastrewind"</listitem>
- </itemizedlist>
- <para>The controls of fast switching are created adding the facets component with
- the corresponding name:</para>
+ <section>
+ <?dbhtml filename="Isitpossibletocustomizelookofdatascroller.html"?>
+ <title>Is it possible to customize the look of datascroller (the forward/back
+ buttons) and replace them with an images?</title>
+ <para>The answer is yes. </para>
+ <para>Component provides two controllers groups for switching:</para>
+ <itemizedlist>
+ <listitem>Page numbers for switching onto a particular page</listitem>
+ <listitem>The controls of fast switching: "first",
+ "last", "next",
+ "previous",
+ "fastforward",
+ "fastrewind"</listitem>
+ </itemizedlist>
+ <para>The controls of fast switching are created adding the facets component
+ with the corresponding name:</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[ ...
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[ ...
<rich:datascroller for="table" maxPages="10">
<f:facet name="first">
<h:outputText value="First"/>
@@ -344,23 +361,31 @@
</rich:datascroller>
...
]]></programlisting>
- <para> There are also facets used to create the disabled states:
- <emphasis><property>"first_disabled"</property></emphasis>, <emphasis><property>"last_disabled"</property></emphasis>,
- <emphasis><property>"next_disabled"</property></emphasis>, <emphasis><property>"previous_disabled"</property></emphasis>,
- <emphasis><property>"fastforward_disabled"</property></emphasis>,
- <emphasis><property>"fastrewind_disabled"</property></emphasis>. </para>
- </section>
+ <para> There are also facets used to create the disabled states: <emphasis>
+ <property>"first_disabled"</property>
+ </emphasis>, <emphasis>
+ <property>"last_disabled"</property>
+ </emphasis>, <emphasis>
+ <property>"next_disabled"</property>
+ </emphasis>, <emphasis>
+ <property>"previous_disabled"</property>
+ </emphasis>, <emphasis>
+ <property>"fastforward_disabled"</property>
+ </emphasis>, <emphasis>
+ <property>"fastrewind_disabled"</property>
+ </emphasis>. </para>
+ </section>
- <section>
- <?dbhtml filename="Howtoredirecttoanotherpage.html"?>
- <title>How to place simple links inside menu?</title>
- <para>If you want to navigate outside, when application uses an external URL, you
- should use the following approach:</para>
+ <section>
+ <?dbhtml filename="Howtoredirecttoanotherpage.html"?>
+ <title>How to place simple links inside menu?</title>
+ <para>If you want to navigate outside, when application uses an external URL,
+ you should use the following approach:</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<rich:dropDownMenu>
...
<rich:menuItem submitMode="none"
@@ -373,45 +398,48 @@
</rich:dropDownMenu>
...
]]></programlisting>
- <para>Also online demo <emphasis role="bold"
- ><property><rich:dropDownMenu></property></emphasis> component is available <ulink
- url="http://livedemo.exadel.com/richfaces-demo/richfaces/dropDownMenu.jsf"
- >here</ulink>.</para>
- </section>
+ <para>Also online demo <emphasis role="bold">
+ <property><rich:dropDownMenu></property>
+ </emphasis> component is available <ulink
+ url="http://livedemo.exadel.com/richfaces-demo/richfaces/dropDownMenu.jsf"
+ >here</ulink>.</para>
+ </section>
- <section>
- <?dbhtml filename="CanthedropDownMenubeincludedintreenodes.html"?>
- <title>Can I use dropDownMenu as context menu?</title>
- <para>The <emphasis role="bold"><property><rich:dropDownMenu></property></emphasis> is
- designed keeping in mind that it should not be used for a contextMenu
- purpose. We have a <emphasis role="bold"
- ><property><rich:contextMenu></property></emphasis> component in the TODO list.
- However, it is not schedule for the nearest versions.</para>
- </section>
+ <section>
+ <?dbhtml filename="CanthedropDownMenubeincludedintreenodes.html"?>
+ <title>Can I use dropDownMenu as context menu?</title>
+ <para>The <emphasis role="bold">
+ <property><rich:dropDownMenu></property>
+ </emphasis> is designed keeping in mind that it should not be used for
+ a contextMenu purpose. We have a <emphasis role="bold">
+ <property><rich:contextMenu></property>
+ </emphasis> component in the TODO list. However, it is not schedule
+ for the nearest versions.</para>
+ </section>
- <section>
- <?dbhtml filename="HowtocustomizesimpleTogglePanel.html"?>
- <title>How to pass own parameters during a modalPanel opening or closing?</title>
- <para> You can pass your parameters during modalPanel opening or closing. This
- passing could be performed in the following way: </para>
+ <section>
+ <?dbhtml filename="HowtocustomizesimpleTogglePanel.html"?>
+ <title>How to pass own parameters during a modalPanel opening or closing?</title>
+ <para> You can pass your parameters during modalPanel opening or closing. This
+ passing could be performed in the following way: </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="JAVA"><![CDATA[Richfaces.showModalPanel('panelId', {left: auto}, {param1: value1});]]></programlisting>
- <para> Thus, except the standard modalPanel parameters you can pass any of your own
- parameters. </para>
- </section>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="JAVA"><![CDATA[Richfaces.showModalPanel('panelId', {left: auto}, {param1: value1});]]></programlisting>
+ <para> Thus, except the standard modalPanel parameters you can pass any of your
+ own parameters. </para>
+ </section>
- <section>
- <?dbhtml filename="Howtoaddalinktothetreenode.html"?>
- <title>How to add a simple link to the tree node?</title>
- <para>Simple code is placed below:</para>
+ <section>
+ <?dbhtml filename="Howtoaddalinktothetreenode.html"?>
+ <title>How to add a simple link to the tree node?</title>
+ <para>Simple code is placed below:</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<rich:tree ...>
...
<rich:treeNode submitMode="none"
@@ -424,25 +452,25 @@
</rich:tree ...>
...
]]></programlisting>
- </section>
+ </section>
- <section>
- <?dbhtml filename="Isitpossibletoplacetabsvertically.html"?>
- <title>Is it possible to place tabs upright in the tabPanel?</title>
- <para>It's not possible to place tabs upright in the tabPanel. For this
- purporse use togglePanel. Toggle controls can be placed anywhere in the
- layout.</para>
- </section>
+ <section>
+ <?dbhtml filename="Isitpossibletoplacetabsvertically.html"?>
+ <title>Is it possible to place tabs upright in the tabPanel?</title>
+ <para>It's not possible to place tabs upright in the tabPanel. For this
+ purporse use togglePanel. Toggle controls can be placed anywhere in
+ the layout.</para>
+ </section>
- <section>
- <?dbhtml filename="HowtogetaacommandButton.html"?>
- <title>How to get a commandButton working within the modalPanel?</title>
- <para>Simple code is placed below:</para>
+ <section>
+ <?dbhtml filename="HowtogetaacommandButton.html"?>
+ <title>How to get a commandButton working within the modalPanel?</title>
+ <para>Simple code is placed below:</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<rich:modalPanel>
<f:facet name="header">
<h:outputText value="Test" />
@@ -456,27 +484,38 @@
</rich:modalPanel>
...
]]></programlisting>
- <para>
- <note>
- <title>Note:</title><para>Two rules are important for modalPanel: </para><itemizedlist>
- <listitem><para>modalPanel must have its own form if it has form
- elements (input or/and command components) inside
- (as it was shown in the example above) </para></listitem>
- <listitem><para>modalPanel must not be included into the form (on
- any level up) if it has the form inside.</para></listitem>
- </itemizedlist></note>
- </para>
- </section>
+ <para>
+ <note>
+ <title>Note:</title>
+ <para>Two rules are important for modalPanel: </para>
+ <itemizedlist>
+ <listitem>
+ <para>modalPanel must have its own form
+ if it has form elements (input
+ or/and command components)
+ inside (as it was shown in the
+ example above) </para>
+ </listitem>
+ <listitem>
+ <para>modalPanel must not be included
+ into the form (on any level
+ up) if it has the form
+ inside.</para>
+ </listitem>
+ </itemizedlist>
+ </note>
+ </para>
+ </section>
- <section>
- <?dbhtml filename="Howtodefinecurrentselectedtab.html"?>
- <title>How to define the currently selected tab?</title>
- <para> Simple code is placed below:</para>
+ <section>
+ <?dbhtml filename="Howtodefinecurrentselectedtab.html"?>
+ <title>How to define the currently selected tab?</title>
+ <para> Simple code is placed below:</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<rich:tabPanel selectedTab="t2">
<rich:tab label="tab 1" name="t1">
<h:outputText value="tab 1" />
@@ -490,36 +529,36 @@
</rich:tabPanel>
...
]]></programlisting>
- </section>
+ </section>
- <section>
- <?dbhtml filename="Howtoremembercurrentselectedtab.html"?>
- <title>How to remember the current selected tab?</title>
- <para> For necessary information you can see discussion about this problem on the
- <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=111761"
- >RichFaces Users Forum</ulink>.</para>
- </section>
+ <section>
+ <?dbhtml filename="Howtoremembercurrentselectedtab.html"?>
+ <title>How to remember the current selected tab?</title>
+ <para> For necessary information you can see discussion about this problem on
+ the <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=111761"
+ >RichFaces Users Forum</ulink>.</para>
+ </section>
- <section>
- <?dbhtml filename="Howtonavigatefromonetabtoanother.html"?>
- <title>How to navigate from one tab to another using buttons (apart from tabPanel
- functionality)?</title>
- <para> For necessary information you can see <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085931#..."
- >RichFaces Users Forum</ulink>.</para>
- </section>
+ <section>
+ <?dbhtml filename="Howtonavigatefromonetabtoanother.html"?>
+ <title>How to navigate from one tab to another using buttons (apart from
+ tabPanel functionality)?</title>
+ <para> For necessary information you can see <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085931#..."
+ >RichFaces Users Forum</ulink>.</para>
+ </section>
- <section>
- <?dbhtml filename="Howtoretrievethecurrentvalue.html"?>
- <title>How to retrieve the current value from the inputNumberSlider?</title>
- <para>To catch the value of the inputNumberSlider from the JavaScript, use the
- following approach:</para>
+ <section>
+ <?dbhtml filename="Howtoretrievethecurrentvalue.html"?>
+ <title>How to retrieve the current value from the inputNumberSlider?</title>
+ <para>To catch the value of the inputNumberSlider from the JavaScript, use the
+ following approach:</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<rich:inputNumberSlider width="500" step="20"
onchange="someFunctionCall(this.input.value)"
minValue="0"
@@ -536,35 +575,35 @@
</script>
...
]]></programlisting>
- </section>
+ </section>
- <section>
- <?dbhtml filename="Howtoapplyskins.html"?>
- <title>How to apply skins to the standard input components?</title>
- <para>The answer could be found <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=103494"
- >here</ulink>.</para>
- </section>
+ <section>
+ <?dbhtml filename="Howtoapplyskins.html"?>
+ <title>How to apply skins to the standard input components?</title>
+ <para>The answer could be found <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=103494"
+ >here</ulink>.</para>
+ </section>
- <section>
- <?dbhtml filename="Isthereawaytocapturetherowdata.html"?>
- <title>Is there a way to capture the rowdata of dataTable and subTable?</title>
- <para> For necessary information you can see discussion about this problem on the
- <ulink
- url="http://jboss.com/index.html?module=bb&op=viewtopic&t=111965"
- >RichFaces Users Forum</ulink></para>
- </section>
+ <section>
+ <?dbhtml filename="Isthereawaytocapturetherowdata.html"?>
+ <title>Is there a way to capture the rowdata of dataTable and subTable?</title>
+ <para> For necessary information you can see discussion about this problem on
+ the <ulink
+ url="http://jboss.com/index.html?module=bb&op=viewtopic&t=111965"
+ >RichFaces Users Forum</ulink></para>
+ </section>
- <section>
- <?dbhtml filename="Isitpossibletouse thedatascroller.html"?>
- <title>Is it possible to use datascroller without its table border and styles (to
- show only links)?</title>
- <para> It' necessary to redefine rich* classes for example like this:</para>
+ <section>
+ <?dbhtml filename="Isitpossibletouse thedatascroller.html"?>
+ <title>Is it possible to use datascroller without its table border and styles
+ (to show only links)?</title>
+ <para> It' necessary to redefine rich* classes for example like this:</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="CSS"><![CDATA[.rich-datascr-button {
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="CSS"><![CDATA[.rich-datascr-button {
border: 0px;
}
.rich-dtascroller-table {
@@ -573,65 +612,67 @@
.rich-datascr-button {
background-color: transparent;
}]]></programlisting>
- </section>
+ </section>
- <section>
- <?dbhtml filename="subTableincombinationwithdataTable.html"?>
- <title>How to use subTable in combination with dataTable?</title>
- <para>The answer could be found <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059044#..."
- >here</ulink>.</para>
- </section>
+ <section>
+ <?dbhtml filename="subTableincombinationwithdataTable.html"?>
+ <title>How to use subTable in combination with dataTable?</title>
+ <para>The answer could be found <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059044#..."
+ >here</ulink>.</para>
+ </section>
- <section id="Truepagination">
- <?dbhtml filename="Howtodotruepagination.html"?>
- <title>How to do correct pagination using datascroller (load a part of data from
- database)?</title>
- <para>The answer could be found on the <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060199#..."
- >RichFaces Users Forum</ulink>.</para>
- <para>How to use <emphasis role="bold"><property><rich:dataTable></property></emphasis> and
- <emphasis role="bold"><property><rich:dataScroller></property></emphasis>
- in a context of Extended Data Model see <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=115636"
- >here</ulink>.</para>
- </section>
+ <section id="Truepagination">
+ <?dbhtml filename="Howtodotruepagination.html"?>
+ <title>How to do correct pagination using datascroller (load a part of data from
+ database)?</title>
+ <para>The answer could be found on the <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060199#..."
+ >RichFaces Users Forum</ulink>.</para>
+ <para>How to use <emphasis role="bold">
+ <property><rich:dataTable></property>
+ </emphasis> and <emphasis role="bold">
+ <property><rich:dataScroller></property>
+ </emphasis> in a context of Extended Data Model see <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=115636"
+ >here</ulink>.</para>
+ </section>
- <section>
- <?dbhtml filename="Howtomakehtmlscrollbars.html"?>
- <title>How to make html scrollbars in modalPanel?</title>
- <para>The answer could be found on the RichFaces Users Forum:</para>
- <itemizedlist>
- <listitem>
- <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4062877#..."
- >http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4062877#...</ulink>
- </listitem>
- <listitem>
- <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=105412"
- >http://www.jboss.com/index.html?module=bb&op=viewtopic&t=105412</ulink>
- </listitem>
- </itemizedlist>
+ <section>
+ <?dbhtml filename="Howtomakehtmlscrollbars.html"?>
+ <title>How to make html scrollbars in modalPanel?</title>
+ <para>The answer could be found on the RichFaces Users Forum:</para>
+ <itemizedlist>
+ <listitem>
+ <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4062877#..."
+ >http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4062877#...</ulink>
+ </listitem>
+ <listitem>
+ <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=105412"
+ >http://www.jboss.com/index.html?module=bb&op=viewtopic&t=105412</ulink>
+ </listitem>
+ </itemizedlist>
- </section>
+ </section>
- <section>
- <?dbhtml filename="HowtoExpand/CollapseTreeNodesfromcode.html"?>
- <title>How to expand/collapse tree nodes from code?</title>
- <para>The answer could be found <ulink
- url="http://labs.jboss.com/wiki/ExpandCollapseTreeNodes"
- >here</ulink>.</para>
- </section>
+ <section>
+ <?dbhtml filename="HowtoExpand/CollapseTreeNodesfromcode.html"?>
+ <title>How to expand/collapse tree nodes from code?</title>
+ <para>The answer could be found <ulink
+ url="http://labs.jboss.com/wiki/ExpandCollapseTreeNodes"
+ >here</ulink>.</para>
+ </section>
- <section>
- <?dbhtml filename="HowtouseJavaScriptAPI.html"?>
- <title>How to use JavaScript API?</title>
- <para>The simple code is placed below:</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+ <section>
+ <?dbhtml filename="HowtouseJavaScriptAPI.html"?>
+ <title>How to use JavaScript API?</title>
+ <para>The simple code is placed below:</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<a4j:form id="form">
<h:panelGroup id="test" columns="2" style="width: 300px">
<h:selectBooleanCheckbox value="#{bean.check}">
@@ -646,71 +687,74 @@
</a4j:form>
...
]]></programlisting>
- </section>
+ </section>
- <section>
- <?dbhtml filename="HowtoloadtheScriptaculouslibrary.html"?>
- <title>How to load the Scriptaculous library?</title>
- <para>To load the whole Scriptaculous library shipped with RichFaces use <emphasis
- role="bold"><a4j:loadScript></emphasis> tag.</para>
+ <section>
+ <?dbhtml filename="HowtoloadtheScriptaculouslibrary.html"?>
+ <title>How to load the Scriptaculous library?</title>
+ <para>To load the whole Scriptaculous library shipped with RichFaces use
+ <emphasis role="bold"
+ ><a4j:loadScript></emphasis> tag.</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<a4j:loadScript src="resource://scriptaculous.js" />
...
]]></programlisting>
- <para> Thus, this command allows loading an integrated version of the library that
- includes all existing scriptaculous files except unittest.js. </para>
- <para> If you don't want to load the whole library, but only the particular
- file, for example, <code>effect.js</code>, use the following line: </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+ <para> Thus, this command allows loading an integrated version of the library
+ that includes all existing scriptaculous files except unittest.js. </para>
+ <para> If you don't want to load the whole library, but only the
+ particular file, for example, <code>effect.js</code>, use the
+ following line: </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<a4j:loadScript src="resource://scriptaculous/effect.js" />
...
]]></programlisting>
- <para> Remember, it does not make sense to load the particular file if you already
- load the whole version. </para>
+ <para> Remember, it does not make sense to load the particular file if you
+ already load the whole version. </para>
- <para>For more information see <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=119044"
- >RichFaces Users Forum</ulink>.</para>
- </section>
+ <para>For more information see <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=119044"
+ >RichFaces Users Forum</ulink>.</para>
+ </section>
- <section>
- <?dbhtml filename="Howtoavoidaproblemwithtextwrapping.html"?>
- <title>How to avoid a problem with text wrapping in <rich:tab> in
- Internet Explorer 7?</title>
- <para>A problem with tab height occurs in IE 7. The tab height is correct in Firefox
- and IE 6. This is IE's 7 bug. As a temporary solution you can try
- to change doctype declaration from:</para>
- <programlisting role="XML"><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">]]></programlisting>
- <para>to:</para>
- <programlisting role="XML"><![CDATA[<!doctype html public "-//w3c//dtd html 4.0 transitional//en">]]></programlisting>
- <para>See also <ulink url="http://jira.jboss.com/jira/browse/RF-1011"
- >http://jira.jboss.com/jira/browse/RF-1011</ulink>.</para>
- </section>
+ <section>
+ <?dbhtml filename="Howtoavoidaproblemwithtextwrapping.html"?>
+ <title>How to avoid a problem with text wrapping in <rich:tab> in
+ Internet Explorer 7?</title>
+ <para>A problem with tab height occurs in IE 7. The tab height is correct in
+ Firefox and IE 6. This is IE's 7 bug. As a temporary solution
+ you can try to change doctype declaration from:</para>
+ <programlisting role="XML"><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">]]></programlisting>
+ <para>to:</para>
+ <programlisting role="XML"><![CDATA[<!doctype html public "-//w3c//dtd html 4.0 transitional//en">]]></programlisting>
+ <para>See also <ulink url="http://jira.jboss.com/jira/browse/RF-1011"
+ >http://jira.jboss.com/jira/browse/RF-1011</ulink>.</para>
+ </section>
- <section>
- <?dbhtml filename="Howtosaveeffectstatus.html"?>
- <title>How to save <rich:effect> status?</title>
- <para><emphasis role="bold"><property><rich:effect></property></emphasis> component has
- several callback methods such as beforeStart, afterFinish. You can use them
- to save the status.</para>
- <para> See also <ulink
- url="http://wiki.script.aculo.us/scriptaculous/show/CoreEffects"
- >core effects</ulink> in scriptaculous.</para>
- </section>
+ <section>
+ <?dbhtml filename="Howtosaveeffectstatus.html"?>
+ <title>How to save <rich:effect> status?</title>
+ <para><emphasis role="bold">
+ <property><rich:effect></property>
+ </emphasis> component has several callback methods such as
+ beforeStart, afterFinish. You can use them to save the status.</para>
+ <para> See also <ulink
+ url="http://wiki.script.aculo.us/scriptaculous/show/CoreEffects"
+ >core effects</ulink> in scriptaculous.</para>
+ </section>
- <section>
- <?dbhtml filename="Howtosaveeffectstatus.html"?>
- <title>How to send an additional parameter to server working with
- <rich:suggestionbox>?</title>
- <para>An example is placed below:</para>
- <programlisting role="XML"><![CDATA[...
+ <section>
+ <?dbhtml filename="Howtosaveeffectstatus.html"?>
+ <title>How to send an additional parameter to server working with
+ <rich:suggestionbox>?</title>
+ <para>An example is placed below:</para>
+ <programlisting role="XML"><![CDATA[...
<rich:suggestionbox width="200" height="200" for="test" suggestionAction="#{bean.autocomplete}" var="cap">
<h:column>
<f:facet name="header">
@@ -724,30 +768,31 @@
</rich:suggestionbox>
...
]]></programlisting>
- <para>In the example <property>"onselect"</property> event is used
- for sending selected value to the server. It's also possible to
- pass additional fields of selected object (which don't belong to <emphasis>
- <property>"fetchvalue"</property>
- </emphasis> attribute.)</para>
- </section>
+ <para>In the example <property>"onselect"</property> event is
+ used for sending selected value to the server. It's also
+ possible to pass additional fields of selected object (which
+ don't belong to <emphasis>
+ <property>"fetchvalue"</property>
+ </emphasis> attribute.)</para>
+ </section>
- <section>
- <?dbhtml filename="Howtosetrich:dataTableborder.html"?>
- <title>How to set <rich:dataTable> border to 0px?</title>
- <para>Add the following code to your css file:</para>
- <programlisting role="CSS"><![CDATA[...
+ <section>
+ <?dbhtml filename="Howtosetrich:dataTableborder.html"?>
+ <title>How to set <rich:dataTable> border to 0px?</title>
+ <para>Add the following code to your css file:</para>
+ <programlisting role="CSS"><![CDATA[...
.rich-table, .rich-table-header,.rich-table-headercell, .rich-table-cell, .rich-subtable-cell, .rich-table-footercell, .rich-subtable-footercell {
border-width:0px;
}
...
]]></programlisting>
- </section>
+ </section>
- <section>
- <?dbhtml filename="Howtosetrich:dataTableborder.html"?>
- <title>How to create <rich:suggestionBox> dynamically?</title>
- <para>This is a working example:</para>
- <programlisting role="JAVA"><![CDATA[...
+ <section>
+ <?dbhtml filename="Howtosetrich:dataTableborder.html"?>
+ <title>How to create <rich:suggestionBox> dynamically?</title>
+ <para>This is a working example:</para>
+ <programlisting role="JAVA"><![CDATA[...
org.apache.myfaces.component.html.ext.HtmlInputText searchBox = new org.apache.myfaces.component.html.ext.HtmlInputText();
searchBox.setId( "inputQuery" );
bar.getChildren().add( searchBox );
@@ -784,311 +829,341 @@
bar.getChildren().add( suggestions );
...
]]></programlisting>
- <para> See also <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099047#..."
- >RichFaces User Forum</ulink>.</para>
- </section>
+ <para> See also <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099047#..."
+ >RichFaces User Forum</ulink>.</para>
+ </section>
- <section id="Howtoapplybuttonlable">
- <?dbhtml filename="Howtoapplybuttonlable .html"?>
- <title>How to apply button label for <rich: calendar>?</title>
- <para> Necessary information could be found on the <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120993#..."
- >RichFaces User Forum</ulink>.</para>
- </section>
+ <section id="Howtoapplybuttonlable">
+ <?dbhtml filename="Howtoapplybuttonlable .html"?>
+ <title>How to apply button label for <rich: calendar>?</title>
+ <para> Necessary information could be found on the <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120993#..."
+ >RichFaces User Forum</ulink>.</para>
+ </section>
- <section id="DecidingWhatToChangeOnTheServerSide">
- <?dbhtml filename="DecidingWhatToChangeOnTheServerSide.html"?>
- <title>What should I change on the server side?</title>
- <para> The list of zones to be reRendered can be specified as EL expression. But
- there is a question that must be specified more exactly. </para>
- <para> The list of Ids is formed during beforePhase of RENDER_RESPONSE. Therefore,
- in this case one can point reRender to the Set type Bean's property
- and fill the Set during a tracking request. </para>
- <para> It's the way to form a list of updatable areas dynamically. </para>
- </section>
- <section id="CheckSendingRequestConditions.CustomJavaScriptBeforeRequest.OnSubmitAttribute">
- <?dbhtml filename="CheckSendingRequestConditions.CustomJavaScriptBeforeRequest.OnSubmitAttribute.html"?>
+ <section id="DecidingWhatToChangeOnTheServerSide">
+ <?dbhtml filename="DecidingWhatToChangeOnTheServerSide.html"?>
+ <title>What should I change on the server side?</title>
+ <para> The list of zones to be reRendered can be specified as EL expression. But
+ there is a question that must be specified more exactly. </para>
+ <para> The list of Ids is formed during beforePhase of RENDER_RESPONSE.
+ Therefore, in this case one can point reRender to the Set type
+ Bean's property and fill the Set during a tracking request. </para>
+ <para> It's the way to form a list of updatable areas dynamically.
+ </para>
+ </section>
+ <section
+ id="CheckSendingRequestConditions.CustomJavaScriptBeforeRequest.OnSubmitAttribute">
+ <?dbhtml filename="CheckSendingRequestConditions.CustomJavaScriptBeforeRequest.OnSubmitAttribute.html"?>
- <title>How to check sending request conditions? Custom JavaScript before request
- "OnSubmit" attribute.</title>
- <para> To check on the client some terms of request sending, the <emphasis>
- <property>"onSubmit"</property>
- </emphasis>" attribute is added to all components, which may cause
- the request. </para>
- <para>
- <emphasis role="bold">Example: </emphasis>
- </para>
- <programlisting role="XML"><![CDATA[<h:inputText id="i" value="#{beanText.kennung}">
+ <title>How to check sending request conditions? Custom JavaScript before request
+ "OnSubmit" attribute.</title>
+ <para> To check on the client some terms of request sending, the <emphasis>
+ <property>"onSubmit"</property>
+ </emphasis>" attribute is added to all components, which may
+ cause the request. </para>
+ <para>
+ <emphasis role="bold">Example: </emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[<h:inputText id="i" value="#{beanText.kennung}">
<a4j:support event="onfocus" onsubmit="doSomething();" reRender="panelToReRender"/>
</h:inputText>]]></programlisting>
- <para> So in this case
- "<code>doSomething()"</code>
- function is executed before the Ajax request. </para>
- <para> Besides, if this function returns "false", Ajax request
- isn't fired. </para>
- <note>
- <title>Note:</title>
- <para>Behavior of our <emphasis>
+ <para> So in this case "<code>doSomething()"</code> function
+ is executed before the Ajax request. </para>
+ <para> Besides, if this function returns "false", Ajax request
+ isn't fired. </para>
+ <note>
+ <title>Note:</title>
+ <para>Behavior of our <emphasis>
+ <property>"onsubmit"</property>
+ </emphasis>slightly differs from the standard one. Do not
+ return "true" if you want to fire the
+ request - because
+ <code><xxx><a4j:support
+ event="onclick"
+ onsubmit="return
+ true;"></code> is transformed into
+ <code><xxx onclick="return true;
+ A4J.Submit(.... );" ></code> and
+ the request isn't fired also in this case (but the
+ standard event processing fired). You must only return
+ "false" if your conditions
+ weren't completed or perform some actions (if
+ needed) without any returns in case you need to fire it.
+ </para>
+ </note>
+ </section>
+ <section id="onCompleteAttribute.DifferencesAfterRelease1.0">
+ <?dbhtml filename="onCompleteAttribute.DifferencesAfterRelease1.0.html"?>
+ <title> What is differences of "onCompelete" attribute after
+ release 1.0?</title>
+ <para> To avoid differences with other JavaScript attributes, a function
+ placement in a JavaScript call is changed, instead of simple inserting
+ of attribute content (<code>..oncomplete
+ :anotherFunction(this)..</code>), it places (<code>oncomplete:
+ function(){anotherFunction(this);}..</code>) in anonymous
+ function, to allow put "chain" of statements in
+ attribute. </para>
+ <para> Since, <emphasis>
+ <property>"this"</property>
+ </emphasis> keyword will point to a parameters map instead of a
+ control element as it was before. You may use
+ <code>document.findElementById()</code>to get references to
+ this object after a request is processed as when a page is updated in
+ Ajax you will have reference to a control, removed from a DOM tree. </para>
+ <para> Or, if you are sure that your element is not updated, you can add <emphasis>
<property>"onsubmit"</property>
- </emphasis>slightly differs from the standard one. Do not return "true" if you want to fire the request - because <code><xxx><a4j:support
- event="onclick"
- onsubmit="return
- true;"></code> is transformed into <code><xxx onclick="return
- true; A4J.Submit(.... );" ></code> and the request
- isn't fired also in this case (but the standard event
- processing fired). You must only return "false" if your conditions weren't completed or perform
- some actions (if needed) without any returns in case you need to
- fire it. </para>
- </note>
- </section>
- <section id="onCompleteAttribute.DifferencesAfterRelease1.0">
- <?dbhtml filename="onCompleteAttribute.DifferencesAfterRelease1.0.html"?>
- <title> What is differences of "onCompelete" attribute after
- release 1.0?</title>
- <para> To avoid differences with other JavaScript attributes, a function placement
- in a JavaScript call is changed, instead of simple inserting of attribute
- content (<code>..oncomplete :anotherFunction(this)..</code>), it places (<code>oncomplete:
- function(){anotherFunction(this);}..</code>) in anonymous function, to allow put
- "chain" of statements in attribute. </para>
- <para> Since, <emphasis>
- <property>"this"</property>
- </emphasis> keyword will point to a parameters map instead of a control
- element as it was before. You may use <code>document.findElementById()</code>to get references to this object after a request is processed as
- when a page is updated in Ajax you will have reference to a control, removed
- from a DOM tree. </para>
- <para> Or, if you are sure that your element is not updated, you can add <emphasis>
- <property>"onsubmit"</property>
- </emphasis> in <emphasis role="bold">
- <property><a4j:support></property>
- </emphasis> (or onclick in <emphasis role="bold">
- <property><a4j:commandLink/Button></property>
- </emphasis>) to place reference to known variable (<code><a4j:commandLink onclick="var myControl=this;"
+ </emphasis> in <emphasis role="bold">
+ <property><a4j:support></property>
+ </emphasis> (or onclick in <emphasis role="bold">
+ <property><a4j:commandLink/Button></property>
+ </emphasis>) to place reference to known variable
+ (<code><a4j:commandLink onclick="var myControl=this;"
oncomplete="anotherFunction(myControl)"/></code>). </para>
- <tip>
- <title>Tip:</title>
- <para>The onComplete syntax now is:</para>
- <programlisting role="XML">
+ <tip>
+ <title>Tip:</title>
+ <para>The onComplete syntax now is:</para>
+ <programlisting role="XML">
<![CDATA[<someAjaxActionComponent ...oncomplete="myFunc(req,event,data)".../>]]>
</programlisting>
- <para> where the <code>event</code> is a variable where the JS event
- copy that fires the request is placed into. One may use it to get
- the element instead of this. and <code>data</code> is a
- variable that contains deserialized value from the
- <emphasis><property>"data"</property></emphasis> attribute. </para>
- </tip>
- </section>
- <section id="InvokeOnComponentUsingWithJSF1.2">
- <?dbhtml filename="InvokeOnComponentUsingWithJSF1.2.html"?>
- <title>Is it possible to use InvokeOnComponent with JSF 1.2?</title>
- <para> RichFaces currently does not use <emphasis>invokeOnComponent</emphasis>
- because of the 2 reasons: </para>
- <itemizedlist>
- <listitem> Compatibility with JSF 1.1 and MyFaces applications is kept, due
- to a big amount of code used in corporate applications. </listitem>
- <listitem>
- <emphasis> InvokeOnComponent</emphasis> works with already known
- clientId, and works fine for communication between widget and backed
- component, or updates content of already rendered component. But
- there are some troubles to use this method for more complex
- use-cases implemented in RichFaces, as there is a choice for
- updatable components in application logic, where it's
- necessary to navigate in a components tree by the native id, with
+ <para> where the <code>event</code> is a variable where the JS event
+ copy that fires the request is placed into. One may use it
+ to get the element instead of this. and <code>data</code> is
+ a variable that contains deserialized value from the <emphasis>
+ <property>"data"</property>
+ </emphasis> attribute. </para>
+ </tip>
+ </section>
+ <section id="InvokeOnComponentUsingWithJSF1.2">
+ <?dbhtml filename="InvokeOnComponentUsingWithJSF1.2.html"?>
+ <title>Is it possible to use InvokeOnComponent with JSF 1.2?</title>
+ <para> RichFaces currently does not use <emphasis>invokeOnComponent</emphasis>
+ because of the 2 reasons: </para>
+ <itemizedlist>
+ <listitem> Compatibility with JSF 1.1 and MyFaces applications is
+ kept, due to a big amount of code used in corporate
+ applications. </listitem>
+ <listitem>
+ <emphasis> InvokeOnComponent</emphasis> works with already
+ known clientId, and works fine for communication between
+ widget and backed component, or updates content of already
+ rendered component. But there are some troubles to use this
+ method for more complex use-cases implemented in RichFaces,
+ as there is a choice for updatable components in application
+ logic, where it's necessary to navigate in a
+ components tree by the native id, with
<code>findComponent()</code> methods. </listitem>
- </itemizedlist>
- <para> Thus, for example, only entire dataTable can be updated in response (but all
- Ajax core action components inside table work properly). </para>
- </section>
- <!--<section id="RegionsInDataTables">
+ </itemizedlist>
+ <para> Thus, for example, only entire dataTable can be updated in response (but
+ all Ajax core action components inside table work properly). </para>
+ </section>
+ <!--<section id="RegionsInDataTables">
<?dbhtml filename="RegionsInDataTables.html"?>
<title>Regions in Data Tables</title>
<para>The regions in Data Tables aren't supported now, but the feature will be implemented in a new Ajax4jsf version for JSF 1.2.</para>
</section>-->
- <section id="keepAliveComponentGeneratesException">
- <?dbhtml filename="keepAliveComponentGeneratesException.html"?>
- <title>How to avoid generating exception for <a4j:keepAlive>
- component?</title>
- <para>To avoid exception, don't forget that the component stores beans in
- serialized view, but your bean should implement <code>java.io.Serializable</code>.</para>
- </section>
+ <section id="keepAliveComponentGeneratesException">
+ <?dbhtml filename="keepAliveComponentGeneratesException.html"?>
+ <title>How to avoid generating exception for <a4j:keepAlive>
+ component?</title>
+ <para>To avoid exception, don't forget that the component stores beans
+ in serialized view, but your bean should implement
+ <code>java.io.Serializable</code>.</para>
+ </section>
- <section id="AFormIsNotSubmittedOrASetterIsNotCalledAfterAJAXrequest">
- <?dbhtml filename="AFormIsNotSubmittedOrASetterIsNotCalledAfterAJAXrequest.html"?>
- <title>Why form isn't submitted or setter isn't called after AJAX
- request?</title>
- <para>This situation could happen because of conversion/validation errors on form
- submission. In order to verify this, it's necessary to place this
- updating via an Ajax error message inside a form:</para>
+ <section id="AFormIsNotSubmittedOrASetterIsNotCalledAfterAJAXrequest">
+ <?dbhtml filename="AFormIsNotSubmittedOrASetterIsNotCalledAfterAJAXrequest.html"?>
+ <title>Why form isn't submitted or setter isn't called after
+ AJAX request?</title>
+ <para>This situation could happen because of conversion/validation errors on
+ form submission. In order to verify this, it's necessary to
+ place this updating via an Ajax error message inside a form:</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[<a4j:outputPanel ajaxRendered="true">
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[<a4j:outputPanel ajaxRendered="true">
<h:messages/>
</a4j:outpurPanel>]]></programlisting>
- </section>
+ </section>
- <section id="DelayedRenderZone">
- <?dbhtml filename="DelayedRenderZone.html"?>
- <title>How to create "a4j delayed render zone"?</title>
- <para>The <emphasis role="bold"><property><a4j:support></property></emphasis> component has
- a <emphasis><property>"requestDelay"</property></emphasis> attribute where you can define the delay.</para>
- <para>More information about this problem could be found on the <ulink
- url="http://jboss.com/index.html?module=bb&op=viewtopic&t=104969"
- >Ajax4Jsf Users Forum.</ulink>
- </para>
- </section>
+ <section id="DelayedRenderZone">
+ <?dbhtml filename="DelayedRenderZone.html"?>
+ <title>How to create "a4j delayed render zone"?</title>
+ <para>The <emphasis role="bold">
+ <property><a4j:support></property>
+ </emphasis> component has a <emphasis>
+ <property>"requestDelay"</property>
+ </emphasis> attribute where you can define the delay.</para>
+ <para>More information about this problem could be found on the <ulink
+ url="http://jboss.com/index.html?module=bb&op=viewtopic&t=104969"
+ >Ajax4Jsf Users Forum.</ulink>
+ </para>
+ </section>
- <section id="HowToStopPoll">
- <?dbhtml filename="HowToStopPoll.html"?>
- <title>How to stop <a4j:poll>?</title>
- <para>More information about this problem could be found on the <ulink
- url="http://jboss.com/index.html?module=bb&op=viewtopic&t=104951"
- >Ajax4Jsf Users Forum. </ulink>
- </para>
- </section>
+ <section id="HowToStopPoll">
+ <?dbhtml filename="HowToStopPoll.html"?>
+ <title>How to stop <a4j:poll>?</title>
+ <para>More information about this problem could be found on the <ulink
+ url="http://jboss.com/index.html?module=bb&op=viewtopic&t=104951"
+ >Ajax4Jsf Users Forum. </ulink>
+ </para>
+ </section>
- <section id="IgnoreDupResponsesAndRequestDelay">
- <?dbhtml filename="IgnoreDupResponsesAndRequestDelay.html"?>
+ <section id="IgnoreDupResponsesAndRequestDelay">
+ <?dbhtml filename="IgnoreDupResponsesAndRequestDelay.html"?>
- <title>How to use IgnoreDupResponses and requestDelay?</title>
- <para>The <emphasis>
- <property>"IgnoreDupResponses"</property>
- </emphasis> attribute appeared from 1.0.4 RC1 version and is used on the
- client for response ignoring after an Ajax request if a newer request has
- been already sent. <para> The additional information could be found <ulink
- url="http://jboss.com/index.html?module=bb&op=viewtopic&t=105766"
- >here</ulink>. </para>
- <emphasis>
- <property>"RequestDelay"</property>
- </emphasis> attribute also defines the client behavior. It sets the time
- delay, after which another request could be sent, all other requests are
- taken away from a queue except the last one. </para>
- </section>
+ <title>How to use IgnoreDupResponses and requestDelay?</title>
+ <para>The <emphasis>
+ <property>"IgnoreDupResponses"</property>
+ </emphasis> attribute appeared from 1.0.4 RC1 version and is used on
+ the client for response ignoring after an Ajax request if a newer
+ request has been already sent. <para> The additional information could
+ be found <ulink
+ url="http://jboss.com/index.html?module=bb&op=viewtopic&t=105766"
+ >here</ulink>. </para>
+ <emphasis>
+ <property>"RequestDelay"</property>
+ </emphasis> attribute also defines the client behavior. It sets the
+ time delay, after which another request could be sent, all other
+ requests are taken away from a queue except the last one. </para>
+ </section>
- <section id="RefreshImage">
- <?dbhtml filename="RefreshImage.html"?>
- <title>How to refresh an image using <a4j:support> component?</title>
- <para>More information about this problem could be found on the <ulink
- url="http://jboss.com/index.html?module=bb&op=viewtopic&t=105995"
- >Ajax4Jsf Users Forum. </ulink>
- </para>
- </section>
+ <section id="RefreshImage">
+ <?dbhtml filename="RefreshImage.html"?>
+ <title>How to refresh an image using <a4j:support> component?</title>
+ <para>More information about this problem could be found on the <ulink
+ url="http://jboss.com/index.html?module=bb&op=viewtopic&t=105995"
+ >Ajax4Jsf Users Forum. </ulink>
+ </para>
+ </section>
- <section id="EventQueueUsage">
- <?dbhtml filename="EventQueueUsage.html"?>
- <title>How to use "EventQueue" attribute?</title>
- <para>The <emphasis>
- <property>"EventQueue"</property>
- </emphasis> attribute defines the query name where the requests are saved
- before their sending to the server. The queue is created for redundant
- requests deleting during frequent events, which call several requests
- forming one after another. The queue cuts redundant requests and send only
- the last one. The queue is created in any case and named on default, the
- attribute usage only re-defines this name. </para>
- </section>
+ <section id="EventQueueUsage">
+ <?dbhtml filename="EventQueueUsage.html"?>
+ <title>How to use "EventQueue" attribute?</title>
+ <para>The <emphasis>
+ <property>"EventQueue"</property>
+ </emphasis> attribute defines the query name where the requests are
+ saved before their sending to the server. The queue is created for
+ redundant requests deleting during frequent events, which call several
+ requests forming one after another. The queue cuts redundant requests
+ and send only the last one. The queue is created in any case and named
+ on default, the attribute usage only re-defines this name. </para>
+ </section>
- <section id="PageRequiredOrNot">
- <?dbhtml filename="PageRequiredOrNot.html"?>
- <title>Is <a4j:page> component required or not?</title>
- <para>
- <emphasis role="bold"><property><4j:page></property></emphasis> is a component used
- for solving of incompatibility problems in early Ajax4jsf and MyFaces
- versions. The component encodes the full html page structure. </para>
- <para>More information about this problem could be found on the <ulink
- url="http://jboss.com/index.html?module=bb&op=viewtopic&t=106849&p..."
- >Ajax4Jsf Users Forum. </ulink>
- </para>
- </section>
+ <section id="PageRequiredOrNot">
+ <?dbhtml filename="PageRequiredOrNot.html"?>
+ <title>Is <a4j:page> component required or not?</title>
+ <para>
+ <emphasis role="bold">
+ <property><4j:page></property>
+ </emphasis> is a component used for solving of incompatibility
+ problems in early Ajax4jsf and MyFaces versions. The component encodes
+ the full html page structure. </para>
+ <para>More information about this problem could be found on the <ulink
+ url="http://jboss.com/index.html?module=bb&op=viewtopic&t=106849&p..."
+ >Ajax4Jsf Users Forum. </ulink>
+ </para>
+ </section>
- <section id="SeveralStatusOnPage">
- <?dbhtml filename="SeveralStatusOnPage.html"?>
- <title>Can I have several <a4j:status> components on one page?</title>
- <para>Yes, you can. More information about this problem could be found on the <ulink
- url="http://livedemo.exadel.com/richfaces-demo/richfaces/status.jsf?c=status"
- >JBoss RichFaces Online Demos</ulink>. </para>
- </section>
+ <section id="SeveralStatusOnPage">
+ <?dbhtml filename="SeveralStatusOnPage.html"?>
+ <title>Can I have several <a4j:status> components on one page?</title>
+ <para>Yes, you can. More information about this problem could be found on the
+ <ulink
+ url="http://livedemo.exadel.com/richfaces-demo/richfaces/status.jsf?c=status"
+ >JBoss RichFaces Online Demos</ulink>. </para>
+ </section>
- <section id="SomeProblemsWithRendering">
- <?dbhtml filename="SomeProblemsWithRendering.html"?>
- <title>Can I use <a4j:region> within <a4j:repeat>?</title>
- <para>
- <emphasis role="bold"><property><a4j:region></property></emphasis> can't
- work inside iteration components like <emphasis role="bold"
- ><property><h:dataTable></property></emphasis> and <emphasis role="bold"
- ><property><a4j:repeat></property></emphasis>. </para>
- <para>The details could be found <ulink
- url="http://jboss.com/index.html?module=bb&op=viewtopic&t=109080"
- >here. </ulink>
- </para>
- </section>
+ <section id="SomeProblemsWithRendering">
+ <?dbhtml filename="SomeProblemsWithRendering.html"?>
+ <title>Can I use <a4j:region> within <a4j:repeat>?</title>
+ <para>
+ <emphasis role="bold">
+ <property><a4j:region></property>
+ </emphasis> can't work inside iteration components like
+ <emphasis role="bold">
+ <property><h:dataTable></property>
+ </emphasis> and <emphasis role="bold">
+ <property><a4j:repeat></property>
+ </emphasis>. </para>
+ <para>The details could be found <ulink
+ url="http://jboss.com/index.html?module=bb&op=viewtopic&t=109080"
+ >here. </ulink>
+ </para>
+ </section>
- <section id="CustomAjaxRequest">
- <?dbhtml filename="CustomAjaxRequest.html"?>
- <title>Why custom Ajax request does not work?</title>
- <para>More information about this problem could be found on the <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=114025"
- >Ajax4Jsf Users Forum.</ulink>
- </para>
- </section>
+ <section id="CustomAjaxRequest">
+ <?dbhtml filename="CustomAjaxRequest.html"?>
+ <title>Why custom Ajax request does not work?</title>
+ <para>More information about this problem could be found on the <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=114025"
+ >Ajax4Jsf Users Forum.</ulink>
+ </para>
+ </section>
- <section id="RerederingSingleDataTableColumn">
- <?dbhtml filename="RerederingSingleDataTableColumn.html"?>
- <title>How to reRender single dataTable column?</title>
- <para>More information about this problem could be found on the <ulink
- url="http://jboss.com/index.html?module=bb&op=viewtopic&t=105725"
- >Ajax4Jsf Users Forum. </ulink>
- </para>
- </section>
+ <section id="RerederingSingleDataTableColumn">
+ <?dbhtml filename="RerederingSingleDataTableColumn.html"?>
+ <title>How to reRender single dataTable column?</title>
+ <para>More information about this problem could be found on the <ulink
+ url="http://jboss.com/index.html?module=bb&op=viewtopic&t=105725"
+ >Ajax4Jsf Users Forum. </ulink>
+ </para>
+ </section>
- <section id="DisableSkins">
- <?dbhtml filename="DisableSkins.html"?>
- <title>How to disable skinability?</title>
- <para>There is possibility to use special skin with name "plain". It doesn't have
- any parameters. It's necessary for embedding RichFaces components into
- existing projecst which have its own styles.</para>
- <para>For information you can see discussion about this problem on the <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066340#..."
- >Ajax4Jsf Users Forum. </ulink>
- </para>
- </section>
+ <section id="DisableSkins">
+ <?dbhtml filename="DisableSkins.html"?>
+ <title>How to disable skinability?</title>
+ <para>There is possibility to use special skin with name "plain". It doesn't
+ have any parameters. It's necessary for embedding RichFaces components
+ into existing projecst which have its own styles.</para>
+ <para>For information you can see discussion about this problem on the <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066340#..."
+ >Ajax4Jsf Users Forum. </ulink>
+ </para>
+ </section>
- <section id="reRenderingfailed">
- <?dbhtml filename="reRenderingfailed.html"?>
- <title>Why does reRendering fail? Hide/Show components using rendered.</title>
- <para> During "show/hide" functionality implementation the main
- error happens because of the "reRender" attribute of some
- Ajax core Action Component is set on a component that depends on rendered
- properties, i.e. a component that is to be hidden/rendered is tried to be
- updated. The problem is that if <code>rendered="false"</code> in this
- moment, the component isn't in the DOM tree and can't be
- updated because of the general limitations described in the Ajax Processing
- chapter. </para>
- <para>The correct variant of functionality implantation:</para>
+ <section id="reRenderingfailed">
+ <?dbhtml filename="reRenderingfailed.html"?>
+ <title>Why does reRendering fail? Hide/Show components using rendered.</title>
+ <para> During "show/hide" functionality implementation the
+ main error happens because of the "reRender"
+ attribute of some Ajax core Action Component is set on a component
+ that depends on rendered properties, i.e. a component that is to be
+ hidden/rendered is tried to be updated. The problem is that if
+ <code>rendered="false"</code> in this
+ moment, the component isn't in the DOM tree and
+ can't be updated because of the general limitations described
+ in the Ajax Processing chapter. </para>
+ <para>The correct variant of functionality implantation:</para>
- <orderedlist>
- <listitem>
- <para>With the rendered attribute wrap the component that is to be
- hidden or rendered on Ajax in a wrapper component (e.g.
- <emphasis role="bold"><property><a4j:outputPanel></property></emphasis>)</para>
- </listitem>
+ <orderedlist>
+ <listitem>
+ <para>With the rendered attribute wrap the component that is
+ to be hidden or rendered on Ajax in a wrapper
+ component (e.g. <emphasis role="bold">
+ <property><a4j:outputPanel></property>
+ </emphasis>)</para>
+ </listitem>
- <listitem>
- <para>Set reRender of an Ajax core Action component on this wrapper
- component instead of the component itself.</para>
- </listitem>
- </orderedlist>
+ <listitem>
+ <para>Set reRender of an Ajax core Action component on this
+ wrapper component instead of the component
+ itself.</para>
+ </listitem>
+ </orderedlist>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
- <programlisting role="XML"><![CDATA[...
+ <programlisting role="XML"><![CDATA[...
<a4j:outputPanel id="panel">
<h:panelGroup rendered="#{bean.rendered}">
<!--Some nested content to be hidden/shown depending on bean.rendered -->
@@ -1099,64 +1174,66 @@
...
]]></programlisting>
- <para>In this case the wrapper component always presents in the DOM tree and its
- inner content could be updated dynamically on AJAX.</para>
- </section>
+ <para>In this case the wrapper component always presents in the DOM tree and its
+ inner content could be updated dynamically on AJAX.</para>
+ </section>
- <section id="PreventDupRerenderingPoll">
- <?dbhtml filename="PreventDupRerenderingPoll.html"?>
- <title>How to prevent duplicate reRendering when using <a4j:poll>?</title>
- <para>For information you can see discussion about this problem on the <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059731#..."
- >Ajax4Jsf Users Forum. </ulink>
- </para>
- </section>
+ <section id="PreventDupRerenderingPoll">
+ <?dbhtml filename="PreventDupRerenderingPoll.html"?>
+ <title>How to prevent duplicate reRendering when using <a4j:poll>?</title>
+ <para>For information you can see discussion about this problem on the <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059731#..."
+ >Ajax4Jsf Users Forum. </ulink>
+ </para>
+ </section>
- <section id="JSCallPropblemsInInclude">
- <?dbhtml filename="JSCallPropblemsInInclude.html"?>
- <title>Why does JavaScript call don't work in <a4j:include>?</title>
- <para>More information about this problem could be found on the <ulink
- url="http://jboss.com/index.html?module=bb&op=viewtopic&t=104317"
- >Ajax4Jsf Users Forum. </ulink>
- </para>
- </section>
+ <section id="JSCallPropblemsInInclude">
+ <?dbhtml filename="JSCallPropblemsInInclude.html"?>
+ <title>Why does JavaScript call don't work in
+ <a4j:include>?</title>
+ <para>More information about this problem could be found on the <ulink
+ url="http://jboss.com/index.html?module=bb&op=viewtopic&t=104317"
+ >Ajax4Jsf Users Forum. </ulink>
+ </para>
+ </section>
- <section id="IncludeAndNavRules">
- <?dbhtml filename="IncludeAndNavRules.html"?>
- <title>How to use <a4j:include> and navigation rules?</title>
- <para>For information you can see discussion about this problem on the <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4062036#..."
- >Ajax4Jsf Users Forum. </ulink>
- </para>
- </section>
+ <section id="IncludeAndNavRules">
+ <?dbhtml filename="IncludeAndNavRules.html"?>
+ <title>How to use <a4j:include> and navigation rules?</title>
+ <para>For information you can see discussion about this problem on the <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4062036#..."
+ >Ajax4Jsf Users Forum. </ulink>
+ </para>
+ </section>
- <section id="ResourceNotRegisteredException">
- <?dbhtml filename="ResourceNotRegisteredException.html"?>
- <title>What does ResourceNotRegistered Exception mean?</title>
+ <section id="ResourceNotRegisteredException">
+ <?dbhtml filename="ResourceNotRegisteredException.html"?>
+ <title>What does ResourceNotRegistered Exception mean?</title>
- <para>RichFaces registers its resources (scripts, images) after an application is
- accessed and then accesses it via a generated URL. During an application
- development when a developer constantly updates it on the server, it could
- happen that RichFaces re-registers its resources after every server restart
- and a browser tries to access them via cashed URL.</para>
+ <para>RichFaces registers its resources (scripts, images) after an application
+ is accessed and then accesses it via a generated URL. During an
+ application development when a developer constantly updates it on the
+ server, it could happen that RichFaces re-registers its resources
+ after every server restart and a browser tries to access them via
+ cashed URL.</para>
- <para>The problem is solved with browser cash update (e.g. CTRL+F5).</para>
- </section>
+ <para>The problem is solved with browser cash update (e.g. CTRL+F5).</para>
+ </section>
- <section id="RerenderingPartPage">
- <?dbhtml filename="RerenderingPartPage.html"?>
- <title>How to reRender only particular row(s) of table?</title>
- <!--para> If you use dataTable then you may use <emphasis>
+ <section id="RerenderingPartPage">
+ <?dbhtml filename="RerenderingPartPage.html"?>
+ <title>How to reRender only particular row(s) of table?</title>
+ <!--para> If you use dataTable then you may use <emphasis>
<property>"ajaxKeys"</property>
</emphasis> attribute to bind the rowKeys to be reRendered there. After you
need to point reRender on the specific rows. </para-->
- <para><emphasis>
- <property>"ajaxKeys"</property>
- </emphasis> attribute defines strings that are updated after an Ajax
- request. It provides possibility to update several child components
- separately without updating the whole page.</para>
+ <para><emphasis>
+ <property>"ajaxKeys"</property>
+ </emphasis> attribute defines strings that are updated after an Ajax
+ request. It provides possibility to update several child components
+ separately without updating the whole page.</para>
- <programlisting role="XML"><![CDATA[...
+ <programlisting role="XML"><![CDATA[...
<a4j:poll intervall="1000" action="#{repeater.action}" reRender="text">
<table>
<tbody>
@@ -1172,24 +1249,24 @@
</a4j:poll>
...
]]></programlisting>
- </section>
- <section id="RowSelectionInScrollableDataTable">
- <?dbhtml filename="RowSelectionInScrollableDataTable.html"?>
- <title>How to get row selection in scrollableDataTable using one and multi-selection
- rows mode?</title>
- <para>In order to get row selection in scrollableDataTable using <property>one and
- multi-selection rows mode</property> you should use the <emphasis>
- <property>"selection"</property>
- </emphasis> attribute. </para>
- <para>In the following example when user submits the form current collection of
- objects selected by user is placed in the object's property. Then on
- complete action the <emphasis role="bold">
- <property><rich:modalPanel></property>
- </emphasis> with selected data will be shown.</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+ </section>
+ <section id="RowSelectionInScrollableDataTable">
+ <?dbhtml filename="RowSelectionInScrollableDataTable.html"?>
+ <title>How to get row selection in scrollableDataTable using one and
+ multi-selection rows mode?</title>
+ <para>In order to get row selection in scrollableDataTable using <property>one
+ and multi-selection rows mode</property> you should use the <emphasis>
+ <property>"selection"</property>
+ </emphasis> attribute. </para>
+ <para>In the following example when user submits the form current collection of
+ objects selected by user is placed in the object's property. Then on
+ complete action the <emphasis role="bold">
+ <property><rich:modalPanel></property>
+ </emphasis> with selected data will be shown.</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<h:form>
<rich:spacer height="30" />
<rich:scrollableDataTable rowKeyVar="rkv" frozenColCount="1" height="200px"
@@ -1249,17 +1326,19 @@
</rich:dataTable>
</rich:modalPanel>
...]]></programlisting>
- <para>In order to build this application, you can create a managed bean like this
- one. Function <code>takeSelection()</code> fills the array <code>selectedCars</code> with the data,
- got from the <property>selection</property>. Function <code>getSelectedCars()</code>
- returns the array <code>selectedCars</code>, which is
- used for filling <emphasis role="bold">
- <property><rich:dataTable></property>
- </emphasis> with selected row/rows data.</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="JAVA"><![CDATA[...
+ <para>In order to build this application, you can create a managed bean like
+ this one. Function <code>takeSelection()</code> fills the array
+ <code>selectedCars</code> with the data, got from the
+ <property>selection</property>. Function
+ <code>getSelectedCars()</code> returns the array
+ <code>selectedCars</code>, which is used for filling
+ <emphasis role="bold">
+ <property><rich:dataTable></property>
+ </emphasis> with selected row/rows data.</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="JAVA"><![CDATA[...
public class DataTableScrollerBean {
private SimpleSelection selection = new SimpleSelection();
private ArrayList<DemoInventoryItem> selectedCars = new ArrayList<DemoInventoryItem>();
@@ -1289,12 +1368,12 @@
}
}
...]]></programlisting>
- <para>Some additional information about usage of <property>one and multi-selection
- rows mode</property> can be found <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=122543"
- >here</ulink>.</para>
- </section>
- <!-- <section id="RowSelectionInDataTable">
+ <para>Some additional information about usage of <property>one and
+ multi-selection rows mode</property> can be found <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=122543"
+ >here</ulink>.</para>
+ </section>
+ <!-- <section id="RowSelectionInDataTable">
<?dbhtml filename="RowSelectionInDataTable.html"?>
<title>How to show a row of a dataTable on a modal panel?</title>
<para>In order to get <property>a row selection in DataTable using </property> you should use the <emphasis>
@@ -1439,23 +1518,25 @@
url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=122543"
>here</ulink>.</para>
</section> -->
-
- <section id="ScrollableDataTableDragAndDrop">
- <?dbhtml filename="ScrollableDataTableDragAndDrop.html"?>
- <title>How to select several rows in a scrollableDataTable and Drag-and-Drop them on dataTable?</title>
- <para>
- How to get row selection in scrollableDataTable using <property>one and multi-selection rows mode</property>
- you could see the section <link linkend="RowSelectionInScrollableDataTable">above</link>.
- </para>
- <para>
- In order to perform Drag-and-Drop of selected columns on a dataTable you could use
- <emphasis role="bold"><property><rich:dragSupport></property></emphasis> and <emphasis role="bold"><property><rich:dropSupport></property></emphasis>
- components as it is shown in the example below.
- </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+
+ <section id="ScrollableDataTableDragAndDrop">
+ <?dbhtml filename="ScrollableDataTableDragAndDrop.html"?>
+ <title>How to select several rows in a scrollableDataTable and Drag-and-Drop
+ them on dataTable?</title>
+ <para> How to get row selection in scrollableDataTable using <property>one and
+ multi-selection rows mode</property> you could see the
+ section <link linkend="RowSelectionInScrollableDataTable"
+ >above</link>. </para>
+ <para> In order to perform Drag-and-Drop of selected columns on a dataTable you
+ could use <emphasis role="bold">
+ <property><rich:dragSupport></property>
+ </emphasis> and <emphasis role="bold">
+ <property><rich:dropSupport></property>
+ </emphasis> components as it is shown in the example below. </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<rich:scrollableDataTable rowKeyVar="rkv" frozenColCount="1" height="400px" width="700px" id="carList" rows="40" columnClasses="col"
value="#{dataTableScrollerBean.allCars}" var="category" sortMode="single" selection="#{dataTableScrollerBean.selection}">
<rich:column id="make">
@@ -1538,9 +1619,12 @@
</rich:dataTable>
</rich:panel>
...]]></programlisting>
- <para>This is the page from <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/scrollableDataTable.jsf">RichFaces LiveDemo</ulink> site and also uses beans from RichFaces LiveDemo site.
- Only one method is added where the dropped selection is stored:</para>
- <programlisting role="JAVA"><![CDATA[...
+ <para>This is the page from <ulink
+ url="http://livedemo.exadel.com/richfaces-demo/richfaces/scrollableDataTable.jsf"
+ >RichFaces LiveDemo</ulink> site and also uses beans from
+ RichFaces LiveDemo site. Only one method is added where the dropped
+ selection is stored:</para>
+ <programlisting role="JAVA"><![CDATA[...
public void dropListener(DropEvent event) {
System.out.println("Drop Listener Fired");
getDroppedCars().clear();
@@ -1550,26 +1634,35 @@
getDroppedCars().add(getAllCars().get(key.intValue()));
}
}
-...]]></programlisting>
- </section>
-
- <section id="SimpleTogglePanelPanelMenuState">
- <?dbhtml filename="SimpleTogglePanelPanelMenuState.html"?>
- <title>How to save the state of <rich:simpleTogglePanel>?</title>
- <para>
- In order to save the state (exapnd/collapse) of the <emphasis role="bold"><property><rich:simpleTogglePanel></property></emphasis> component
- you could use <emphasis><property>"opened"</property></emphasis> attribute responsible for keeping a panel state
- and <emphasis role="bold"><property><a4j:support></property></emphasis> binded to <emphasis><property>"onexpand"</property></emphasis> and <emphasis><property>"oncollapse"</property></emphasis> events.
- </para>
- <para>
- In the following example when you click on the toggle icon <emphasis role="bold"><property><rich:simpleTogglePanel></property></emphasis> appears and current state displays on
- <emphasis role="bold"><property><rich:modalPanel></property></emphasis>.
- This state is remembered between page views.
- </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
-<programlisting role="XML"><![CDATA[...
+...]]></programlisting>
+ </section>
+
+ <section id="SimpleTogglePanelPanelMenuState">
+ <?dbhtml filename="SimpleTogglePanelPanelMenuState.html"?>
+ <title>How to save the state of <rich:simpleTogglePanel>?</title>
+ <para> In order to save the state (exapnd/collapse) of the <emphasis role="bold">
+ <property><rich:simpleTogglePanel></property>
+ </emphasis> component you could use <emphasis>
+ <property>"opened"</property>
+ </emphasis> attribute responsible for keeping a panel state and
+ <emphasis role="bold">
+ <property><a4j:support></property>
+ </emphasis> binded to <emphasis>
+ <property>"onexpand"</property>
+ </emphasis> and <emphasis>
+ <property>"oncollapse"</property>
+ </emphasis> events. </para>
+ <para> In the following example when you click on the toggle icon <emphasis
+ role="bold">
+ <property><rich:simpleTogglePanel></property>
+ </emphasis> appears and current state displays on <emphasis
+ role="bold">
+ <property><rich:modalPanel></property>
+ </emphasis>. This state is remembered between page views. </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<rich:simpleTogglePanel id="toggleP" label="simpleTogglePanel" switchType="client" width="600px" opened="#{bean.state}">
<a4j:support event="onexpand" actionListener="#{bean.stateTrue}" reRender="repeater" oncomplete="Richfaces.showModalPanel('myFrom:panel')" />
<a4j:support event="oncollapse" actionListener="#{bean.stateFalse}" reRender="repeater" oncomplete="Richfaces.showModalPanel('myFrom:panel')" />
@@ -1595,14 +1688,13 @@
<h:outputText value="Expanded simpleTogglePanel: " style="font-weight:bold;" />
<h:outputText value="#{bean.state}" id="repeater" />
</rich:modalPanel>
-...]]></programlisting>
- <para>
- In order to build this application, you can create a managed bean like this one.
- </para>
- <para id="beanState">
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+...]]></programlisting>
+ <para> In order to build this application, you can create a managed bean like
+ this one. </para>
+ <para id="beanState">
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
public class bean {
private boolean state = false;
@@ -1623,26 +1715,36 @@
this.state = false;
}
}
-...]]></programlisting>
- </section>
-
- <section id="PanelMenuGroupState">
- <?dbhtml filename="PanelMenuGroupState.html"?>
- <title>How to save the state of <rich:panelMenuGroup>?</title>
- <para>
- With the help of the <emphasis><property>"expanded"</property></emphasis> attribute
- and <emphasis role="bold"><property><a4j:support></property></emphasis> binded to <emphasis><property>"onexpand"</property></emphasis> and <emphasis><property>"oncollapse"</property></emphasis> events
- you could keep the state ("expand"/"collapse") of the <emphasis role="bold"><property><rich:panelMenuGroup></property></emphasis> component.
- </para>
- <para>
- In the following example when you click on the toggle icon the <emphasis role="bold"><property><rich:panelMenuGroup></property></emphasis>
- expands and current state displays on <emphasis role="bold"><property><rich:modalPanel></property></emphasis>.
- This state is remembered between page views.
- </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+...]]></programlisting>
+ </section>
+
+ <section id="PanelMenuGroupState">
+ <?dbhtml filename="PanelMenuGroupState.html"?>
+ <title>How to save the state of <rich:panelMenuGroup>?</title>
+ <para> With the help of the <emphasis>
+ <property>"expanded"</property>
+ </emphasis> attribute and <emphasis role="bold">
+ <property><a4j:support></property>
+ </emphasis> binded to <emphasis>
+ <property>"onexpand"</property>
+ </emphasis> and <emphasis>
+ <property>"oncollapse"</property>
+ </emphasis> events you could keep the state
+ ("expand"/"collapse") of the
+ <emphasis role="bold">
+ <property><rich:panelMenuGroup></property>
+ </emphasis> component. </para>
+ <para> In the following example when you click on the toggle icon the <emphasis
+ role="bold">
+ <property><rich:panelMenuGroup></property>
+ </emphasis> expands and current state displays on <emphasis
+ role="bold">
+ <property><rich:modalPanel></property>
+ </emphasis>. This state is remembered between page views. </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<h:form id="myFrom">
<rich:panelMenu expandMode="ajax" iconExpandedTopGroup="chevronUp" iconCollapsedTopGroup="chevronDown">
<rich:panelMenuGroup label="Group 1" expanded="#{bean.state}">
@@ -1664,24 +1766,25 @@
<h:outputText value="#{bean.state}" id="repeater" />
</rich:modalPanel>
</h:form>
-...]]></programlisting>
- <para>
- In order to build this application, you can create a managed bean like <link linkend="beanState">this one</link>.
- </para>
- </section>
-
-
- <section id="RowSelectionInDataTable">
- <?dbhtml filename="HighlightRowDataTable.html"?>
- <title>How to highlight rows in a dataTable when the mouse is over?</title>
- <para>
- In order to highlight rows in a dataTable when the mouse is over you should use
- <emphasis><property>"onRowMouseOver"</property></emphasis> and <emphasis><property>"onRowMouseOut"</property></emphasis> attributes.
- </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+...]]></programlisting>
+ <para> In order to build this application, you can create a managed bean like
+ <link linkend="beanState">this one</link>. </para>
+ </section>
+
+
+ <section id="RowSelectionInDataTable">
+ <?dbhtml filename="HighlightRowDataTable.html"?>
+ <title>How to highlight rows in a dataTable when the mouse is over?</title>
+ <para> In order to highlight rows in a dataTable when the mouse is over you
+ should use <emphasis>
+ <property>"onRowMouseOver"</property>
+ </emphasis> and <emphasis>
+ <property>"onRowMouseOut"</property>
+ </emphasis> attributes. </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<h:form>
<rich:dataTable onRowMouseOver="this.style.font = 'bold 20pt Arial'"
onRowMouseOut="this.style.font='#{a4jSkin.tableFont}'"
@@ -1767,17 +1870,19 @@
</rich:dataTable>
</h:form>
...]]></programlisting>
-
- </section>
-
- <section id="OneRowSelectionInDataTable">
- <?dbhtml filename="HighlightRowDataTable.html"?>
- <title>How to select one row of a dataTable by clicking on it, even if clicked in an inputText of this row?</title>
- <para>In order to select one row of a dataTable by clicking on it you could use JavaScript function described below. </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+
+ </section>
+
+ <section id="OneRowSelectionInDataTable">
+ <?dbhtml filename="HighlightRowDataTable.html"?>
+ <title>How to select one row of a dataTable by clicking on it, even if clicked
+ in an inputText of this row?</title>
+ <para>In order to select one row of a dataTable by clicking on it you could use
+ JavaScript function described below. </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<script type="text/javascript">
var oldRow;
function changeColor(row)
@@ -1791,11 +1896,17 @@
}
</script>
...]]></programlisting>
- <para>Then you could use <emphasis role="bold"><property>a4j:support</property></emphasis> with <emphasis><property>"event"</property></emphasis> and <emphasis><property>"onsubmit"</property></emphasis> attributes.</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+ <para>Then you could use <emphasis role="bold">
+ <property>a4j:support</property>
+ </emphasis> with <emphasis>
+ <property>"event"</property>
+ </emphasis> and <emphasis>
+ <property>"onsubmit"</property>
+ </emphasis> attributes.</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<h:form>
<rich:dataTable cellpadding="0" cellspacing="0"
width="700" border="0" var="record" value="#{report.expReport.records}">
@@ -1805,31 +1916,42 @@
...
</rich:dataTable>
</h:form>
-...]]></programlisting>
- </section>
- <section id="reRenderCells">
- <?dbhtml filename="reRenderCells.html"?>
- <title>How to reRender table cells with <a4j:support>?</title>
- <para>In order to reRender table cells with <emphasis role="bold"><property><a4j:support></property></emphasis>
- you should set exact <property>ids</property> values for every updatable components
- and point this <property>id</property> to the <emphasis><property>"reRender"</property></emphasis> attribute.</para>
-
- <note>
- <title>Note:</title>
- <para>The value of <emphasis><property>"reRender"</property></emphasis>
- attribute of the <emphasis role="bold"><property><a4j:support></property></emphasis> tag defines which part(s)
- of our page is (are) to be updated. In this case, the only part of the page to update is the
- <emphasis role="bold"><property><h:outputText></property></emphasis> tag because its <property>id</property>
- value matches to the value of <emphasis><property>"reRender"</property></emphasis>
- attribute.
- As you see, it's not difficult to update multiple elements on the page, only list their <property>ids</property> as the value of
- <emphasis><property>"reRender"</property></emphasis>
- attribute .</para>
- </note>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+...]]></programlisting>
+ </section>
+ <section id="reRenderCells">
+ <?dbhtml filename="reRenderCells.html"?>
+ <title>How to reRender table cells with <a4j:support>?</title>
+ <para>In order to reRender table cells with <emphasis role="bold">
+ <property><a4j:support></property>
+ </emphasis> you should set exact <property>ids</property> values for
+ every updatable components and point this <property>id</property> to
+ the <emphasis>
+ <property>"reRender"</property>
+ </emphasis> attribute.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>The value of <emphasis>
+ <property>"reRender"</property>
+ </emphasis> attribute of the <emphasis role="bold">
+ <property><a4j:support></property>
+ </emphasis> tag defines which part(s) of our page is (are)
+ to be updated. In this case, the only part of the page to
+ update is the <emphasis role="bold">
+ <property><h:outputText></property>
+ </emphasis> tag because its <property>id</property> value
+ matches to the value of <emphasis>
+ <property>"reRender"</property>
+ </emphasis> attribute. As you see, it's not difficult to
+ update multiple elements on the page, only list their
+ <property>ids</property> as the value of <emphasis>
+ <property>"reRender"</property>
+ </emphasis> attribute .</para>
+ </note>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<rich:column>
<f:facet name="header">
<h:outputText value="Input1"/>
@@ -1850,10 +1972,13 @@
</f:facet>
<h:outputText id="output1" value="#{entry.output1}"/>
</rich:column>
-...]]></programlisting>
- <para>As it could be seen in the example above, the footer with <emphasis role="bold"><property><h:outputText></property></emphasis> reRenderes.</para>
- </section>
- <!--section>
+...]]></programlisting>
+ <para>As it could be seen in the example above, the footer with <emphasis
+ role="bold">
+ <property><h:outputText></property>
+ </emphasis> reRenderes.</para>
+ </section>
+ <!--section>
<?dbhtml filename="HighlightRowDataTable.html"?>
<title>How to use jsFunction with JSON?</title>
<para>JsFunction and JSON can be used in many ways, for example:</para>
@@ -1914,8 +2039,8 @@
<programlisting role="JAVA"><![CDATA[var jsonString = executeObjectCreation("test", "anotherParam");
var myObject = eval(jsonString);
var name = myObject.name;
-...]]></programlisting-->
- <!--para>You can use jsFunction to call the jsonTest backing bean that generates some random data in a JSON-String.
+...]]></programlisting-->
+ <!--para>You can use jsFunction to call the jsonTest backing bean that generates some random data in a JSON-String.
That JSON-String is then passed to the updateFields method, which evaluates it and populates some html tags with its content. </para>
<para>
<emphasis role="bold">Example:</emphasis>
@@ -2049,18 +2174,23 @@
jsonData = aJsonData;
}
}
-...]]></programlisting-->
- <!--/section-->
- <section id="DinamicColumns">
- <?dbhtml filename="DinamicColumns.html"?>
- <title>How to dynamic columns?</title>
- <para>In order to create dynamic columns you could use the <emphasis role="bold"><property><rich:column></property></emphasis> component
- with the<emphasis><property>"rendered"</property></emphasis> attribute. You should just set the value of defined dynamic cell to the
- <emphasis><property>"rendered"</property></emphasis> attribute field.</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+...]]></programlisting-->
+ <!--/section-->
+ <section id="DinamicColumns">
+ <?dbhtml filename="DinamicColumns.html"?>
+ <title>How to dynamic columns?</title>
+ <para>In order to create dynamic columns you could use the <emphasis role="bold">
+ <property><rich:column></property>
+ </emphasis> component with the<emphasis>
+ <property>"rendered"</property>
+ </emphasis> attribute. You should just set the value of defined
+ dynamic cell to the <emphasis>
+ <property>"rendered"</property>
+ </emphasis> attribute field.</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<ui:composition template="/WEB-INF/layout/template.xhtml">
<ui:define name="body">
<h2>Table</h2>
@@ -2103,12 +2233,12 @@
</ui:define>
</ui:composition>
...]]></programlisting>
- <para>In order to build this application, you can create a managed bean like this
- one.</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="JAVA"><![CDATA[
+ <para>In order to build this application, you can create a managed bean like
+ this one.</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="JAVA"><![CDATA[
public class TableBackingRendered implements Serializable {
private static final long serialVersionUID = 1L;
private Random rand = new Random(System.currentTimeMillis());
@@ -2149,8 +2279,8 @@
this.tableData = tableData;
}
}
-...]]></programlisting>
- <!--para>Another solution when you are dealing with a significant amount of rows, if you are using facelets you can use c:forEach (jslt).</para>
+...]]></programlisting>
+ <!--para>Another solution when you are dealing with a significant amount of rows, if you are using facelets you can use c:forEach (jslt).</para>
<para>
<emphasis role="bold">Example:</emphasis>
</para>
@@ -2166,17 +2296,18 @@
<h:outputText value="#{rowCol.index?.cells.value}"/>
</c:forEach>
</rich:dataTable>
-...]]></programlisting-->
- </section>
- <section id="Trinidad">
- <?dbhtml filename="Trinidad.html"?>
- <title>RichFaces with Trinidad?</title>
- <para>Here is a stripped down version of web.xml that integrates RichFaces and Trinidad.</para>
-
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[
+...]]></programlisting-->
+ </section>
+ <section id="Trinidad">
+ <?dbhtml filename="Trinidad.html"?>
+ <title>RichFaces with Trinidad?</title>
+ <para>Here is a stripped down version of web.xml that integrates RichFaces and
+ Trinidad.</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[
<?xml version="1.0" ?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd"
@@ -2291,44 +2422,47 @@
</welcome-file-list>
</web-app>
-]]></programlisting>
- </section>
- <section>
- <?dbhtml filename="WhydoesJSScriptsconflict.html"?>
- <title>Why does Java Script conflict?</title>
- <para>Richfaces 3.1.3 uses 1.6.0 version of prototype.js script instead of 1.5.1
- that's been used for earlier versions. There are 2 prototype versions included
- (the first included implicitly as a dependency of toggle panel components and
- the second one included explicitly as a link). Versions conflict is the cause of the problem.</para>
- <para>RichFaces 3.1.3 is bundled with the same ones as Prototype 1.6.0, Scriptaculous 1.8.0</para>
- <para>
- <emphasis role="bold">Example in web.xml::</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+]]></programlisting>
+ </section>
+ <section>
+ <?dbhtml filename="WhydoesJSScriptsconflict.html"?>
+ <title>Why does Java Script conflict?</title>
+ <para>Richfaces 3.1.3 uses 1.6.0 version of prototype.js script instead of 1.5.1
+ that's been used for earlier versions. There are 2 prototype versions
+ included (the first included implicitly as a dependency of toggle
+ panel components and the second one included explicitly as a link).
+ Versions conflict is the cause of the problem.</para>
+ <para>RichFaces 3.1.3 is bundled with the same ones as Prototype 1.6.0,
+ Scriptaculous 1.8.0</para>
+ <para>
+ <emphasis role="bold">Example in web.xml::</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<context-param>
<param-name>org.richfaces.ExcludeScripts</param-name>
<param-value>Prototype,Scriptaculous</param-value>
</context-param>
-...]]></programlisting>
- <para>RichFaces components use Prototype very hard. In particular, some patches has been removed that are already included into 1.6.0.
- Adding feature with exclusion makes it possible to use Prototype with version less than 1.6.0. This will break some of the components.</para>
-
- </section>
-
- <section id="fileUploadConf">
- <?dbhtml filename="FileUploadConf.html"?>
- <title><rich:fileUpload> with Seam</title>
- <para>
- The <emphasis role="bold"><property><rich:fileUpload></property></emphasis> component could work together with Seam framework.
- </para>
- <para>
- Initialization parameters should be defined for Seam Filter in web.xml.
- They will be automatically set up for Ajax4Jsf Filer by Seam framework on start up.
- </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+...]]></programlisting>
+ <para>RichFaces components use Prototype very hard. In particular, some patches
+ has been removed that are already included into 1.6.0. Adding feature
+ with exclusion makes it possible to use Prototype with version less
+ than 1.6.0. This will break some of the components.</para>
+
+ </section>
+
+ <section id="fileUploadConf">
+ <?dbhtml filename="FileUploadConf.html"?>
+ <title><rich:fileUpload> with Seam</title>
+ <para> The <emphasis role="bold">
+ <property><rich:fileUpload></property>
+ </emphasis> component could work together with Seam framework. </para>
+ <para> Initialization parameters should be defined for Seam Filter in web.xml.
+ They will be automatically set up for Ajax4Jsf Filer by Seam framework
+ on start up. </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<filter>
<filter-name>Seam Filter</filter-name>
<filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
@@ -2341,53 +2475,141 @@
<param-value>200000</param-value>
</init-param>
</filter>
-...]]></programlisting>
- </section>
- <section id="suggestionboxObjectSelection">
- <?dbhtml filename="suggestionboxObjectSelection.html"?>
- <title>Optional object selection in <rich:suggestionbox></title>
- <para>
- The <emphasis role="bold"><property><rich:suggestionbox></property></emphasis> component provides such feature as
- object selection. In order to store selected items as objects and then get access to them you could use next scenario:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Add <emphasis><property>"usingSuggestObjects"</property></emphasis> attribute with "true" value to
- <emphasis role="bold"><property><rich:suggestionbox></property></emphasis>
- </para>
- </listitem>
- <listitem>
- <para>
- Use <emphasis><property>"onobjectchanged"</property></emphasis> event attribute
- to store objects currently selected
- </para>
- </listitem>
- <listitem>
- <para>
- All selected objects are stored under <code>suggestion.SelectedItems</code> array.
- Each array element contains of <code>text</code> and <code>object</code> properties.
- So, you could iterate this array, get <property>not null objects</property> and then get the property you need.
- </para>
- </listitem>
- </itemizedlist>
- </section>
- <section id="viewExpiredException">
- <?dbhtml filename="viewExpiredException.html"?>
- <title>How to handle ViewExpiredException?</title>
- <para>
- As <property>RichFaces 3.1</property> is targeted at JSF 1.1,
- you won't get <code>ViewExpiredExceptions</code> generated when using it with JSF 1.2.
- This exception appears after session timeout.
- </para>
- <para>
- Fortunately there is an easy workaround. Add to your web.xml:
- </para>
- <programlisting role="XML"><![CDATA[...
+...]]></programlisting>
+ </section>
+
+ <section id="richfileUploadforMyFaces" role="new">
+ <?dbhtml filename="richfileUploadforMyFaces.html"?>
+ <title>How to configure <rich:fileUpload> for MyFaces framework</title>
+ <para> To make <emphasis role="bold">
+ <property><rich:fileUpload></property>
+ </emphasis> component work properly with MyFaces framework, the
+ extentions filter for that framework should be defined in web.xml
+ file. </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<!--Ajax filter definition-->
+<filter>
+ <display-name>Ajax4jsf Filter</display-name>
+ <filter-name>ajax4jsf</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ <init-param>
+ <param-name>createTempFiles</param-name>
+ <param-value>true</param-value>
+ </init-param>
+</filter>
+
+<!--Extensions filter definition-->
+<filter>
+ <filter-name>extensionsFilter</filter-name>
+ <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
+ <init-param>
+ <description>
+ Set the size limit for uploaded files. Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB
+ </description>
+ <param-name>uploadMaxFileSize</param-name>
+ <param-value>100m</param-value>
+ </init-param>
+ <init-param>
+ <description>
+ Set the threshold size - files below this limit are stored in memory, files above this limit are stored on disk. Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB
+ </description>
+ <param-name>uploadThresholdSize</param-name>
+ <param-value>100k</param-value>
+ </init-param>
+</filter>
+
+<!--Mapping Ajax filter on the faces servlet-->
+<filter-mapping>
+ <filter-name>ajax4jsf</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ <dispatcher>ERROR</dispatcher>
+</filter-mapping>
+
+<!--Mapping MyfFaces extention filter on the faces servlet-->
+<filter-mapping>
+ <filter-name>extensionsFilter</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+</filter-mapping>
+
+<!--Listener, that allows Jetty serving MyFaces applications-->
+<listener>
+ <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
+</listener>
+
+<!--Faces servlet definition-->
+<servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+</servlet>
+
+<!--MappingFaces servlet on the *.jsf -->
+<servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+</servlet-mapping>
+...]]></programlisting>
+ <para> Note, that definition and mapping of the extentions filter goes after
+ definition and mapping of ajax filter. This is a required condition to
+ make it work properly. Moreover, the extention filter should be mapped
+ on the faces servlet but not to *.jsf (!) to provide this sequence
+ work properly. </para>
+ </section>
+
+ <section id="suggestionboxObjectSelection">
+ <?dbhtml filename="suggestionboxObjectSelection.html"?>
+ <title>Optional object selection in <rich:suggestionbox></title>
+ <para> The <emphasis role="bold">
+ <property><rich:suggestionbox></property>
+ </emphasis> component provides such feature as object selection. In
+ order to store selected items as objects and then get access to them
+ you could use next scenario: </para>
+ <itemizedlist>
+ <listitem>
+ <para> Add <emphasis>
+ <property>"usingSuggestObjects"</property>
+ </emphasis> attribute with
+ "true" value to <emphasis
+ role="bold">
+ <property><rich:suggestionbox></property>
+ </emphasis>
+ </para>
+ </listitem>
+ <listitem>
+ <para> Use <emphasis>
+ <property>"onobjectchanged"</property>
+ </emphasis> event attribute to store objects
+ currently selected </para>
+ </listitem>
+ <listitem>
+ <para> All selected objects are stored under
+ <code>suggestion.SelectedItems</code>
+ array. Each array element contains of
+ <code>text</code> and <code>object</code>
+ properties. So, you could iterate this array, get
+ <property>not null objects</property>
+ and then get the property you need. </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="viewExpiredException">
+ <?dbhtml filename="viewExpiredException.html"?>
+ <title>How to handle ViewExpiredException?</title>
+ <para> As <property>RichFaces 3.1</property> is targeted at JSF 1.1, you
+ won't get <code>ViewExpiredExceptions</code> generated when
+ using it with JSF 1.2. This exception appears after session timeout. </para>
+ <para> Fortunately there is an easy workaround. Add to your web.xml: </para>
+ <programlisting role="XML"><![CDATA[...
<context-param>
<param-name>com.sun.faces.enableRestoreView11Compatibility</param-name>
<param-value>true</param-value>
</context-param>
-...]]></programlisting>
- </section>
+...]]></programlisting>
+ </section>
</chapter>
16 years, 5 months
JBoss Rich Faces SVN: r10061 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2008-08-13 07:38:47 -0400 (Wed, 13 Aug 2008)
New Revision: 10061
Modified:
trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml
Log:
RF-4080: Developer guide does not contain details for web.xml configuration to successfully integrate fileUpload component with myfaces framework
Modified: trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2008-08-13 10:12:25 UTC (rev 10060)
+++ trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2008-08-13 11:38:47 UTC (rev 10061)
@@ -1,281 +1,347 @@
<?xml version="1.0" encoding="UTF-8"?>
<section>
- <sectioninfo>
- <keywordset>
- <keyword>rich:fileUpload</keyword>
- <keyword>fileUpload</keyword>
- </keywordset>
- </sectioninfo>
- <table>
- <title>Component identification parameters</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Name</entry>
- <entry>Value</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>component-type</entry>
- <entry>org.richfaces.component.FileUpload</entry>
- </row>
- <row>
- <entry>component-class</entry>
- <entry>org.richfaces.component.html.HtmlFileUpload</entry>
- </row>
- <row>
- <entry>component-family</entry>
- <entry>org.richfaces.component.FileUpload</entry>
- </row>
- <row>
- <entry>renderer-type</entry>
- <entry>org.richfaces.renderkit.html.FileUploadRenderer</entry>
- </row>
- <row>
- <entry>tag-class</entry>
- <entry>org.richfaces.taglib.FileUploadTag</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <section>
- <title>Creating the Component with a Page Tag</title>
- <para>To create the simplest variant on a page use the following syntax:</para>
+ <sectioninfo>
+ <keywordset>
+ <keyword>rich:fileUpload</keyword>
+ <keyword>fileUpload</keyword>
+ </keywordset>
+ </sectioninfo>
+ <table>
+ <title>Component identification parameters</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Value</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>component-type</entry>
+ <entry>org.richfaces.component.FileUpload</entry>
+ </row>
+ <row>
+ <entry>component-class</entry>
+ <entry>org.richfaces.component.html.HtmlFileUpload</entry>
+ </row>
+ <row>
+ <entry>component-family</entry>
+ <entry>org.richfaces.component.FileUpload</entry>
+ </row>
+ <row>
+ <entry>renderer-type</entry>
+ <entry>org.richfaces.renderkit.html.FileUploadRenderer</entry>
+ </row>
+ <row>
+ <entry>tag-class</entry>
+ <entry>org.richfaces.taglib.FileUploadTag</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <section>
+ <title>Creating the Component with a Page Tag</title>
+ <para>To create the simplest variant on a page use the following syntax:</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<rich:fileUpload />
...]]></programlisting>
- </section>
- <section>
- <title>Creating the Component Dynamically Using Java</title>
+ </section>
+ <section>
+ <title>Creating the Component Dynamically Using Java</title>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.HtmlFileUpload;
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.HtmlFileUpload;
...
HtmlFileUpload myFileUpload = new HtmlFileUpload();
...]]></programlisting>
- </section>
- <section>
- <title>Details of Usage</title>
- <para>The <emphasis role="bold"><property><rich:fileUpload></property></emphasis> component consists of two parts:<itemizedlist>
- <listitem>
- <para>
- <property>List of files</property> which contains the list of currently chosen files to upload with possibility to manage every file
- </para>
- </listitem>
- <listitem>
- <para>
- <property>Component controls</property> - the bar with controls for managing the whole component
+ </section>
+ <section>
+ <title>Details of Usage</title>
+ <para>The <emphasis role="bold">
+ <property><rich:fileUpload></property>
+ </emphasis> component consists of two parts:<itemizedlist>
+ <listitem>
+ <para>
+ <property>List of files</property> which
+ contains the list of currently chosen
+ files to upload with possibility to
+ manage every file </para>
+ </listitem>
+ <listitem>
+ <para>
+ <property>Component controls</property>
+ - the bar with controls for managing the
+ whole component </para>
+ </listitem>
+ </itemizedlist>
</para>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- There are two places where uploaded files are stored:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- In the temporary folder (depends on OS) if the value of the <code>createTempFile</code> parameter in <property>Ajax4jsf Filter</property> section
- is "true" (by Default)
- </para>
- <programlisting role="XML"><![CDATA[...
+ <para> There are two places where uploaded files are stored: </para>
+ <itemizedlist>
+ <listitem>
+ <para> In the temporary folder (depends on OS) if the value
+ of the <code>createTempFile</code> parameter in
+ <property>Ajax4jsf Filter</property>
+ section is "true" (by Default) </para>
+ <programlisting role="XML"><![CDATA[...
<init-param>
<param-name>createTempFiles</param-name>
<param-value>true</param-value>
</init-param>
-...]]></programlisting>
- </listitem>
- <listitem>
+...]]></programlisting>
+ </listitem>
+ <listitem>
+ <para> In the RAM if the value of the
+ <code>createTempFile</code> parameter in
+ <property>Ajax4jsf Filter</property>
+ section is "false". This is a
+ better way for storing small-sized files. </para>
+ </listitem>
+ </itemizedlist>
+
+ <para> The <emphasis>
+ <property>"uploadData"</property>
+ </emphasis> attribute defines the collection of files uploaded. See
+ the example below. </para>
<para>
- In the RAM if the value of the <code>createTempFile</code> parameter in <property>Ajax4jsf Filter</property> section
- is "false". This is a better way for storing small-sized files.
+ <emphasis role="bold">Example:</emphasis>
</para>
- </listitem>
- </itemizedlist>
-
- <para>
- The <emphasis><property>"uploadData"</property></emphasis> attribute
- defines the collection of files uploaded. See the example below.
- </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+ <programlisting role="XML"><![CDATA[...
<rich:fileUpload uploadData="#{bean.data}"/>
...]]></programlisting>
- <para>The <emphasis><property>"fileUploadedListener"</property></emphasis> is
- called at server side after every file uploaded and used for the saving files from temporary folder or RAM.
- </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+ <para>The <emphasis>
+ <property>"fileUploadedListener"</property>
+ </emphasis> is called at server side after every file uploaded and
+ used for the saving files from temporary folder or RAM. </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<rich:fileUpload uploadData="#{bean.data}" fileUploadListener="#{bean.listener}"/>
...]]></programlisting>
- <para>
- Automatically files uploading could be performed by means of the <emphasis><property> "immediateUpload"</property></emphasis> attribute.
- If the value of this attribute is "true" files are uploaded automatically once they have been added into the list.
- All next files in the list are uploaded automatically one by one.
- If you cancel uploading process next files aren't started to upload till you press the "Upload" button or clear the list.
- </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+ <para> Automatically files uploading could be performed by means of the <emphasis>
+ <property> "immediateUpload"</property>
+ </emphasis> attribute. If the value of this attribute is
+ "true" files are uploaded automatically once they
+ have been added into the list. All next files in the list are uploaded
+ automatically one by one. If you cancel uploading process next files
+ aren't started to upload till you press the
+ "Upload" button or clear the list. </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<rich:fileUpload uploadData="#{bean.data}" fileUploadListener="#{bean.listener}" immediateUpload="true"/>
...]]></programlisting>
- <para>
- The <emphasis><property> "autoclear"</property></emphasis> attribute is used to remove automatically files from the list after upload completed.
- See the simple example below.
- </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+ <para> The <emphasis>
+ <property> "autoclear"</property>
+ </emphasis> attribute is used to remove automatically files from the
+ list after upload completed. See the simple example below. </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<rich:fileUpload uploadData="#{bean.data}" autoclear="true"/>
...]]></programlisting>
-<!--RESTRICTIONS-->
-
-<para>
- The <emphasis role="bold"><property><rich:fileUpload></property></emphasis> component provides following restrictions:
-</para>
- <itemizedlist>
- <listitem>
- <para>
- On <property> file types</property>, use <emphasis><property> "acceptedTypes"</property></emphasis> attribute
- to define file types accepted by component.
- In the example below only files with "html" and "jpg" extensions are accepted to upload.
- </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
-<programlisting role="XML"><![CDATA[...
+ <!--RESTRICTIONS-->
+
+ <para> The <emphasis role="bold">
+ <property><rich:fileUpload></property>
+ </emphasis> component provides following restrictions: </para>
+ <itemizedlist>
+ <listitem>
+ <para> On <property> file types</property>, use <emphasis>
+ <property>
+ "acceptedTypes"</property>
+ </emphasis> attribute to define file types
+ accepted by component. In the example below only
+ files with "html" and
+ "jpg" extensions are accepted to
+ upload. </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<rich:fileUpload acceptedTypes="html, jpg"/>
...]]></programlisting>
- </listitem>
- <listitem>
- <para>
- On <property> file size</property>, use the <code>maxRequestSize</code> parameter(value in bytes) inside <property>Ajax4jsf Filter</property> section
- in <property>web.xml</property>:
- </para>
- <programlisting role="XML"><![CDATA[...
+ </listitem>
+ <listitem>
+ <para> On <property> file size</property>, use the
+ <code>maxRequestSize</code>
+ parameter(value in bytes) inside
+ <property>Ajax4jsf Filter</property>
+ section in <property>web.xml</property>: </para>
+ <programlisting role="XML"><![CDATA[...
<init-param>
<param-name>maxRequestSize</param-name>
<param-value>1000000</param-value>
</init-param>
...]]></programlisting>
- </listitem>
- <listitem>
- <para>
- On <property>max files quantity</property>, use the <emphasis><property> "maxFilesQuantity"</property></emphasis> attribute
- to define max number of files allowed to be uploaded. After a number of files in the list equals to the value of this attribute "Add" button is disabled and nothing could be uploaded even if you clear the whole list.
- In order to upload files again you should rerender the component.
- As it could be seen in the example below, only 2 files are accepted for uploading.
- </para>
-
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+ </listitem>
+ <listitem>
+ <para> On <property>max files quantity</property>, use the <emphasis>
+ <property>
+ "maxFilesQuantity"</property>
+ </emphasis> attribute to define max number of
+ files allowed to be uploaded. After a number of
+ files in the list equals to the value of this
+ attribute "Add" button is
+ disabled and nothing could be uploaded even if you
+ clear the whole list. In order to upload files
+ again you should rerender the component. As it
+ could be seen in the example below, only 2 files
+ are accepted for uploading. </para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<rich:fileUpload maxFilesQuantity="2"/>
...]]></programlisting>
- <para>
- This is the result:
- </para>
- <figure>
- <title><emphasis role="bold"><property><rich:fileUpload></property></emphasis>with
- <emphasis><property> "maxFilesQuantity"</property></emphasis> attribute</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/fileUpload2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- </itemizedlist>
+ <para> This is the result: </para>
+ <figure>
+ <title><emphasis role="bold">
+ <property><rich:fileUpload></property>
+ </emphasis>with <emphasis>
+ <property>
+ "maxFilesQuantity"</property>
+ </emphasis> attribute</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/fileUpload2.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ </itemizedlist>
-
-
- <para id="fileUploadEventAttributes">The <emphasis role="bold"><property><rich:fileUpload></property></emphasis> component
- provides a number of specific event attributes:
- </para>
- <itemizedlist>
-
- <listitem>
- <para>
- The <emphasis><property> "onadd"</property></emphasis>a event handler called on an add file operation
- </para>
- </listitem>
-
- <listitem>
- <para>
- The <emphasis><property> "onupload"</property></emphasis> which gives you a possibility to cancel the upload at client side
- </para>
- </listitem>
- <listitem>
- <para>
- The <emphasis><property> "onuploadcomplete"</property></emphasis> which is called after all files from the list are uploaded
- </para>
- </listitem>
- <listitem>
- <para>
- The <emphasis><property> "onuploadcanceled"</property></emphasis> which is called after upload has been canceled via cancel control
- </para>
- </listitem>
- <listitem>
- <para>
- The <emphasis><property> "onerror"</property></emphasis> which is called if the file upload was interrupted according to any errors
- </para>
- </listitem>
- </itemizedlist>
-
-
-
-
- <!--Flash Module-->
- <para>
- The <emphasis role="bold"><property><rich:fileUpload></property></emphasis> component has an embedded Flash module
- that adds extra functionality to the component. The module is enabled with <emphasis><property> "allowFlash"</property></emphasis>
- attribute set to "true".
- </para>
- <para>These are the additional features that the Flash module provides:</para>
-
- <itemizedlist>
- <listitem><para>Multiple files choosing;</para></listitem>
- <listitem><para>Permitted file types are specified in the "Open File" dialog window;</para></listitem>
- <listitem><para>A number of additional entry object properties are also available, which can be found <link linkend="objectProperties">here</link>. </para></listitem>
- </itemizedlist>
-
- <para>Apart from uploading files to the sever without using AJAX, the Flash module provides a number of useful API functions that can be used to obtain information about the uploaded file. </para>
-
- <para>There are 2 ways to obtain the data stored in the FileUploadEntry object. </para>
-
- <itemizedlist>
- <listitem><para>By means of JavaScript on the client side. Use the following syntax for that <code>entries[i].propertyName</code>. For example <code>entries[0].state</code> will return the state of the file the is being processed or has just been processed.</para></listitem>
-
-
- <listitem><para>The properties of <code>FileUploadEntry</code> object can be retrieved using the <code>entry.propertyName</code> expression in the specific event attributes. For example, <code>onupload="alert(event.memo.entry.fileName);" </code> will display a message with the name of the file at the very moment when upload operation starts. A full list of properties can be found <link linkend="objectPropertiesWithAttributes">here</link>.</para></listitem>
-
-
- </itemizedlist>
-<para>The given bellow code sample demonstrates how the properties can be used. Please study it carefully. </para>
- <programlisting role="XML"><![CDATA[...
+
+
+ <para id="fileUploadEventAttributes">The <emphasis role="bold">
+ <property><rich:fileUpload></property>
+ </emphasis> component provides a number of specific event attributes: </para>
+ <itemizedlist>
+
+ <listitem>
+ <para> The <emphasis>
+ <property>
+ "onadd"</property>
+ </emphasis>a event handler called on an add file
+ operation </para>
+ </listitem>
+
+ <listitem>
+ <para> The <emphasis>
+ <property>
+ "onupload"</property>
+ </emphasis> which gives you a possibility to
+ cancel the upload at client side </para>
+ </listitem>
+ <listitem>
+ <para> The <emphasis>
+ <property>
+ "onuploadcomplete"</property>
+ </emphasis> which is called after all files from
+ the list are uploaded </para>
+ </listitem>
+ <listitem>
+ <para> The <emphasis>
+ <property>
+ "onuploadcanceled"</property>
+ </emphasis> which is called after upload has been
+ canceled via cancel control </para>
+ </listitem>
+ <listitem>
+ <para> The <emphasis>
+ <property>
+ "onerror"</property>
+ </emphasis> which is called if the file upload was
+ interrupted according to any errors </para>
+ </listitem>
+ </itemizedlist>
+
+
+
+
+ <!--Flash Module-->
+ <para> The <emphasis role="bold">
+ <property><rich:fileUpload></property>
+ </emphasis> component has an embedded Flash module that adds extra
+ functionality to the component. The module is enabled with <emphasis>
+ <property> "allowFlash"</property>
+ </emphasis> attribute set to "true". </para>
+ <para>These are the additional features that the Flash module provides:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Multiple files choosing;</para>
+ </listitem>
+ <listitem>
+ <para>Permitted file types are specified in the
+ "Open File" dialog
+ window;</para>
+ </listitem>
+ <listitem>
+ <para>A number of additional entry object properties are
+ also available, which can be found <link
+ linkend="objectProperties">here</link>.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Apart from uploading files to the sever without using AJAX, the Flash
+ module provides a number of useful API functions that can be used to
+ obtain information about the uploaded file. </para>
+
+ <para>There are 2 ways to obtain the data stored in the FileUploadEntry object. </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>By means of JavaScript on the client side. Use the
+ following syntax for that
+ <code>entries[i].propertyName</code>.
+ For example <code>entries[0].state</code> will
+ return the state of the file the is being
+ processed or has just been processed.</para>
+ </listitem>
+
+
+ <listitem>
+ <para>The properties of <code>FileUploadEntry</code> object
+ can be retrieved using the
+ <code>entry.propertyName</code>
+ expression in the specific event attributes. For
+ example,
+ <code>onupload="alert(event.memo.entry.fileName);"
+ </code> will display a message with the name of
+ the file at the very moment when upload operation
+ starts. A full list of properties can be found
+ <link
+ linkend="objectPropertiesWithAttributes"
+ >here</link>.</para>
+ </listitem>
+
+
+ </itemizedlist>
+ <para>The given bellow code sample demonstrates how the properties can be used.
+ Please study it carefully. </para>
+ <programlisting role="XML"><![CDATA[...
<head>
<script>
function _onaddHandler (e) {
@@ -291,53 +357,64 @@
</script>
</head>
...]]></programlisting>
-
-
-
- <para> Moreover, embedded Flash module provides a smoother representation of progress bar during the uploading process: the polling is performed is not by AJAX, but my means of the flash module.
- </para>
- <figure>
- <title>
- Uploading using Flash module <emphasis role="bold"><property><rich:fileUpload></property></emphasis>
- </title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/flash_fileUpload.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>However, the Flash module doens't perform any visual representation of the component.</para>
-
- <!--End of Flash Module-->
-
-
-
-
-
- <para>
- In order to customize the information regarding the ongoing process you could use <emphasis><property>"label"</property></emphasis> facet
- with the following macrosubstitution:
- <itemizedlist>
- <listitem>
- <para>
- <code> {B}</code>, <code>{KB}</code>, <code>{MB}</code> contains the size of file uploaded in bytes, kilobytes, megabytes respectively
+
+
+
+ <para> Moreover, embedded Flash module provides a smoother representation of
+ progress bar during the uploading process: the polling is performed is
+ not by AJAX, but my means of the flash module. </para>
+ <figure>
+ <title> Uploading using Flash module <emphasis role="bold">
+ <property><rich:fileUpload></property>
+ </emphasis>
+ </title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/flash_fileUpload.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>However, the Flash module doens't perform any visual
+ representation of the component.</para>
+
+ <!--End of Flash Module-->
+
+
+
+
+
+ <para> In order to customize the information regarding the ongoing process you
+ could use <emphasis>
+ <property>"label"</property>
+ </emphasis> facet with the following macrosubstitution: <itemizedlist>
+ <listitem>
+ <para>
+ <code> {B}</code>, <code>{KB}</code>,
+ <code>{MB}</code> contains the
+ size of file uploaded in bytes,
+ kilobytes, megabytes respectively
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>{_B}</code>, <code>{_KB}</code>,
+ <code>{_MB}</code> contains
+ the remain file size to upload in bytes,
+ kilobytes, megabytes respectively
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>{ss}</code>, <code>{mm}</code>,
+ <code>{hh}</code> contains
+ elapsed time in seconds, minutes and
+ hours respectively </para>
+ </listitem>
+ </itemizedlist>
</para>
- </listitem>
- <listitem>
- <para>
- <code>{_B}</code>, <code>{_KB}</code>, <code>{_MB}</code> contains the remain file size to upload in bytes, kilobytes, megabytes respectively
- </para>
- </listitem>
- <listitem>
- <para>
- <code>{ss}</code>, <code>{mm}</code>, <code>{hh}</code> contains elapsed time in seconds, minutes and hours respectively
- </para>
- </listitem>
- </itemizedlist>
- </para>
-
- <!--
+
+ <!--
There is a number of facets providing for this component:
<emphasis>
<property> "header"</property></emphasis>
@@ -347,115 +424,132 @@
<emphasis>
<property> "label"</property></emphasis>. could be used to provide displaying the progress of uploading.
-->
-
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<rich:fileUpload uploadData="#{bean.data}" fileUploadListener="#{bean.listener}">
<f:facet name="label">
<h:outputText value="{_KB}KB from {KB}KB uploaded --- {mm}:{ss}" />
</f:facet>
</rich:fileUpload>
...]]></programlisting>
- <para>This is the result:</para>
- <figure>
- <title>
- <emphasis role="bold"><property><rich:fileUpload></property></emphasis>
- with <emphasis><property> "label"</property></emphasis> facet
- </title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/fileUpload3.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You could define labels of the <property>component controls</property> with the help of
- <emphasis><property> "addControlLabel"</property></emphasis>,
- <emphasis><property> "clearAllControlLabel"</property></emphasis>,
- <emphasis><property> "clearControlLabel"</property></emphasis>,
- <emphasis><property> "stopEntryControlLabel"</property></emphasis>,
- <emphasis><property> "uploadControlLabel"</property></emphasis>
- attributes. See the following example.
- </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+ <para>This is the result:</para>
+ <figure>
+ <title>
+ <emphasis role="bold">
+ <property><rich:fileUpload></property>
+ </emphasis> with <emphasis>
+ <property> "label"</property>
+ </emphasis> facet </title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/fileUpload3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You could define labels of the <property>component controls</property>
+ with the help of <emphasis>
+ <property> "addControlLabel"</property>
+ </emphasis>, <emphasis>
+ <property>
+ "clearAllControlLabel"</property>
+ </emphasis>, <emphasis>
+ <property> "clearControlLabel"</property>
+ </emphasis>, <emphasis>
+ <property>
+ "stopEntryControlLabel"</property>
+ </emphasis>, <emphasis>
+ <property> "uploadControlLabel"</property>
+ </emphasis> attributes. See the following example. </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<rich:fileUpload addControlLabel="Add file..." clearAllControlLabel="Clear all" clearControlLabel="Clear"
stopEntryControlLabel="Stop process" uploadControlLabel="Upload file"/>
...]]></programlisting>
-<para>
- This is the result:
-</para>
- <figure>
- <title>
- <emphasis role="bold"><property><rich:fileUpload></property></emphasis> with labels
- </title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/fileUpload4.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>
- The <emphasis role="bold"><property><rich:fileUpload></property></emphasis> component allows to use sizes attributes:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <emphasis><property> "listHeight"</property></emphasis> attribute specify height for list of files in pixels
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis><property> "listWidth"</property></emphasis> attribute specify width for list of files in pixels
- </para>
- </listitem>
- </itemizedlist>
-
- <para>
- In order to disable the whole component you could use the <emphasis><property> "disabled"</property></emphasis> attribute.
- See the following example.
- </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+ <para> This is the result: </para>
+ <figure>
+ <title>
+ <emphasis role="bold">
+ <property><rich:fileUpload></property>
+ </emphasis> with labels </title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/fileUpload4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para> The <emphasis role="bold">
+ <property><rich:fileUpload></property>
+ </emphasis> component allows to use sizes attributes: </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis>
+ <property>
+ "listHeight"</property>
+ </emphasis> attribute specify height for list of
+ files in pixels </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>
+ <property>
+ "listWidth"</property>
+ </emphasis> attribute specify width for list of
+ files in pixels </para>
+ </listitem>
+ </itemizedlist>
+
+ <para> In order to disable the whole component you could use the <emphasis>
+ <property> "disabled"</property>
+ </emphasis> attribute. See the following example. </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<rich:fileUpload disabled="true"/>
...]]></programlisting>
- <para>This is the result:</para>
- <figure>
- <title>
- <emphasis role="bold"><property><rich:fileUpload></property></emphasis>with <emphasis><property> "disabled"</property></emphasis> attribute
- </title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/fileUpload5.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>It's possible to handle events for fileUpload using JavaScript code. A simplest example of usage JavaScript API is placed below:</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
+ <para>This is the result:</para>
+ <figure>
+ <title>
+ <emphasis role="bold">
+ <property><rich:fileUpload></property>
+ </emphasis>with <emphasis>
+ <property> "disabled"</property>
+ </emphasis> attribute </title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/fileUpload5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>It's possible to handle events for fileUpload using JavaScript
+ code. A simplest example of usage JavaScript API is placed below:</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<rich:fileUpload id="upload" disabled="false"/>
<h:commandButton onclick="${rich:component('upload')}.disable();" value="Disable" />
-...]]></programlisting>
-
- <para>
- <emphasis role="bold"><property><rich:fileUpload></property></emphasis>
- component also provides a number of JavaScript property,
- that can be used to process uploaded files, file states etc.
- The given below example illustrates how the <code>entries[0].state</code> property can be used to get access to the file state.
- Full list of JavaScript properties can be found <link linkend="objectProperties">below</link>.
-
- </para>
-
-
- <programlisting role="XML"><![CDATA[...
+...]]></programlisting>
+
+ <para>
+ <emphasis role="bold">
+ <property><rich:fileUpload></property>
+ </emphasis> component also provides a number of JavaScript property,
+ that can be used to process uploaded files, file states etc. The given
+ below example illustrates how the <code>entries[0].state</code>
+ property can be used to get access to the file state. Full list of
+ JavaScript properties can be found <link linkend="objectProperties"
+ >below</link>. </para>
+
+
+ <programlisting role="XML"><![CDATA[...
<rich:fileUpload fileUploadListener="#{fileUploadBean.listener}"
maxFilesQuantity="#{fileUploadBean.uploadsAvailable}"
reRender="table" id="upload"
@@ -464,730 +558,1019 @@
<a4j:support event="onuploadcomplete" reRender="info" />
</rich:fileUpload>
<h:commandButton onclick="if($('j_id232:upload').component.entries[0].state == FileUploadEntry.UPLOAD_SUCCESS) alert ('DONE');" value="Check file state"/>
-...]]></programlisting>
-
-
- <para>The <emphasis role="bold"><property><rich:fileUpload></property></emphasis> component allows to use internationalization method
- to redefine and localize the labels. You could use application resource bundle and define
- <code>RICH_FILE_UPLOAD_CANCEL_LABEL</code>,
- <code>RICH_FILE_UPLOAD_STOP_LABEL</code>,
- <code>RICH_FILE_UPLOAD_ADD_LABEL</code>,
- <code>RICH_FILE_UPLOAD_UPLOAD_LABEL</code>,
- <code>RICH_FILE_UPLOAD_CLEAR_LABEL</code>,
- <code>RICH_FILE_UPLOAD_CLEAR_ALL_LABEL</code>,
- <code>RICH_FILE_UPLOAD_PROGRESS_LABEL</code>,
- <code>RICH_FILE_UPLOAD_SIZE_ERROR_LABLE</code>,
- <code>RICH_FILE_UPLOAD_TRANSFER_ERROR_LABLE</code>,
- <code>RICH_FILE_UPLOAD_ENTRY_STOP_LABEL</code>,
- <code>RICH_FILE_UPLOAD_ENTRY_CLEAR_LABEL</code>,
- <code>RICH_FILE_UPLOAD_ENTRY_CANCEL_LABEL</code> there.
- </para>
-
-
- <para>
-
-
-
-
- </para>
-
- <para>
- The <emphasis role="bold"><property><rich:fileUpload></property></emphasis> component could work together with Seam framework.
- <ulink url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/...">Here</ulink> you can see how to configure Seam Filter in order to handle
- <emphasis role="bold"><property><rich:fileUpload></property></emphasis> requests.
- </para>
-
-
-
+...]]></programlisting>
-</section>
- <!-- JavaScript API-->
- <section >
- <title>JavaScript API</title>
- <table>
- <title>JavaScript API</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Function</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>enable()</entry>
- <entry>Enables the component</entry>
- </row>
- <row>
- <entry>disable()</entry>
- <entry>Disables the component</entry>
- </row>
- <row>
- <entry>stop()</entry>
- <entry>Stops the uploading process</entry>
- </row>
- <row>
- <entry>clear()</entry>
- <entry>Removes all files from the list. The function can also get the $('id').component.entries[i] as a parameter to remove a particular file. </entry>
- </row>
-
-
-
-
-
- </tbody>
- </tgroup>
- </table>
-
-
- <table id="objectProperties">
- <title>Client side object properties</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Property</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
-
- <row>
- <entry>entries</entry>
- <entry>Returns a array of all files in the list
-
- </entry>
- </row>
-
-
-
- <row>
- <entry>entries.length</entry>
- <entry>Returns the number of files in the list </entry>
- </row>
-
-
- <row>
- <entry>entries[i].fileName</entry>
- <entry>Returns the file name, that is retrieved by the array index </entry>
- </row>
-
-
-
- <row>
- <entry>entries[i].state </entry>
- <entry>Returns the file state. Possible states are
- <itemizedlist>
-
- <listitem><para>"initialized" - the file is added, corresponds to FileUploadEntry.INITIALIZED constant </para> </listitem>
- <listitem><para>"progress" - the file is being uploaded, corresponds to FileUploadEntry.UPLOAD_IN_PROGRESS constant</para> </listitem>
- <listitem><para>"ready" - uploading is in process, corresponds to FileUploadEntry.READY constant The file will be uploaded on queue order.</para> </listitem>
- <listitem><para>"canceled" - uploading of the file is canceled, corresponds to FileUploadEntry.UPLOAD_CANCELED constant </para> </listitem>
- <listitem><para>"done" - the file is uploaded successfully, corresponds to FileUploadEntry.UPLOAD_SUCCESS constant</para> </listitem>
- <listitem><para>"transfer_error" - a file transfer error occurred, corresponds to FileUploadEntry.UPLOAD_TRANSFER_ERROR constant </para> </listitem>
- <listitem><para>"size_error" - the file exceeded maximum size, corresponds to FileUploadEntry.UPLOAD_SIZE_ERROR constant</para> </listitem>
-
-
- </itemizedlist>
-
-
- </entry>
- </row>
-
-
-
- <row>
- <entry>entries[i].size</entry><entry> Returns the size of the file. Available in flash enabled version only</entry>
- </row>
- <row>
- <entry>entries[i].Type</entry><entry>Returns the mime type of the file. Available in flash enabled version only</entry>
- </row>
- <row>
- <entry>entries[i].creator </entry><entry>Returns the name of the author of the file. Available in flash enabled version only</entry>
- </row>
- <row>
- <entry>entries[i].creationDate</entry><entry>Returns the date when the file was created. Available in flash enabled version only</entry>
- </row>
- <row>
- <entry>entries[i].modificationDate</entry> <entry>Returns the date of the last file modification. Available in flash enabled version only</entry>
- </row>
-
-
-
-
- </tbody>
- </tgroup>
- </table>
-
-
-
-
- <table id="objectPropertiesWithAttributes">
- <title>Client side object properties available with specific <link linkend="fileUploadEventAttributes"> event attributes</link></title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Property</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
+ <para>The <emphasis role="bold">
+ <property><rich:fileUpload></property>
+ </emphasis> component allows to use internationalization method to
+ redefine and localize the labels. You could use application resource
+ bundle and define <code>RICH_FILE_UPLOAD_CANCEL_LABEL</code>,
+ <code>RICH_FILE_UPLOAD_STOP_LABEL</code>,
+ <code>RICH_FILE_UPLOAD_ADD_LABEL</code>,
+ <code>RICH_FILE_UPLOAD_UPLOAD_LABEL</code>,
+ <code>RICH_FILE_UPLOAD_CLEAR_LABEL</code>,
+ <code>RICH_FILE_UPLOAD_CLEAR_ALL_LABEL</code>,
+ <code>RICH_FILE_UPLOAD_PROGRESS_LABEL</code>,
+ <code>RICH_FILE_UPLOAD_SIZE_ERROR_LABLE</code>,
+ <code>RICH_FILE_UPLOAD_TRANSFER_ERROR_LABLE</code>,
+ <code>RICH_FILE_UPLOAD_ENTRY_STOP_LABEL</code>,
+ <code>RICH_FILE_UPLOAD_ENTRY_CLEAR_LABEL</code>,
+ <code>RICH_FILE_UPLOAD_ENTRY_CANCEL_LABEL</code> there. </para>
-
-
-
- <row>
- <entry>entry.state </entry>
- <entry>Returns the file state. Possible states are
- <itemizedlist>
-
- <listitem><para>"initialized" - the file is added, corresponds to FileUploadEntry.INITIALIZED constant </para> </listitem>
- <listitem><para>"progress" - the file is being uploaded, corresponds to FileUploadEntry.UPLOAD_IN_PROGRESS constant</para> </listitem>
- <listitem><para>"ready" - uploading is in process, corresponds to FileUploadEntry.READY constant The file will be uploaded on queue order.</para> </listitem>
- <listitem><para>"canceled" - uploading of the file is canceled, corresponds to FileUploadEntry.UPLOAD_CANCELED constant </para> </listitem>
- <listitem><para>"done" - the file is uploaded successfully, corresponds to FileUploadEntry.UPLOAD_SUCCESS constant</para> </listitem>
- <listitem><para>"transfer_error" - a file transfer error occurred, corresponds to FileUploadEntry.UPLOAD_TRANSFER_ERROR constant </para> </listitem>
- <listitem><para>"size_error" - the file exceeded maximum size, corresponds to FileUploadEntry.UPLOAD_SIZE_ERROR constant</para> </listitem>
-
-
- </itemizedlist>
-
-
- </entry>
- </row>
-
- <row>
- <entry>entry.fileName </entry>
- <entry>Returns the file's name. This property works with all event handlers except for "onadd".
- </entry>
- </row>
-
-
-
- <row>
- <entry>entry.size</entry><entry> Returns the size of the file. Available in flash enabled version only</entry>
- </row>
- <row>
- <entry>entry.Type</entry><entry>Returns the mime type of the file. Available in flash enabled version only</entry>
- </row>
- <row>
- <entry>entry.creator </entry><entry>Returns the name of the author of the file. Available in flash enabled version only</entry>
- </row>
- <row>
- <entry>entry.creationDate</entry><entry>Returns the date when the file was created. Available in flash enabled version only</entry>
- </row>
- <row>
- <entry>entry.modificationDate</entry> <entry>Returns the date of the last file modification. Available in flash enabled version only</entry>
- </row>
-
-
-
-
- </tbody>
- </tgroup>
- </table>
-
-
-
- </section>
- <!-- End of JavaScript API-->
- <section>
- <title>Look-and-Feel Customization</title>
- <para>For skinnability implementation, the components use a <emphasis>
- <property>style class redefinition method.</property>
- </emphasis> Default style classes are mapped on <emphasis>
- <property>skin parameters.</property>
- </emphasis></para>
- <para>There are two ways to redefine the appearance of all <emphasis role="bold">
- <property><rich:fileUpload></property>
- </emphasis> components at once: <itemizedlist>
- <listitem><para>Redefine the corresponding skin parameters</para></listitem>
- <listitem><para> Add to your style sheets style classes used by a <emphasis role="bold">
- <property><rich:fileUpload></property>
- </emphasis> component</para></listitem>
- </itemizedlist>
- </para>
- </section>
- <section>
- <title>Skin Parameters Redefinition</title>
+ <para> </para>
- <table>
- <title>Skin parameters redefinition for a component</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
- <entry>CSS properties</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>tableBackgroundColor</entry>
- <entry>background-color</entry>
- </row>
- <row>
- <entry>tableBorderColor</entry>
- <entry>border-color</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
- <table>
- <title>Skin parameters redefinition for a font</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
- <entry>CSS properties</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>generalFamilyFont</entry>
- <entry>font-family</entry>
- </row>
- <row>
- <entry>generalSizeFont</entry>
- <entry>font-size</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
- <table>
- <title>Skin parameters redefinition for a toolbar</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
- <entry>CSS properties</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>additionalBackgroundColor</entry>
- <entry>background-color</entry>
- </row>
- <row>
- <entry>tableBorderColor</entry>
- <entry>border-bottom-color</entry>
- </row>
- <row>
- <entry>tableBackgroundColor</entry>
- <entry>border-top-color</entry>
- </row>
- <row>
- <entry>tableBackgroundColor</entry>
- <entry>border-left-color</entry>
- </row>
-
- </tbody>
- </tgroup>
- </table>
-
- <table>
- <title>Skin parameters redefinition for items in the list</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
- <entry>CSS properties</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>tableBorderColor</entry>
- <entry>border-bottom-color</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
- <table>
- <title>Skin parameters redefinition for a "Cancel", "Clear" links</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
- <entry>CSS properties</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>generalLinkColor</entry>
- <entry>color</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
+ <para> The <emphasis role="bold">
+ <property><rich:fileUpload></property>
+ </emphasis> component could work together with Seam framework. <ulink
+ url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/..."
+ >Here</ulink> you can see how to configure filters for both
+ of them in web.xml file in
+ order to handle <emphasis role="bold">
+ <property><rich:fileUpload></property>
+ </emphasis> requests. </para>
- <table>
- <title>Skin parameters redefinition for a button</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
- <entry>CSS properties</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>trimColor</entry>
- <entry>background-color</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <table>
- <title>Skin parameters redefinition for a button border</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
- <entry>CSS properties</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>tableBorderColor</entry>
- <entry>border-color</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <table>
- <title>Skin parameters redefinition for a highlighted button</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
- <entry>CSS properties</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>trimColor</entry>
- <entry>background-color</entry>
- </row>
- <row>
- <entry>selectControlColor</entry>
- <entry>border-color</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
- <table>
- <title>Skin parameters redefinition for a pressed button</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
- <entry>CSS properties</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>selectControlColor</entry>
- <entry>border-color</entry>
- </row>
- <row>
- <entry>additionalBackgroundColor</entry>
- <entry>background-color</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <table>
- <title>Skin parameters redefinition for "Upload", "Clean" buttons</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
- <entry>CSS properties</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>generalTextColor</entry>
- <entry>color</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <table>
- <title>Skin parameters redefinition for a disabled "Start" button icon</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
- <entry>CSS properties</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>tableBorderColor</entry>
- <entry>color</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <table>
- <title>Skin parameters redefinition for a disabled "Clear" button icon</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters</entry>
- <entry>CSS properties</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>tableBorderColor</entry>
- <entry>color</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </section>
- <section>
- <title>Definition of Custom Style Classes</title>
- <para>The following picture illustrates how CSS classes define styles for component elements.</para>
- <figure>
- <title>Classes names</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/fileUpload_cn.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <figure>
- <title>Classes names</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/fileUpload_cn2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
+ </section>
+ <!-- JavaScript API-->
+ <section>
+ <title>JavaScript API</title>
+ <table>
+ <title>JavaScript API</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Function</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>enable()</entry>
+ <entry>Enables the component</entry>
+ </row>
+ <row>
+ <entry>disable()</entry>
+ <entry>Disables the component</entry>
+ </row>
+ <row>
+ <entry>stop()</entry>
+ <entry>Stops the uploading
+ process</entry>
+ </row>
+ <row>
+ <entry>clear()</entry>
+ <entry>Removes all files from the list.
+ The function can also get the
+ $('id').component.entries[i]
+ as a parameter to remove a
+ particular file. </entry>
+ </row>
- <table id="fileUploadCN">
- <title>Classes names that define a component representation</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Class name</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>rich-fileupload-list-decor</entry>
- <entry>Defines styles for a wrapper <div> element of a fileUpload</entry>
- </row>
- <row>
- <entry>rich-fileupload-font</entry>
- <entry>Defines styles for a font of buttons and items</entry>
- </row>
- <row>
- <entry>rich-fileupload-toolbar-decor</entry>
- <entry>Defines styles for a toolbar</entry>
- </row>
- <row>
- <entry> rich-fileupload-list-overflow</entry>
- <entry>Defines styles for a list of files</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
- <table >
- <title>Classes names that define buttons representation</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Class name</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>rich-fileupload-button</entry>
- <entry>Defines styles for a buttons</entry>
- </row>
- <row>
- <entry>rich-fileupload-button-border</entry>
- <entry>Defines styles for a border of buttons</entry>
- </row>
- <row>
- <entry>rich-fileupload-button-light</entry>
- <entry>Defines styles for a highlight of button</entry>
- </row>
- <row>
- <entry>rich-fileupload-button-press</entry>
- <entry>Defines styles for a pressed button</entry>
- </row>
- <row>
- <entry>rich-fileupload-button-dis</entry>
- <entry>Defines styles for a disabled button</entry>
- </row>
- <row>
- <entry>rich-fileupload-button-selection</entry>
- <entry>Defines styles for "Upload", "Clean" buttons</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
- <table >
- <title>Classes names that define the representation of the buttons' icons</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Class name</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>rich-fileupload-ico</entry>
- <entry>Defines styles for an icon</entry>
- </row>
- <row>
- <entry>rich-fileupload-ico-add</entry>
- <entry>Defines styles for a "Add" button icon</entry>
- </row>
- <row>
- <entry>rich-fileupload-ico-start</entry>
- <entry>Defines styles for a "Upload" button icon</entry>
- </row>
- <row>
- <entry>rich-fileupload-ico-stop</entry>
- <entry>Defines styles for a "Stop" button icon</entry>
- </row>
- <row>
- <entry>rich-fileupload-ico-clear</entry>
- <entry>Defines styles for a "Clear" button icon</entry>
- </row>
- <row>
- <entry>rich-fileupload-ico-add-dis</entry>
- <entry>Defines styles for a disabled "Add" button icon</entry>
- </row>
- <row>
- <entry>rich-fileupload-ico-start-dis</entry>
- <entry>Defines styles for a disabled "Upload" button icon</entry>
- </row>
- <row>
- <entry>rich-fileupload-ico-clear-dis</entry>
- <entry>Defines styles for a disabled "Clear" button icon</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
- <table >
- <title>Classes names that define list items representation</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Class name</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>rich-fileupload-table-td</entry>
- <entry>Defines styles for a wrapper <td> element of a list items</entry>
- </row>
- <row>
- <entry>rich-fileupload-anc</entry>
- <entry>Defines styles for "Cancel", "Stop", "Clear" links</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
-
- <para>In order to redefine styles for all <emphasis role="bold"><property><rich:fileUpload></property></emphasis> components on a page
- using CSS, it's enough to create classes with the same names
- (possible classes could be found in the tables <link linkend="fileUploadCN"> above</link>) and define necessary properties in them.
- </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="CSS"><![CDATA[...
+
+
+
+ </tbody>
+ </tgroup>
+ </table>
+
+
+
+ <table id="objectProperties">
+ <title>Client side object properties</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Property</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+
+ <row>
+ <entry>entries</entry>
+ <entry>Returns a array of all files in
+ the list </entry>
+ </row>
+
+
+
+ <row>
+ <entry>entries.length</entry>
+ <entry>Returns the number of files in
+ the list </entry>
+ </row>
+
+
+ <row>
+ <entry>entries[i].fileName</entry>
+ <entry>Returns the file name, that is
+ retrieved by the array index
+ </entry>
+ </row>
+
+
+
+ <row>
+ <entry>entries[i].state </entry>
+ <entry>Returns the file state. Possible
+ states are <itemizedlist>
+
+ <listitem>
+ <para>"initialized"
+ -
+ the
+ file
+ is
+ added,
+ corresponds
+ to
+ FileUploadEntry.INITIALIZED
+ constant
+ </para>
+ </listitem>
+ <listitem>
+ <para>"progress"
+ -
+ the
+ file
+ is
+ being
+ uploaded,
+ corresponds
+ to
+ FileUploadEntry.UPLOAD_IN_PROGRESS
+ constant</para>
+ </listitem>
+ <listitem>
+ <para>"ready"
+ -
+ uploading
+ is
+ in
+ process,
+ corresponds
+ to
+ FileUploadEntry.READY
+ constant
+ The
+ file
+ will
+ be
+ uploaded
+ on
+ queue
+ order.</para>
+ </listitem>
+ <listitem>
+ <para>"canceled"
+ -
+ uploading
+ of
+ the
+ file
+ is
+ canceled,
+ corresponds
+ to
+ FileUploadEntry.UPLOAD_CANCELED
+ constant
+ </para>
+ </listitem>
+ <listitem>
+ <para>"done"
+ -
+ the
+ file
+ is
+ uploaded
+ successfully,
+ corresponds
+ to
+ FileUploadEntry.UPLOAD_SUCCESS
+ constant</para>
+ </listitem>
+ <listitem>
+ <para>"transfer_error"
+ -
+ a
+ file
+ transfer
+ error
+ occurred,
+ corresponds
+ to
+ FileUploadEntry.UPLOAD_TRANSFER_ERROR
+ constant
+ </para>
+ </listitem>
+ <listitem>
+ <para>"size_error"
+ -
+ the
+ file
+ exceeded
+ maximum
+ size,
+ corresponds
+ to
+ FileUploadEntry.UPLOAD_SIZE_ERROR
+ constant</para>
+ </listitem>
+
+
+ </itemizedlist>
+ </entry>
+ </row>
+
+
+
+ <row>
+ <entry>entries[i].size</entry>
+ <entry> Returns the size of the file.
+ Available in flash enabled
+ version only</entry>
+ </row>
+ <row>
+ <entry>entries[i].Type</entry>
+ <entry>Returns the mime type of the
+ file. Available in flash
+ enabled version only</entry>
+ </row>
+ <row>
+ <entry>entries[i].creator </entry>
+ <entry>Returns the name of the author of
+ the file. Available in flash
+ enabled version only</entry>
+ </row>
+ <row>
+ <entry>entries[i].creationDate</entry>
+ <entry>Returns the date when the file
+ was created. Available in
+ flash enabled version
+ only</entry>
+ </row>
+ <row>
+ <entry>entries[i].modificationDate</entry>
+ <entry>Returns the date of the last file
+ modification. Available in
+ flash enabled version
+ only</entry>
+ </row>
+
+
+
+
+ </tbody>
+ </tgroup>
+ </table>
+
+
+
+
+ <table id="objectPropertiesWithAttributes">
+ <title>Client side object properties available with specific <link
+ linkend="fileUploadEventAttributes"> event
+ attributes</link></title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Property</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+
+
+
+
+ <row>
+ <entry>entry.state </entry>
+ <entry>Returns the file state. Possible
+ states are <itemizedlist>
+
+ <listitem>
+ <para>"initialized"
+ -
+ the
+ file
+ is
+ added,
+ corresponds
+ to
+ FileUploadEntry.INITIALIZED
+ constant
+ </para>
+ </listitem>
+ <listitem>
+ <para>"progress"
+ -
+ the
+ file
+ is
+ being
+ uploaded,
+ corresponds
+ to
+ FileUploadEntry.UPLOAD_IN_PROGRESS
+ constant</para>
+ </listitem>
+ <listitem>
+ <para>"ready"
+ -
+ uploading
+ is
+ in
+ process,
+ corresponds
+ to
+ FileUploadEntry.READY
+ constant
+ The
+ file
+ will
+ be
+ uploaded
+ on
+ queue
+ order.</para>
+ </listitem>
+ <listitem>
+ <para>"canceled"
+ -
+ uploading
+ of
+ the
+ file
+ is
+ canceled,
+ corresponds
+ to
+ FileUploadEntry.UPLOAD_CANCELED
+ constant
+ </para>
+ </listitem>
+ <listitem>
+ <para>"done"
+ -
+ the
+ file
+ is
+ uploaded
+ successfully,
+ corresponds
+ to
+ FileUploadEntry.UPLOAD_SUCCESS
+ constant</para>
+ </listitem>
+ <listitem>
+ <para>"transfer_error"
+ -
+ a
+ file
+ transfer
+ error
+ occurred,
+ corresponds
+ to
+ FileUploadEntry.UPLOAD_TRANSFER_ERROR
+ constant
+ </para>
+ </listitem>
+ <listitem>
+ <para>"size_error"
+ -
+ the
+ file
+ exceeded
+ maximum
+ size,
+ corresponds
+ to
+ FileUploadEntry.UPLOAD_SIZE_ERROR
+ constant</para>
+ </listitem>
+
+
+ </itemizedlist>
+ </entry>
+ </row>
+
+ <row>
+ <entry>entry.fileName </entry>
+ <entry>Returns the file's name.
+ This property works with all
+ event handlers except for
+ "onadd".
+ </entry>
+ </row>
+
+
+
+ <row>
+ <entry>entry.size</entry>
+ <entry> Returns the size of the file.
+ Available in flash enabled
+ version only</entry>
+ </row>
+ <row>
+ <entry>entry.Type</entry>
+ <entry>Returns the mime type of the
+ file. Available in flash
+ enabled version only</entry>
+ </row>
+ <row>
+ <entry>entry.creator </entry>
+ <entry>Returns the name of the author of
+ the file. Available in flash
+ enabled version only</entry>
+ </row>
+ <row>
+ <entry>entry.creationDate</entry>
+ <entry>Returns the date when the file
+ was created. Available in
+ flash enabled version
+ only</entry>
+ </row>
+ <row>
+ <entry>entry.modificationDate</entry>
+ <entry>Returns the date of the last file
+ modification. Available in
+ flash enabled version
+ only</entry>
+ </row>
+
+
+
+
+ </tbody>
+ </tgroup>
+ </table>
+
+
+
+ </section>
+ <!-- End of JavaScript API-->
+ <section>
+ <title>Look-and-Feel Customization</title>
+ <para>For skinnability implementation, the components use a <emphasis>
+ <property>style class redefinition method.</property>
+ </emphasis> Default style classes are mapped on <emphasis>
+ <property>skin parameters.</property>
+ </emphasis></para>
+ <para>There are two ways to redefine the appearance of all <emphasis role="bold">
+ <property><rich:fileUpload></property>
+ </emphasis> components at once: <itemizedlist>
+ <listitem>
+ <para>Redefine the corresponding skin
+ parameters</para>
+ </listitem>
+ <listitem>
+ <para> Add to your style sheets style classes used
+ by a <emphasis role="bold">
+ <property><rich:fileUpload></property>
+ </emphasis> component</para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </section>
+
+ <section>
+ <title>Skin Parameters Redefinition</title>
+
+ <table>
+ <title>Skin parameters redefinition for a component</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>tableBackgroundColor</entry>
+ <entry>background-color</entry>
+ </row>
+ <row>
+ <entry>tableBorderColor</entry>
+ <entry>border-color</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Skin parameters redefinition for a font</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>generalFamilyFont</entry>
+ <entry>font-family</entry>
+ </row>
+ <row>
+ <entry>generalSizeFont</entry>
+ <entry>font-size</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Skin parameters redefinition for a toolbar</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>additionalBackgroundColor</entry>
+ <entry>background-color</entry>
+ </row>
+ <row>
+ <entry>tableBorderColor</entry>
+ <entry>border-bottom-color</entry>
+ </row>
+ <row>
+ <entry>tableBackgroundColor</entry>
+ <entry>border-top-color</entry>
+ </row>
+ <row>
+ <entry>tableBackgroundColor</entry>
+ <entry>border-left-color</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Skin parameters redefinition for items in the list</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>tableBorderColor</entry>
+ <entry>border-bottom-color</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Skin parameters redefinition for a "Cancel",
+ "Clear" links</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>generalLinkColor</entry>
+ <entry>color</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Skin parameters redefinition for a button</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>trimColor</entry>
+ <entry>background-color</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table>
+ <title>Skin parameters redefinition for a button border</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>tableBorderColor</entry>
+ <entry>border-color</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table>
+ <title>Skin parameters redefinition for a highlighted button</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>trimColor</entry>
+ <entry>background-color</entry>
+ </row>
+ <row>
+ <entry>selectControlColor</entry>
+ <entry>border-color</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Skin parameters redefinition for a pressed button</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>selectControlColor</entry>
+ <entry>border-color</entry>
+ </row>
+ <row>
+ <entry>additionalBackgroundColor</entry>
+ <entry>background-color</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Skin parameters redefinition for "Upload",
+ "Clean" buttons</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>generalTextColor</entry>
+ <entry>color</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table>
+ <title>Skin parameters redefinition for a disabled
+ "Start" button icon</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>tableBorderColor</entry>
+ <entry>color</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table>
+ <title>Skin parameters redefinition for a disabled
+ "Clear" button icon</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>tableBorderColor</entry>
+ <entry>color</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+
+ <section>
+ <title>Definition of Custom Style Classes</title>
+
+ <para>The following picture illustrates how CSS classes define styles for
+ component elements.</para>
+ <figure>
+ <title>Classes names</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/fileUpload_cn.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <figure>
+ <title>Classes names</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/fileUpload_cn2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <table id="fileUploadCN">
+ <title>Classes names that define a component representation</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Class name</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>rich-fileupload-list-decor</entry>
+ <entry>Defines styles for a wrapper
+ <div> element of
+ a fileUpload</entry>
+ </row>
+ <row>
+ <entry>rich-fileupload-font</entry>
+ <entry>Defines styles for a font of
+ buttons and items</entry>
+ </row>
+ <row>
+ <entry>rich-fileupload-toolbar-decor</entry>
+ <entry>Defines styles for a
+ toolbar</entry>
+ </row>
+ <row>
+ <entry> rich-fileupload-list-overflow</entry>
+ <entry>Defines styles for a list of
+ files</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+
+ <table>
+ <title>Classes names that define buttons representation</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Class name</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>rich-fileupload-button</entry>
+ <entry>Defines styles for a
+ buttons</entry>
+ </row>
+ <row>
+ <entry>rich-fileupload-button-border</entry>
+ <entry>Defines styles for a border of
+ buttons</entry>
+ </row>
+ <row>
+ <entry>rich-fileupload-button-light</entry>
+ <entry>Defines styles for a highlight of
+ button</entry>
+ </row>
+ <row>
+ <entry>rich-fileupload-button-press</entry>
+ <entry>Defines styles for a pressed
+ button</entry>
+ </row>
+ <row>
+ <entry>rich-fileupload-button-dis</entry>
+ <entry>Defines styles for a disabled
+ button</entry>
+ </row>
+ <row>
+ <entry>rich-fileupload-button-selection</entry>
+ <entry>Defines styles for
+ "Upload",
+ "Clean"
+ buttons</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Classes names that define the representation of the buttons'
+ icons</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Class name</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>rich-fileupload-ico</entry>
+ <entry>Defines styles for an
+ icon</entry>
+ </row>
+ <row>
+ <entry>rich-fileupload-ico-add</entry>
+ <entry>Defines styles for a
+ "Add" button
+ icon</entry>
+ </row>
+ <row>
+ <entry>rich-fileupload-ico-start</entry>
+ <entry>Defines styles for a
+ "Upload"
+ button icon</entry>
+ </row>
+ <row>
+ <entry>rich-fileupload-ico-stop</entry>
+ <entry>Defines styles for a
+ "Stop"
+ button icon</entry>
+ </row>
+ <row>
+ <entry>rich-fileupload-ico-clear</entry>
+ <entry>Defines styles for a
+ "Clear"
+ button icon</entry>
+ </row>
+ <row>
+ <entry>rich-fileupload-ico-add-dis</entry>
+ <entry>Defines styles for a disabled
+ "Add" button
+ icon</entry>
+ </row>
+ <row>
+ <entry>rich-fileupload-ico-start-dis</entry>
+ <entry>Defines styles for a disabled
+ "Upload"
+ button icon</entry>
+ </row>
+ <row>
+ <entry>rich-fileupload-ico-clear-dis</entry>
+ <entry>Defines styles for a disabled
+ "Clear"
+ button icon</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Classes names that define list items representation</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Class name</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>rich-fileupload-table-td</entry>
+ <entry>Defines styles for a wrapper
+ <td> element of
+ a list items</entry>
+ </row>
+ <row>
+ <entry>rich-fileupload-anc</entry>
+ <entry>Defines styles for
+ "Cancel",
+ "Stop",
+ "Clear"
+ links</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+
+ <para>In order to redefine styles for all <emphasis role="bold">
+ <property><rich:fileUpload></property>
+ </emphasis> components on a page using CSS, it's enough to
+ create classes with the same names (possible classes could be found in
+ the tables <link linkend="fileUploadCN"> above</link>) and define
+ necessary properties in them. </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="CSS"><![CDATA[...
.rich-fileupload-anc{
font-weight:bold;
text-decoration:none;
}
-...]]></programlisting>
-
- <para>This is the result:</para>
-
- <figure>
- <title>Redefinition styles with predefined classes</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/fileUpload_pc.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>In the example above the font weight and text decoration for "Cancel" and "Clear" links are changed.</para>
-
- <para>
- Also it's possible to change styles of particular <emphasis role="bold"><property><rich:fileUpload></property></emphasis> component.
- In this case you should create own style classes and use them in the corresponding <emphasis role="bold"><property><rich:fileUpload></property></emphasis>
- <emphasis><property>styleClass</property></emphasis> attributes. An example is placed below:
- </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="CSS"><![CDATA[...
+...]]></programlisting>
+
+ <para>This is the result:</para>
+
+ <figure>
+ <title>Redefinition styles with predefined classes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/fileUpload_pc.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In the example above the font weight and text decoration for
+ "Cancel" and "Clear" links are
+ changed.</para>
+
+ <para> Also it's possible to change styles of particular <emphasis
+ role="bold">
+ <property><rich:fileUpload></property>
+ </emphasis> component. In this case you should create own style
+ classes and use them in the corresponding <emphasis role="bold">
+ <property><rich:fileUpload></property>
+ </emphasis>
+ <emphasis>
+ <property>styleClass</property>
+ </emphasis> attributes. An example is placed below: </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="CSS"><![CDATA[...
.myClass{
font-weight:bold;
}
-...]]></programlisting>
- <para>
- The <emphasis><property>"addButtonClass"</property></emphasis> attribute for
- <emphasis role="bold"><property><rich:fileUpload></property></emphasis> is defined as it's shown in the example below:
- </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[<rich:fileUpload ... addButtonClass="myClass"/>
-]]></programlisting>
-
- <para>This is the result:</para>
- <figure>
- <title>Redefinition styles with own classes and <emphasis><property>styleClass</property></emphasis> attributes</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/fileUpload_oc.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>As it could be seen on the picture above, the font style for "Add" button is changed.</para>
-
- </section>
-
- <section>
- <title>Relevant Resources Links</title>
- <para><ulink
- url="http://livedemo.exadel.com/richfaces-demo/richfaces/fileUpload.jsf?c=file..."
- >Here</ulink> you can see an example of <emphasis role="bold">
- <property><rich:fileUpload></property>
- </emphasis> usage and sources for the given example. </para>
- </section>
+...]]></programlisting>
+ <para> The <emphasis>
+ <property>"addButtonClass"</property>
+ </emphasis> attribute for <emphasis role="bold">
+ <property><rich:fileUpload></property>
+ </emphasis> is defined as it's shown in the example below: </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[<rich:fileUpload ... addButtonClass="myClass"/>
+]]></programlisting>
+ <para>This is the result:</para>
+ <figure>
+ <title>Redefinition styles with own classes and <emphasis>
+ <property>styleClass</property>
+ </emphasis> attributes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/fileUpload_oc.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>As it could be seen on the picture above, the font style for
+ "Add" button is changed.</para>
+
+ </section>
+
+ <section>
+ <title>Relevant Resources Links</title>
+ <para><ulink
+ url="http://livedemo.exadel.com/richfaces-demo/richfaces/fileUpload.jsf?c=file..."
+ >Here</ulink> you can see an example of <emphasis
+ role="bold">
+ <property><rich:fileUpload></property>
+ </emphasis> usage and sources for the given example. </para>
+ </section>
+
</section>
-
<!--para>In order to encode form around <emphasis role="bold">
<property><rich:fileUpload></property>
</emphasis> component you could confine this area by <emphasis role="bold">
@@ -1220,4 +1603,4 @@
<imagedata fileref="images/fileUpload11.png"/>
</imageobject>
</mediaobject>
- </figure-->
+ </figure-->
16 years, 5 months
JBoss Rich Faces SVN: r10060 - trunk/test-applications/jsp/src/main/webapp/pages/Rich.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-08-13 06:12:25 -0400 (Wed, 13 Aug 2008)
New Revision: 10060
Modified:
trunk/test-applications/jsp/src/main/webapp/pages/Rich/Rich.jsp
Log:
-h:messages
Modified: trunk/test-applications/jsp/src/main/webapp/pages/Rich/Rich.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/pages/Rich/Rich.jsp 2008-08-13 10:08:36 UTC (rev 10059)
+++ trunk/test-applications/jsp/src/main/webapp/pages/Rich/Rich.jsp 2008-08-13 10:12:25 UTC (rev 10060)
@@ -51,7 +51,7 @@
<h:graphicImage url="/pics/passed.gif" />
</f:facet>
</rich:messages>
- <h:messages id="hMessagesID" showDetail="true" showSummary="true"></h:messages>
+ <%--h:messages id="hMessagesID" showDetail="true" showSummary="true"></h:messages--%>
<h:panelGrid id="richGridID" columns="1" width="100%" rendered="true">
<h:panelGroup rendered="#{option.reComponent}">
16 years, 5 months
JBoss Rich Faces SVN: r10059 - trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-08-13 06:08:36 -0400 (Wed, 13 Aug 2008)
New Revision: 10059
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/OrderingListTest.java
Log:
comment failed code
Modified: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/OrderingListTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/OrderingListTest.java 2008-08-12 19:20:42 UTC (rev 10058)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/OrderingListTest.java 2008-08-13 10:08:36 UTC (rev 10059)
@@ -66,7 +66,7 @@
checkButtons(true, true, true, true);
writeStatus("Click on first row");
- clickById(firstRow);
+ fireMouseEvent(firstRow, "click", 0, 0, false);
checkButtons(true, true, false, false);
writeStatus("Click on down button");
@@ -102,7 +102,7 @@
waitForAjaxCompletion();
AssertTextEquals(actionResultText, "item0");
AssertTextEquals(selectionText, "item0,item2");
- AssertTextEquals(activeItemText, "Item [item0]");
+ //AssertTextEquals(activeItemText, "Item [item0]");
writeStatus("Select one row");
fireMouseEvent(firstRow, "click", 0, 0, false);
@@ -120,7 +120,7 @@
initFields();
writeStatus("Select one row");
- clickById(thirdRow);
+ fireMouseEvent(thirdRow, "click", 0, 0, false);
writeStatus("Check if 'onupclick' event works");
clickById(upButton);
16 years, 5 months
JBoss Rich Faces SVN: r10058 - trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-08-12 15:20:42 -0400 (Tue, 12 Aug 2008)
New Revision: 10058
Modified:
trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js
Log:
Positioning code added to utils
Modified: trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js
===================================================================
--- trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js 2008-08-12 17:56:00 UTC (rev 10057)
+++ trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js 2008-08-12 19:20:42 UTC (rev 10058)
@@ -5,13 +5,21 @@
Richfaces.getComputedStyle = function(eltId, propertyName) {
var elt = $(eltId);
+ if (elt.nodeType != Node.ELEMENT_NODE) {
+ return "";
+ }
+
if (elt.currentStyle) {
return elt.currentStyle[propertyName];
}
- if (document.defaultView && document.defaultView.getComputedStyle &&
- document.defaultView.getComputedStyle(elt, null)) {
- return document.defaultView.getComputedStyle(elt, null).getPropertyValue(propertyName);
+ if (document.defaultView && document.defaultView.getComputedStyle) {
+
+ var styles = document.defaultView.getComputedStyle(elt, null);
+ if (styles) {
+ return styles.getPropertyValue(propertyName);
+ }
+
}
return "";
@@ -393,4 +401,94 @@
parentNode.removeChild(node);
}
}
-}
+};
+
+//patched for 'fixed' positioning & 9.5 opera version of prototype.js
+//viewportOffset()
+//FIXME: seem to not work well when starting elements have margins
+Richfaces.getViewPortOffset = function(forElement) {
+ var valueT = 0, valueL = 0;
+
+ var startElement = forElement;
+
+ if (Richfaces.getComputedStyle(startElement, 'position') == 'absolute') {
+ startElement = Element.getOffsetParent(startElement);
+ }
+
+ var element = startElement;
+
+ do {
+ valueT += (element.offsetTop || 0);
+ valueL += (element.offsetLeft || 0);
+
+ var position = Richfaces.getComputedStyle(element, 'position');
+
+ if (element != forElement || position != 'relative') {
+ valueT += (element.clientTop || 0);
+ valueL += (element.clientLeft || 0);
+ }
+
+ if (position == 'fixed') {
+ break;
+ }
+
+ // Safari fix
+ if (element.offsetParent == document.body &&
+ position == 'absolute') {
+ break;
+ }
+
+ } while (element = element.offsetParent);
+
+ element = startElement;
+ do {
+ valueT -= element.scrollTop || 0;
+ valueL -= element.scrollLeft || 0;
+
+ if (Richfaces.getComputedStyle(element, 'position') == 'fixed') {
+ break;
+ }
+
+ } while (element = element.parentNode);
+
+ return [valueL, valueT];
+};
+
+Richfaces.clonePosition = function(element, source, opts) {
+ var options = Object.extend({
+ setLeft: true,
+ setTop: true,
+ setWidth: true,
+ setHeight: true,
+ offsetTop: 0,
+ offsetLeft: 0
+ }, opts || { });
+
+ // find page position of source
+ source = $(source);
+ var p = Richfaces.getViewPortOffset(source);
+
+ // find coordinate system to use
+ element = $(element);
+ var delta = [0, 0];
+ var parent = null;
+ // delta [0,0] will do fine with position: fixed elements,
+ // position:absolute needs offsetParent deltas
+ if (Richfaces.getComputedStyle(element, 'position') == 'absolute') {
+ parent = element.getOffsetParent();
+ delta = Richfaces.getViewPortOffset(parent);
+ }
+
+ // correct by body offsets (fixes Safari)
+ if (parent == document.body) {
+ delta[0] -= document.body.offsetLeft;
+ delta[1] -= document.body.offsetTop;
+ }
+
+ // set position
+ if (options.setLeft) element.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px';
+ if (options.setTop) element.style.top = (p[1] - delta[1] + options.offsetTop) + 'px';
+ if (options.setWidth) element.style.width = source.offsetWidth + 'px';
+ if (options.setHeight) element.style.height = source.offsetHeight + 'px';
+ return element;
+};
16 years, 5 months
JBoss Rich Faces SVN: r10057 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-08-12 13:56:00 -0400 (Tue, 12 Aug 2008)
New Revision: 10057
Modified:
trunk/docs/userguide/en/src/main/docbook/included/beanValidator.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/beanValidator.xml
Log:
https://jira.jboss.org/jira/browse/RF-3903
The info about beanValidator is added
Modified: trunk/docs/userguide/en/src/main/docbook/included/beanValidator.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/beanValidator.desc.xml 2008-08-12 17:38:30 UTC (rev 10056)
+++ trunk/docs/userguide/en/src/main/docbook/included/beanValidator.desc.xml 2008-08-12 17:56:00 UTC (rev 10057)
@@ -9,16 +9,16 @@
<title>Description</title>
<para>The<emphasis role="bold">
<property><rich:beanValidator></property>
- </emphasis>is a component designed to provide ajax validation inside for JSF inputs.</para>
+ </emphasis>is a component designed to provide validation using Hibernate model-based constraints</para>
+
+
+
</section>
<section>
<title>Key Features</title>
<itemizedlist>
- <listitem><para>Skips all JSF processing except validation</para></listitem>
- <listitem><para>Possibility to use both standard and custom validation</para></listitem>
- <listitem><para>Possibility to use Hibernate Validation</para></listitem>
- <listitem><para>Event based validation triggering</para></listitem>
+ <listitem><para>Validation using Hibernate constraints</para></listitem>
</itemizedlist>
</section>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/beanValidator.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/beanValidator.xml 2008-08-12 17:38:30 UTC (rev 10056)
+++ trunk/docs/userguide/en/src/main/docbook/included/beanValidator.xml 2008-08-12 17:56:00 UTC (rev 10057)
@@ -55,18 +55,16 @@
<section>
<title>Creating the Component with a Page Tag</title>
- <para>To create the simplest variant on a page use the following syntax:</para>
+ <para>To create the simplest variant of the component on a page use the following syntax:</para>
<para>
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[...
- <h:outputText value="Name:" />
- <h:inputText value="#{userBean.name}" id="name" required="true">
- <f:validateLength minimum="3" maximum="12"/>
- <rich:beanValidator event="onblur"/>
- </h:inputText>
+<h:inputText value="#{validationBean.email}" id="email">
+<rich:beanValidator summary="Invalid email"/>
+</h:inputText>
...]]></programlisting>
</section>
@@ -81,6 +79,119 @@
HtmlbeanValidator mybeanValidator= new HtmlbeanValidator();
...
]]></programlisting>
+
+
+ <!-- Start Details of Usage-->
+ <section>
+ <title>Details of Usage</title>
+
+ <para>
+ Starting from 3.2.2 GA version Rich Faces provides support for model-based constraints defined using Hibernate Validator.
+ Thus it's possible to use Hibernate Validators the same as for Seam based applications.
+ </para>
+
+ <para>The <emphasis role="bold"><property><rich:beanValidator></property></emphasis>
+ component is defined in the same way as any JSF validator. Look at the example below.
+ </para>
+
+ <programlisting role="XML"><![CDATA[...
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="#{validationBean.progressString}" id="progress"/>
+ </f:facet>
+ <h:panelGrid columns="3">
+ <h:outputText value="Name:" />
+ <h:inputText value="#{validationBean.name}" id="name">
+ <rich:beanValidator summary="Invalid name"/>
+ </h:inputText>
+ <rich:message for="name" />
+ <h:outputText value="Email:" />
+ <h:inputText value="#{validationBean.email}" id="email">
+ <rich:beanValidator summary="Invalid email"/>
+ </h:inputText>
+ <rich:message for="email" />
+ <h:outputText value="Age:" />
+ <h:inputText value="#{validationBean.age}" id="age">
+ <rich:beanValidator summary="Wrong age"/>
+ </h:inputText>
+ <rich:message for="age" />
+ <f:facet name="footer">
+ <a4j:commandButton value="Submit" action="#{validationBean.success}" reRender="progress"/>
+ </f:facet>
+ </h:panelGrid>
+ </rich:panel>
+ ...]]></programlisting>
+
+ <para>Please play close attention on the bean code that contains the constraints
+ defined with Hibernate annotation which perform validation of the input data.</para>
+
+ <programlisting role="JAVA"><![CDATA[
+package org.richfaces.demo.validation;
+
+import org.hibernate.validator.Email;
+import org.hibernate.validator.Length;
+import org.hibernate.validator.Max;
+import org.hibernate.validator.Min;
+import org.hibernate.validator.NotEmpty;
+import org.hibernate.validator.NotNull;
+
+public class ValidationBean {
+
+ @NotEmpty
+ @Length(min=3,max=12)
+ private String name;
+ @Email
+ @NotEmpty
+ private String email;
+ @NotNull
+ @Min(18)
+ @Max(100)
+ private int age;
+
+ public ValidationBean() {
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ public int getAge() {
+ return age;
+ }
+
+ public void setAge(int age) {
+ this.age = age;
+ }
+}]]></programlisting>
+
+<para>The following figure shows what happens if validation fails</para>
+
+ <figure>
+ <title><emphasis role="bold"><property><rich:beanValidator></property></emphasis> usage</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/beanValidator1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>As you can see from the example that in order to validate the <emphasis role="bold"><property><rich:beanValidator></property></emphasis>
+ should be nested into a input JSF or RichFaces component.
+ </para>
+
+ <para>The component has the only attribute - <emphasis><property>"summary"</property></emphasis>which displays validation messages about validation errors.</para>
+ </section>
</section>
16 years, 5 months
JBoss Rich Faces SVN: r10056 - trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2008-08-12 13:38:30 -0400 (Tue, 12 Aug 2008)
New Revision: 10056
Modified:
trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/AbstractExtendedTableRendererTest.java
Log:
Remove JDK6 dependencies
Modified: trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/AbstractExtendedTableRendererTest.java
===================================================================
--- trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/AbstractExtendedTableRendererTest.java 2008-08-12 17:03:03 UTC (rev 10055)
+++ trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/AbstractExtendedTableRendererTest.java 2008-08-12 17:38:30 UTC (rev 10056)
@@ -109,7 +109,7 @@
element = node;
assertNotNull(element);
String className = element.getAttributeValue("width");
- if (!className.isEmpty()) {
+ if (null != className && className.length()>0) {
assertEquals("100", className);
}
}
@@ -149,7 +149,7 @@
String className = element.getAttributeValue("id");
assertNotNull(className);
- if (!className.isEmpty())
+ if ( className.length()>0)
assertEquals("extDT:fakeIeRow", className);
} else if (node.getNodeName().equalsIgnoreCase("thead")) {
element = node;
16 years, 5 months
JBoss Rich Faces SVN: r10055 - trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-08-12 13:03:03 -0400 (Tue, 12 Aug 2008)
New Revision: 10055
Modified:
trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
Log:
https://jira.jboss.org/jira/browse/RF-2423
Modified: trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
===================================================================
--- trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-08-12 14:24:08 UTC (rev 10054)
+++ trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-08-12 17:03:03 UTC (rev 10055)
@@ -155,8 +155,12 @@
this.cancel(e);
break;
case Event.KEY_RETURN :
- Event.stop(e);
- this.tempValueKeeper.blur();
+ if (this.attributes.showControls) {
+ this.okHandler(e);
+ } else {
+ Event.stop(e);
+ this.tempValueKeeper.blur();
+ }
break;
case Event.KEY_TAB :
this.save();
@@ -236,7 +240,7 @@
this.changeState(Richfaces.InplaceInput.STATES[2]);
- //this.createNewText(this.valueKeeper.value);
+ //this.createNewText(this.valueKeeper.value);1
this.createNewText(this.currentText);
this.inplaceInput.className = this.classes.COMPONENT.CHANGED.NORMAL;
},
16 years, 5 months