Author: andrei_exadel
Date: 2008-07-25 07:01:45 -0400 (Fri, 25 Jul 2008)
New Revision: 9780
Modified:
trunk/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java
Log:
RF-4016
Modified:
trunk/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java
===================================================================
---
trunk/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java 2008-07-25
09:49:09 UTC (rev 9779)
+++
trunk/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java 2008-07-25
11:01:45 UTC (rev 9780)
@@ -465,8 +465,8 @@
public Object getAcceptedTypes(FacesContext context, UIComponent component) {
String acceptedTypes = (String) component.getAttributes().get(
"acceptedTypes");
+ Map<String, Boolean> accepted = new HashMap<String, Boolean>();
if (acceptedTypes != null && acceptedTypes.length() > 0) {
- Map<String, Boolean> accepted = new HashMap<String, Boolean>();
acceptedTypes = acceptedTypes.replaceAll("[\\s]", "");
String[] types = acceptedTypes.split("[,;|]");
if (types != null) {
@@ -475,8 +475,10 @@
}
return ScriptUtils.toScript(accepted);
}
+ }else {
+ accepted.put("*", true);
}
- return JSReference.NULL;
+ return ScriptUtils.toScript(accepted);
}
/**
Show replies by date