[ http://issues.apache.org/jira/browse/MYFACES-819?page=all ]
     
Bruno Aranda closed MYFACES-819:
--------------------------------

    Resolution: Invalid

That can happen ;-) Closing due to an invalid configuration. Thanks for keeping 
us updated,

> ClassCastException in HtmlFileUploadRenderer
> --------------------------------------------
>
>          Key: MYFACES-819
>          URL: http://issues.apache.org/jira/browse/MYFACES-819
>      Project: MyFaces
>         Type: Bug
>   Components: Tomahawk
>     Versions: 1.1.1
>  Environment: XP, Tomcat 5.0.28
>     Reporter: jack terranova

>
> JSP with <t:inputFileUpload/> tag will not render due to ClassCastException 
> in HtmlFileUploadRenderer at line 57.
> uiComponent.value() is null and is being cast to UploadedFile class.  No 
> apparent workaround as initial rendering of page would mean no UploadedFile 
> exists at that point.  
> Subsequent code appears to expect a null in some instances...
> UploadedFile value = 
> (UploadedFile)((HtmlInputFileUpload)uiComponent).getValue();
>         if (value != null)
>         {
>               if( value.getName() != null )
>               {
>                       writer.writeAttribute(HTML.VALUE_ATTR, value.getName(), 
> null);
>               }
>         }
> ... but the cast will ensure a blow up.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to