myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Werner Punz (Issue Comment Edited) (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Issue Comment Edited] (MYFACES-3401) Issue with RichFaces fileUpload component using MyFaces 2.0
Date Mon, 12 Dec 2011 21:15:30 GMT

    [ https://issues.apache.org/jira/browse/MYFACES-3401?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13167802#comment-13167802
] 

Werner Punz edited comment on MYFACES-3401 at 12/12/11 9:14 PM:
----------------------------------------------------------------

Ok I did a quick preliminary investigation, the issue is that Richfaces basically introduces
for the Ajax upload its own request cycle and then calls the response with an empty context.
Now I donĀ“t rely on that case because I assume that the context is always filled at least
with one source element. This comes implicitely from the fact that if no source is given also
the viewstate update would fail in certain cases.

Now the spec clearly states that following must be given to the response:

context
    An object containing the request context, including the following properties: the source
element, per call onerror callback function, and per call onevent callback function. However
onerror and onevent can be empty so it is not clear whether source also can be empty.

 The problem here is the viewstate update, having no information where to apply it (by the
missing source and render targets) there is only one way to apply it from our side, only if
one form is given. Maybe however Richfaces does the Viewstate update itself.

Either way I will do more investigation and then fix this either on our or on the side of
Richfaces.


                
      was (Author: werpu):
    Ok I did a quick preliminary investigation, the issue is that richfaces basically introduces
for the ajax upload its own request cycle and then calls the response with an empty context.
Now I dont rely on that case because I assume that the context is always filled.
Now the spec clearly states that following must be given to the response:

context
    An object containing the request context, including the following properties: the source
element, per call onerror callback function, and per call onevent callback function. However
onerror and onevent can be empty so it is not clear whether source also can be empty. The
problem here is the viewstate update, having no information where to apply it (by the missing
source and render targets) there is only one way to apply it from our side, only if one form
is given. Maybe however richfaces does the viewstate update itself.

Either way I will do more investigation and then fix this either on our or on the side of
Richfaces.


                  
> Issue with RichFaces fileUpload component using MyFaces 2.0
> -----------------------------------------------------------
>
>                 Key: MYFACES-3401
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3401
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>    Affects Versions: 2.0.9
>            Reporter: Paul Nicolucci
>            Assignee: Werner Punz
>         Attachments: webapp.war
>
>
> I have an application that I'll attach to this issue that can reproduce this issue. 
To reproduce you need to: 
> 1) Install webapp.war
> 2) navigate to index.xhtml
> 3) click the "add" button and select a file to upload ( any file it does not matter )
> 4) click the "upload" button
> The following error occurs: context.source is undefined  -> jsf.js.jsf:6422
> If I look at the jsf.js line 6422 I see the following:
>    var elementId = (context._mfInternal)? context._mfInternal["_mfSourceControlId"] :
context.source.id;
> The above line is in the processUpdate : function(request, context, node)  method.  I'm
not very familiar with the JS within MyFaces so I wanted to open up an issue and get some
feedback from the community.
> I see that other issues have been opened regarding RichFaces fileUpload such as : https://issues.apache.org/jira/browse/MYFACES-3043

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message