[richfaces-issues] [JBoss JIRA] Commented: (RF-3735) rich:fileupload does not work properly when context-param com.sun.faces.enableViewStateIdRendering = false for Mojarra 1.2_08

eugene dorfman (JIRA) jira-events at lists.jboss.org
Wed Jun 18 07:37:37 EDT 2008


    [ http://jira.jboss.com/jira/browse/RF-3735?page=comments#action_12417742 ] 
            
eugene dorfman commented on RF-3735:
------------------------------------

There is a fileUploadTest.war application attached to demonstrate an issue.  you can unzip it edit web.xml and set the guilty context-param com.sun.faces.enableViewStateIdRendering to true (or remove it because true is default) and make sure that it is the one responsible for Transfer error occuried message and not firing of a4j:support onuploadcomplete event.  because when it is set to false the <input name="javax.faces.ViewState" id="javax.faces.ViewState" /> is rendered without an id attribute (otherwise we would have multiple same ids if the page contains several h:forms).  

The url to see the page with fileupload is:  http://server_base/fileUploadTest/faces/ 


> rich:fileupload does not work properly when context-param com.sun.faces.enableViewStateIdRendering = false for Mojarra 1.2_08
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: RF-3735
>                 URL: http://jira.jboss.com/jira/browse/RF-3735
>             Project: RichFaces
>          Issue Type: Bug
>    Affects Versions: 3.2.1
>         Environment: glassfish 9.1_ur1, Mojarra 1.2_08, richfaces 3.2.1.GA
>            Reporter: eugene dorfman
>             Fix For: 3.2.2
>
>         Attachments: fileUploadTest.war
>
>
> There is an issue with JSF - it generates invalid mark up in a sense that if you have more than one h:form on a page - there will be an input field with the name 
> javax.faces.ViewState and with the same id in each form - this leads to a repeating id=javax.faces.ViewState.  In Sun RI Mojarra 1.2_08 there was introduced a context-param com.sun.faces.enableViewStateIdRendering, if you set it to false in your web.xml - there is no bug with markup validation, because id attribute is not rendered for the input field (it renders a name attribute only).  However this option prevents fileUpload to work properly (it will say Transfer error occuried) when id for ViewState input is not rendered.  Since there is support for such an option in Mojarra 1.2_08 - fileUpload should not depend on this id attribute.   I will attach an illustrating example a bit later.

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

        



More information about the richfaces-issues mailing list