Author: ppitonak(a)redhat.com
Date: 2010-12-21 09:45:31 -0500 (Tue, 21 Dec 2010)
New Revision: 20722
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichFileUploadBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/simple.xhtml
Log:
* file upload sample fixed to work in all environments
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 2010-12-21
14:15:13 UTC (rev 20721)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichFileUploadBean.java 2010-12-21
14:45:31 UTC (rev 20722)
@@ -95,4 +95,8 @@
files.clear();
return null;
}
+
+ public boolean isRenderButton() {
+ return files.size() > 0;
+ }
}
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 2010-12-21
14:15:13 UTC (rev 20721)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/simple.xhtml 2010-12-21
14:45:31 UTC (rev 20722)
@@ -80,7 +80,7 @@
<a4j:commandButton id="clearUploadedDataButton"
action="#{richFileUploadBean.clearUploadedData}"
value="Clear Uploaded Data"
- rendered="#{richFileUploadBean.items.size()
> 0}" />
+
rendered="#{richFileUploadBean.renderButton}" />
</a4j:outputPanel>
</fieldset>