Author: andrei_exadel
Date: 2008-04-01 08:39:06 -0400 (Tue, 01 Apr 2008)
New Revision: 7530
Modified:
trunk/ui/fileUpload/src/main/config/component/fileUpload.xml
trunk/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java
Log:
add ajaxSingle attribute
Modified: trunk/ui/fileUpload/src/main/config/component/fileUpload.xml
===================================================================
--- trunk/ui/fileUpload/src/main/config/component/fileUpload.xml 2008-04-01 12:19:00 UTC
(rev 7529)
+++ trunk/ui/fileUpload/src/main/config/component/fileUpload.xml 2008-04-01 12:39:06 UTC
(rev 7530)
@@ -319,6 +319,16 @@
</description>
</property>
+ <property>
+ <name>ajaxSingle</name>
+ <classname>boolean</classname>
+ <description>
+ If this attribute set up in true upload request will be like as single.
+ No components value in form will be updated after file uploaded.
+ </description>
+ <defaultvalue>false</defaultvalue>
+ </property>
+
<property elonly="true" hidden="true"
existintag="false" exist="false" >
<name>size</name>
<classname>java.lang.Object</classname>
Modified:
trunk/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java
===================================================================
---
trunk/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java 2008-04-01
12:19:00 UTC (rev 7529)
+++
trunk/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java 2008-04-01
12:39:06 UTC (rev 7530)
@@ -376,7 +376,9 @@
try {
AjaxContext ajaxContext = AjaxContextImpl
.getCurrentInstance(context);
- ajaxContext.setAjaxSingleClientId(fileUpload.getClientId(context));
+ if ((Boolean)fileUpload.getAttributes().get(AjaxRendererUtils.AJAX_SINGLE_ATTR)) {
+ ajaxContext.setAjaxSingleClientId(fileUpload.getClientId(context));
+ }
ajaxContext.setAjaxRequest(true);
} catch (Exception e) {
e.getMessage();
Show replies by date