Author: vsukhov
Date: 2008-03-22 11:05:02 -0400 (Sat, 22 Mar 2008)
New Revision: 7086
Added:
trunk/docs/userguide/en/src/main/resources/images/fileUpload11.png
Modified:
trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml
trunk/ui/fileUpload/src/main/config/component/fileUpload.xml
Log:
http://jira.jboss.com/jira/browse/RF-1207 I've added some information about form
encoding Table with attributes corrected
Modified: trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2008-03-21 18:50:32
UTC (rev 7085)
+++ trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2008-03-22 15:05:02
UTC (rev 7086)
@@ -126,7 +126,7 @@
<para>As it could be seen in the example above, only files with
"html" extension are accepted to upload.</para>
<para>The <emphasis>
- <property>
"autoclear"</property></emphasis> attribute is used to
remove automatically files from list after upload completed.</para>
+ <property>
"autoclear"</property></emphasis> attribute is used to
remove automatically files from the list after upload completed.</para>
<para>
<emphasis role="bold">Example:</emphasis>
@@ -135,10 +135,10 @@
<rich:fileUpload uploadData="#{bean.data}"
addControlLabel="myLabel" autoclear="true"
acceptedTypes="html"/>
...]]></programlisting>
- <para>As it could be seen in the example above, files removes from list
after upload completed.</para>
+ <para>As it could be seen in the example above, files are removed from
the list after upload completed.</para>
<para>The <emphasis>
<property>
"maxFilesQuantity"</property></emphasis> defines max number
of files allowed for upload.
- After number of files in the list is equals to this attribute – add button is
disabled.
+ After a number of files in the list equals to this attribute – add button is
disabled.
The add button is not available until all list items are uploaded.
</para>
<para>
@@ -175,7 +175,7 @@
...]]></programlisting>
<para>The <emphasis>
<property>
"immediateUpload"</property></emphasis> attribute allows
files to be uploaded immediately after they have been added into list.
- If you set this attribute to true files immediately uploads after they have
been added into list, all next files automatically uploads one by one.
+ If you set this attribute to true files immediately uploads after they have
been added into the list, all next files automatically uploads one by one.
If you cancel uploading – next files aren't start uploading till you
press the general upload button or clear the list.
</para>
@@ -186,6 +186,39 @@
<rich:fileUpload uploadData="#{bean.data}"
addControlLabel="myLabel" autoclear="true"
maxFilesQuantity="2" fileUploadListener="#{bean.listener}"
acceptedTypes="html" immediateUpload="true"/>
...]]></programlisting>
+ <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">
+ <property><h:form></property>
+ </emphasis>/<emphasis role="bold">
+ <property></h:form></property></emphasis>
tags.
+ </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<h:form>
+ <rich:fileUpload uploadData="#{bean.data}"
addControlLabel="myLabel" autoclear="true"
maxFilesQuantity="2" fileUploadListener="#{bean.listener}"
+ acceptedTypes="html" immediateUpload="true"/>
+ <a4j:commandLink style="font-weight: bold; width: 200px;"
value="Show files uploaded:" reRender="files_list">
+ <h:dataTable value="#{bean.fileList}"
var="file" id="files_list" style="width: 500px">
+ <h:column>
+ <h:outputText
value="#{file.fileName}"></h:outputText>
+ </h:column>
+ </h:dataTable>
+</h:form>
+...]]></programlisting>
+ <para>This is a result:</para>
+ <figure>
+ <title><emphasis role="bold">
+ <property><rich:fileUpload></property>
+ </emphasis>at server-side</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/fileUpload11.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
<para>The <emphasis role="bold">
<property><rich:fileUpload></property>
</emphasis> provides using a number of handlers. The <emphasis>
@@ -194,7 +227,7 @@
<property>
"onuploadcanceled"</property></emphasis> is called after
upload was canceled via cancel control. The <emphasis>
<property>
"onerror"</property></emphasis> is called if the file upload
was interrupted according to any errors.</para>
<para>
- There are a number of facets providing for this component:
+ There is a number of facets providing for this component:
<emphasis>
<property>
"header"</property></emphasis>
@@ -208,8 +241,7 @@
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[...
-<rich:fileUpload uploadData="#{bean.data}"
addControlLabel="myLabel" autoclear="true"
maxFilesQuantity="2" fileUploadListener="#{bean.listener}"
- acceptedTypes="html">
+<rich:fileUpload uploadData="#{bean.data}"
addControlLabel="myLabel" autoclear="true"
maxFilesQuantity="2" fileUploadListener="#{bean.listener}">
<f:facet name="label">
<h:outputText value="{_KB}KB from {KB}KB uploaded ---
{mm}:{ss}"></h:outputText>
</f:facet>
@@ -760,7 +792,7 @@
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="CSS"><![CDATA[...
-..upload_list_decor{
+.upload_list_decor{
background-color:#ecf4fe;
}
...]]></programlisting>
Added: trunk/docs/userguide/en/src/main/resources/images/fileUpload11.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/fileUpload11.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/ui/fileUpload/src/main/config/component/fileUpload.xml
===================================================================
--- trunk/ui/fileUpload/src/main/config/component/fileUpload.xml 2008-03-21 18:50:32 UTC
(rev 7085)
+++ trunk/ui/fileUpload/src/main/config/component/fileUpload.xml 2008-03-22 15:05:02 UTC
(rev 7086)
@@ -242,17 +242,17 @@
<property>
<name>addControlLabel</name>
<classname>java.lang.String</classname>
- <description>Defines a label for an add control</description>
+ <description>Defines a label for an add button</description>
</property>
<property>
<name>uploadControlLabel</name>
<classname>java.lang.String</classname>
- <description>Defines a label for an upload control</description>
+ <description>Defines a label for an upload button</description>
</property>
<property>
<name>stopControlLabel</name>
<classname>java.lang.String</classname>
- <description>Defines a label for a stop control</description>
+ <description>Defines a label for a stop button</description>
</property>
<property>
<name>cancelEntryControlLabel</name>
@@ -267,7 +267,7 @@
<property>
<name>clearAllControlLabel</name>
<classname>java.lang.String</classname>
- <description>Defines a label for a clearAll control</description>
+ <description>Defines a label for a clearAll button</description>
</property>
<property>
<name>stopEntryControlLabel</name>