You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "jack terranova (JIRA)" <de...@myfaces.apache.org> on 2005/11/15 03:55:28 UTC
[jira] Commented: (MYFACES-819) ClassCastException in HtmlFileUploadRenderer
[ http://issues.apache.org/jira/browse/MYFACES-819?page=comments#action_12357658 ]
jack terranova commented on MYFACES-819:
----------------------------------------
My apologies... My environment was setup incorrectly.
Please close this artifact.
> 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