myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <...@myfaces.apache.org>
Subject [jira] Commented: (MYFACES-2654) Trinidad ajax-branch does not work with MyFaces2
Date Tue, 13 Apr 2010 17:51:00 GMT

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

Leonardo Uribe commented on MYFACES-2654:
-----------------------------------------

I think with MYFACES-2654-2.patch we comply with the spec. Obviously if someone uses a custom
VDL, everything changes, but in this case the VDL is responsible to "buffer" the content outside
f:view. I think the patch proposed on MYFACES-2654-3.patch does not work, because the is a
missing detail that you can see on the example proposed. This is an extract of the change
required on JspViewDeclarationLanguage.buildView():

-        // store the wrapped response in the request, so it is thread-safe
-        setAfterViewTagResponseWrapper(externalContext, wrappedResponse);
+        //Skip this step if we are rendering an ajax request, because no content outside
+        //f:view tag should be output.
+        if (!context.getPartialViewContext().isPartialRequest())
+        {
+            // store the wrapped response in the request, so it is thread-safe
+            setAfterViewTagResponseWrapper(externalContext, wrappedResponse);
+        }

Note that jsp requires encapsulate everything inside f:view, but in facelets "everything is
a UIComponent", so all markup by default is inside a UIViewRoot instance, and the statement
does not have sense in this case. To expose this implementation detail to other vdl implementations
it is used a facesContext attribute taken from the first patch, so if someone else wants to
create a custom VDL, he/she can use that attribute (org.apache.myfaces.RESPONSE_SWITCH_ENABLED).

I believe (according to the spec) that the position of the EG is new features on the spec
are for facelets only. In fact, mojarra does not do what the spec says because the case proposed
does not work.

Use a PhaseListener is a good idea but unfortunately it does not solve the problem fully.

> Trinidad ajax-branch does not work with MyFaces2
> ------------------------------------------------
>
>                 Key: MYFACES-2654
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2654
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.0.0-beta-3
>         Environment: Trinidad ajax branch, URL: https://svn.apache.org/repos/asf/myfaces/trinidad/branches/jsf2_ajax.3/
> MyFaces TRUNK
>            Reporter: Matthias We├čendorf
>         Attachments: MYFACES-2654-2.patch, MYFACES-2654-3.patch, MYFACES-2654.patch
>
>
> run the demo (like via Jetty):
> Go to "http://localhost:8080/trinidad-demo/faces/demos/pprDemos.jspx"
> on any "ajax" action/click, I get these two alert() boxes:
> * "TypeError: this._ajaxOldDomElements is null"
> * "malformedXML--"
> Same stuff works with Mojarra 2.0.2

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

       

Mime
View raw message