Author: shane.bryzak(a)jboss.com
Date: 2008-01-30 02:35:18 -0500 (Wed, 30 Jan 2008)
New Revision: 7302
Modified:
branches/Seam_2_0/ui/src/main/java/org/jboss/seam/ui/component/UIFileUpload.java
Log:
JBSEAM-2552
Modified:
branches/Seam_2_0/ui/src/main/java/org/jboss/seam/ui/component/UIFileUpload.java
===================================================================
---
branches/Seam_2_0/ui/src/main/java/org/jboss/seam/ui/component/UIFileUpload.java 2008-01-30
04:45:31 UTC (rev 7301)
+++
branches/Seam_2_0/ui/src/main/java/org/jboss/seam/ui/component/UIFileUpload.java 2008-01-30
07:35:18 UTC (rev 7302)
@@ -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,34 +86,7 @@
}
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());
- }
- }
- }
+ }
}
public String getLocalContentType()
Show replies by date