Author: ppitonak(a)redhat.com
Date: 2011-03-31 10:48:52 -0400 (Thu, 31 Mar 2011)
New Revision: 22343
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichFileUploadBean.java
modules/tests/metamer/trunk/application/src/main/webapp/WEB-INF/web.xml
modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/simple.xhtml
Log:
sample for rich:fileUpload updated
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichFileUploadBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichFileUploadBean.java 2011-03-31
12:52:05 UTC (rev 22342)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichFileUploadBean.java 2011-03-31
14:48:52 UTC (rev 22343)
@@ -62,8 +62,13 @@
attributes = Attributes.getComponentAttributesFromFacesConfig(UIFileUpload.class,
getClass());
+ attributes.setAttribute("addLabel", "Add ...");
+ attributes.setAttribute("clearAllLabel", "Clear All");
+ attributes.setAttribute("clearLabel", "Clear");
+ attributes.setAttribute("deleteLabel", "Delete");
attributes.setAttribute("noDuplicate", false);
attributes.setAttribute("rendered", true);
+ attributes.setAttribute("uploadLabel", "Upload");
// will be tested in another way
attributes.remove("validator");
Modified: modules/tests/metamer/trunk/application/src/main/webapp/WEB-INF/web.xml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/WEB-INF/web.xml 2011-03-31
12:52:05 UTC (rev 22342)
+++ modules/tests/metamer/trunk/application/src/main/webapp/WEB-INF/web.xml 2011-03-31
14:48:52 UTC (rev 22343)
@@ -20,6 +20,10 @@
<param-name>org.richfaces.skin</param-name>
<param-value>#{richBean.skin}</param-value>
</context-param>
+ <context-param>
+ <param-name>org.richfaces.fileUpload.maxRequestSize</param-name>
+ <param-value>2097152</param-value>
+ </context-param>
<filter>
<filter-name>Test Identity Filter</filter-name>
<filter-class>org.richfaces.tests.metamer.TestIdentityFilter</filter-class>
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/simple.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/simple.xhtml 2011-03-31
12:52:05 UTC (rev 22342)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/simple.xhtml 2011-03-31
14:48:52 UTC (rev 22343)
@@ -27,9 +27,9 @@
-->
<ui:composition template="/templates/template.xhtml">
-
- <ui:define name="view">
- <f:metadata>
+
+ <ui:define name="view">
+ <f:metadata>
<f:viewParam name="templates"
value="#{templateBean.templates}">
<f:converter converterId="templatesListConverter" />
</f:viewParam>
@@ -40,12 +40,23 @@
<rich:fileUpload id="fileUpload"
acceptedTypes="#{richFileUploadBean.attributes['acceptedTypes'].value}"
+
addLabel="#{richFileUploadBean.attributes['addLabel'].value}"
+
clearAllLabel="#{richFileUploadBean.attributes['clearAllLabel'].value}"
+
clearLabel="#{richFileUploadBean.attributes['clearLabel'].value}"
+
data="#{richFileUploadBean.attributes['data'].value}"
+
deleteLabel="#{richFileUploadBean.attributes['deleteLabel'].value}"
dir="#{richFileUploadBean.attributes['dir'].value}"
disabled="#{richFileUploadBean.attributes['disabled'].value}"
+
doneLabel="#{richFileUploadBean.attributes['doneLabel'].value}"
+
execute="#{richFileUploadBean.attributes['execute'].value}"
fileUploadListener="#{richFileUploadBean.listener}"
lang="#{richFileUploadBean.attributes['lang'].value}"
+
limitRender="#{richFileUploadBean.attributes['limitRender'].value}"
noDuplicate="#{richFileUploadBean.attributes['noDuplicate'].value}"
+
onbeforedomupdate="#{richFileUploadBean.attributes['onbeforedomupdate'].value}"
+
onbegin="#{richFileUploadBean.attributes['onbegin'].value}"
onclick="#{richFileUploadBean.attributes['onclick'].value}"
+
oncomplete="#{richFileUploadBean.attributes['oncomplete'].value}"
ondblclick="#{richFileUploadBean.attributes['ondblclick'].value}"
onfilesubmit="#{richFileUploadBean.attributes['onfilesubmit'].value}"
onkeydown="#{richFileUploadBean.attributes['onkeydown'].value}"
@@ -57,10 +68,15 @@
onmouseover="#{richFileUploadBean.attributes['onmouseover'].value}"
onmouseup="#{richFileUploadBean.attributes['onmouseup'].value}"
onuploadcomplete="#{richFileUploadBean.attributes['onuploadcomplete'].value}"
+
render="#{richFileUploadBean.attributes['render'].value}"
rendered="#{richFileUploadBean.attributes['rendered'].value}"
+
serverErrorLabel="#{richFileUploadBean.attributes['serverErrorLabel'].value}"
+
sizeExceededLabel="#{richFileUploadBean.attributes['sizeExceededLabel'].value}"
+
status="#{richFileUploadBean.attributes['status'].value}"
style="#{richFileUploadBean.attributes['style'].value}"
styleClass="#{richFileUploadBean.attributes['styleClass'].value}"
title="#{richFileUploadBean.attributes['title'].value}"
+
uploadLabel="#{richFileUploadBean.attributes['uploadLabel'].value}"
/>
<br/>