Author: shane.bryzak(a)jboss.com
Date: 2008-01-29 19:54:19 -0500 (Tue, 29 Jan 2008)
New Revision: 7298
Modified:
trunk/ui/src/main/java/org/jboss/seam/ui/component/UIFileUpload.java
Log:
JBSEAM-2552
Modified: trunk/ui/src/main/java/org/jboss/seam/ui/component/UIFileUpload.java
===================================================================
--- trunk/ui/src/main/java/org/jboss/seam/ui/component/UIFileUpload.java 2008-01-29
22:45:47 UTC (rev 7297)
+++ trunk/ui/src/main/java/org/jboss/seam/ui/component/UIFileUpload.java 2008-01-30
00:54:19 UTC (rev 7298)
@@ -30,6 +30,33 @@
ValueExpression dataBinding = getValueExpression("data");
if (dataBinding != null)
{
+ if (getLocalContentType() != null)
+ {
+ ValueExpression valueExpression =
getValueExpression("contentType");
+ if (valueExpression != null)
+ {
+ valueExpression.setValue(context.getELContext(), getLocalContentType());
+ }
+ }
+
+ if (getLocalFileName() != null)
+ {
+ ValueExpression valueExpression = getValueExpression("fileName");
+ if (valueExpression != null)
+ {
+ valueExpression.setValue(context.getELContext(), getLocalFileName());
+ }
+ }
+
+ if (getLocalFileSize() != null)
+ {
+ ValueExpression valueExpression = getValueExpression("fileSize");
+ if (valueExpression != null)
+ {
+ valueExpression.setValue(context.getELContext(), getLocalFileSize());
+ }
+ }
+
Class clazz = dataBinding.getType(context.getELContext());
if (clazz.isAssignableFrom(InputStream.class))
{
@@ -59,33 +86,6 @@
}
dataBinding.setValue(context.getELContext(), bytes);
}
-
- if (getLocalContentType() != null)
- {
- ValueExpression valueExpression =
getValueExpression("contentType");
- if (valueExpression != null)
- {
- valueExpression.setValue(context.getELContext(), getLocalContentType());
- }
- }
-
- if (getLocalFileName() != null)
- {
- ValueExpression valueExpression = getValueExpression("fileName");
- if (valueExpression != null)
- {
- valueExpression.setValue(context.getELContext(), getLocalFileName());
- }
- }
-
- if (getLocalFileSize() != null)
- {
- ValueExpression valueExpression = getValueExpression("fileSize");
- if (valueExpression != null)
- {
- valueExpression.setValue(context.getELContext(), getLocalFileSize());
- }
- }
}
}
Show replies by date