Author: nbelaevski
Date: 2009-04-01 18:44:20 -0400 (Wed, 01 Apr 2009)
New Revision: 13353
Modified:
trunk/ui/fileUpload/src/main/java/org/richfaces/component/UIFileUpload.java
trunk/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java
Log:
Refactoring: rich:fileUpload
Modified: trunk/ui/fileUpload/src/main/java/org/richfaces/component/UIFileUpload.java
===================================================================
--- trunk/ui/fileUpload/src/main/java/org/richfaces/component/UIFileUpload.java 2009-04-01
22:43:30 UTC (rev 13352)
+++ trunk/ui/fileUpload/src/main/java/org/richfaces/component/UIFileUpload.java 2009-04-01
22:44:20 UTC (rev 13353)
@@ -200,11 +200,11 @@
String actionString = uploadActionEvent.getAction();
if ("progress".equals(actionString)) {
- setupProgressBarValueExpression(facesContext, uid);
Map<String, Object> sessionMap = externalContext.getSessionMap();
Map<String, Integer> requestsSizeMap = (Map<String, Integer>)
sessionMap.get(FileUploadConstants.REQUEST_SIZE_BEAN_NAME);
if (requestsSizeMap != null) {
+ setupProgressBarValueExpression(facesContext, uid);
ajaxContext.setResponseData(requestsSizeMap.get(uid));
} else {
ajaxContext.setResponseData(null);
Modified:
trunk/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java
===================================================================
---
trunk/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java 2009-04-01
22:43:30 UTC (rev 13352)
+++
trunk/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java 2009-04-01
22:44:20 UTC (rev 13353)
@@ -346,7 +346,6 @@
v = bundle2.getString(name);
ByteArrayOutputStream b = new ByteArrayOutputStream();
b.write(v.getBytes());
- b.toString("UTF-8");
} catch (Exception e) {
// no value has been found
}
@@ -526,7 +525,7 @@
body.append(component.getClientId(context));
body.append("').component.getFileSize(data);");
oncomplete.addToBody(body);
- return getActionScript(context, component, "progress", oncomplete);
+ return getActionScript(context, component,
FileUploadConstants.FILE_UPLOAD_ACTION_PROGRESS, oncomplete);
}