You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org> on 2010/04/09 14:55:50 UTC

[jira] Created: (MYFACES-2654) Trinidad ajax-branch does not work with MyFaces2

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


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.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (MYFACES-2654) Trinidad ajax-branch does not work with MyFaces2

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-2654?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leonardo Uribe updated MYFACES-2654:
------------------------------------

           Status: Resolved  (was: Patch Available)
         Assignee: Leonardo Uribe
    Fix Version/s: 2.0.0
       Resolution: Fixed

> 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
>          Components: JSR-314
>    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
>            Assignee: Leonardo Uribe
>             Fix For: 2.0.0
>
>         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

       

[jira] Commented: (MYFACES-2654) Trinidad ajax-branch does not work with MyFaces2

Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12856883#action_12856883 ] 

Matthias Weßendorf commented on MYFACES-2654:
---------------------------------------------

see mail archive for more info:

http://markmail.org/message/od23ssjb5wx2xpn6

> 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
>          Components: JSR-314
>    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
>            Assignee: Leonardo Uribe
>             Fix For: 2.0.0
>
>         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

       

[jira] Commented: (MYFACES-2654) Trinidad ajax-branch does not work with MyFaces2

Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12856418#action_12856418 ] 

Jakob Korherr commented on MYFACES-2654:
----------------------------------------

Thanks Leo for pointing out that this kind of code is not allowed. Frankly, I did not know that!

The objection I have about this solution is that when someone uses a different (custom-built) VDL, the spec requirement is not fulfilled.

The spec says: "For partial requests, were partial view rendering is required there must be no content written outside of the view (outside f:view). Response writing must be disabled. Response writing must be enabled again at the start of encodeBegin."

Since the ResponseSwitch is a MyFaces implementation detail, we can't control it in UIViewRoot.encodeBegin() directly, because it would have to be specified. Also, as you said Leo, we can't put a field on the FacesContext attribute map (or any other map) to control MyFaces-impl behaviour. So maybe a phase listener is the right thing here, because phase listeners are the first thing that is executed in UIViewRoot.encodeBegin(). I'll provide a patch and we can talk about it!

> 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.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

       

[jira] Commented: (MYFACES-2654) Trinidad ajax-branch does not work with MyFaces2

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12856085#action_12856085 ] 

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

Yes, we know that. This was my last post on dev list:

".....The problem is trinidad override PartialViewContext implementation, and on Render Response phase, the output is disabled. Myfaces PartialViewContextImpl enables it before render the output but trinidad doesn't know how to do that. Jira is down right now, so I'll put this comment as soon as is up again.

Maybe this is a good time to get rid response switch code. I did a fast check to mojarra and as I expected they are not doing anything. The point is ajax in jsp case will not work, and this code only has sense on jsp case (because vdl.buildView trigger dispatch and in jsp that render unwanted code). Note there is no "standard" way to know if the current page is for jsp or not, so we don't have a way to enable this code only for jsp case......."

I think it is possible to move the code from RenderResponseExecutor to jsp vld.buildView().

Max Starets says this:


> 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
>
> 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

       

[jira] Updated: (MYFACES-2654) Trinidad ajax-branch does not work with MyFaces2

Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-2654?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jakob Korherr updated MYFACES-2654:
-----------------------------------

    Status: Patch Available  (was: Open)

> 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.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

       

[jira] Commented: (MYFACES-2654) Trinidad ajax-branch does not work with MyFaces2

Posted by "Werner Punz (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12856928#action_12856928 ] 

Werner Punz commented on MYFACES-2654:
--------------------------------------

Ok I postponed my car pickup appointment to investigate this, bevor making a break for today I want to post the info I could find:


Ok I need further information on this, since the problem on Matthiass side is in firefox, which I cannot reproduce here.
First which demos fail I have checked out the latest snapshot trunk and on the page mentioned above about 95% of all demos work for me, the failing 5% are not directly related but have to be investigated separately.

Can you give me an exact workflow of a failing test, with the exact browser version to find the bug. I cannot reproduce that nothing works here (fortunately)

Also, do all demos work on mojarra or do you have failing demos as well in the ppr case?

Here is a small screencast of what I am getting here (please bear in mind that it takes a little bit for Youtube to process the video (so the video quality will take a while to get there)
http://www.youtube.com/watch?v=YR02dRDLYco&feature=youtube_gdata


> 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
>          Components: JSR-314
>    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
>            Assignee: Leonardo Uribe
>             Fix For: 2.0.0
>
>         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

       

[jira] Commented: (MYFACES-2654) Trinidad ajax-branch does not work with MyFaces2

Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12856922#action_12856922 ] 

Jakob Korherr commented on MYFACES-2654:
----------------------------------------

The demo only works correctly if the ViewHandler uses the FaceletVDL to render the pages. If it uses the JSP-VDL, ppr won't work, because jsf.js won't be loaded unless you do it manually!

> 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
>          Components: JSR-314
>    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
>            Assignee: Leonardo Uribe
>             Fix For: 2.0.0
>
>         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

       

[jira] Commented: (MYFACES-2654) Trinidad ajax-branch does not work with MyFaces2

Posted by "Werner Punz (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12855420#action_12855420 ] 

Werner Punz commented on MYFACES-2654:
--------------------------------------

Ok further investigation, the partial response writer is not hit as it seems, I set a breakpoint on startUpdate which is started at the beginning of the partial tree processing, and it is never hit.
So MyFaces must fail earlier than that, the update is pretty much almost at the beginning of the ppr response before the components themselves are processed for rendering.



> 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
>
> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-2654) Trinidad ajax-branch does not work with MyFaces2

Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12856061#action_12856061 ] 

Jakob Korherr commented on MYFACES-2654:
----------------------------------------

It is right that the files aren't facelets files, but they are xml jsp files and those files can be handled by the FaceletsVDL. So I guess the commit [1] was wrong, because with the current version nothing on the pprDemos.jspx site works, because the jsf javascript resources aren't loaded sine the page is processed by the JSP-VDL.

[1] http://svn.apache.org/viewvc/myfaces/trinidad/branches/jsf2_ajax.3/trinidad-examples/trinidad-demo/src/main/webapp/WEB-INF/web.xml?r1=932561&r2=932560&pathrev=932561

> 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
>
> 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

       

[jira] Commented: (MYFACES-2654) Trinidad ajax-branch does not work with MyFaces2

Posted by "Werner Punz (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12855409#action_12855409 ] 

Werner Punz commented on MYFACES-2654:
--------------------------------------

Ok as it seems to me the server is sending nothing back...
for whatever reason, the xhr request is passed down and looks sane:
Tr-PPR-Message	true
_noJavaScript	false
event	autosub
itxt	Change this text
j_id1078059021_4041e82d	
javax.faces.ViewState	!1b0dwwbwze
javax.faces.partial.ajax	true
javax.faces.partial.event	click
javax.faces.partial.execu...	pSub_button
javax.faces.source	pSub_button
org.apache.myfaces.trinid...	j_id1078059021_4041e08f
partial	true
selOne	0
source	
source	pSub_button

everything is there to have the processing in place, the only thing really missing is the render attribute
but thats basically it and a rendered is not really needed it works without:

for a comparison here is one of my working demos
form2:toUpdate	4
form2_SUBMIT	1
javax.faces.ViewState	Jf1j2ILM9475XJOzR3e+dsIWjVko6SHrjSgVcnsaxk2LRz6oc8gAYQRPYX14MvenjUgiAw06Pbe1LvyPDqLhAo/s6Gb5+3lT28yy8Y1K8Fs=
javax.faces.partial.ajax	true
javax.faces.partial.event	click
javax.faces.partial.execu...	form2:toUpdate
javax.faces.source	mego2

For one reason or the other the Trinidad request does not really pass the server correctly and I do not get
a valid xhr response (which is xml)!



> 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
>
> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-2654) Trinidad ajax-branch does not work with MyFaces2

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12856130#action_12856130 ] 

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

Unfortunately, we can't add implementation details to java api. Note this flag is myfaces specific, and to remain compatible with ri, we cannot commit that kind of code. 

For example, in MYFACES-2616 the patch proposed uses a param to indicate when we are "marking initial state". I can't commit that code because we need to include this facescontext attribute on the spec to allow that code on api.

Could you test the suggestion about move the code from RenderResponseExecutor to JSP vld.buildView()?

> 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.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

       

[jira] Commented: (MYFACES-2654) Trinidad ajax-branch does not work with MyFaces2

Posted by "Werner Punz (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12855413#action_12855413 ] 

Werner Punz commented on MYFACES-2654:
--------------------------------------

Just a minor sidenote, to debug this out on the client side here is a little helper,
drop the expanded scripts into the webapp under resources/js and then include it in following order
<trh:head>
                <script type="text/javascript" src="#{resource['js:myfaces/_impl/_util/_LangUtils.js']}"/>
                <script type="text/javascript" src="#{resource['js:/myfaces/_impl/_util/_ListenerQueue.js']}"/>
                <script type="text/javascript" src="#{resource['js:/myfaces/_impl/_util/_Utils.js']}"/>
                <script type="text/javascript" src="#{resource['js:/myfaces/_impl/_util/_HtmlStripper.js']}"/>
                <script type="text/javascript" src="#{resource['js:/myfaces/_impl/xhrCore/_Exception.js']}"/>
                <script type="text/javascript" src="#{resource['js:/myfaces/_impl/xhrCore/_AjaxUtils.js']}"/>
                <script type="text/javascript" src="#{resource['js:/myfaces/_impl/xhrCore/_AjaxRequestQueue.js']}"/>
                <script type="text/javascript" src="#{resource['js:/myfaces/_impl/xhrCore/_AjaxRequest.js']}"/>
                <script type="text/javascript" src="#{resource['js:/myfaces/_impl/xhrCore/_AjaxResponse.js']}"/>
                <script type="text/javascript" src="#{resource['js:/myfaces/_impl/xhrCore/_xhrCoreAdapter.js']}"/>
                <script type="text/javascript" src="#{resource['js:/myfaces/_impl/core/jsf_impl.js']}"/>
                <script type="text/javascript" src="#{resource['js:/myfaces/api/jsf.js']}"/>
       </trh:head>
That includes the expanded scripts which are easier to debug than the compressed ones


> 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
>
> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-2654) Trinidad ajax-branch does not work with MyFaces2

Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12856068#action_12856068 ] 

Jakob Korherr commented on MYFACES-2654:
----------------------------------------

I just found the bug!! The problem is that MyFaces' ResponseSwitch is never enabled, because this happens on MyFaces' PartialViewContextImpl and Trinidad uses its own PartialViewContextImpl. I will fix this asap!

> 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
>
> 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

       

[jira] Commented: (MYFACES-2654) Trinidad ajax-branch does not work with MyFaces2

Posted by "Werner Punz (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12855411#action_12855411 ] 

Werner Punz commented on MYFACES-2654:
--------------------------------------

Thats pretty much all I can do on my side (the javascripts) somone has to debug
the lifecycle out on the server and check where the interruption happens.



> 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
>
> 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.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Commented: (MYFACES-2654) Trinidad ajax-branch does not work with MyFaces2

Posted by Werner Punz <we...@gmail.com>.
Ok from a script point of view ajax can be triggered from JSP, I am not 
entirely sure why Ajax should only work in the facelets part.
I cannot really see why.

The tags yes, they do not work, but you always can trigger the ajax part 
manually via jsf.ajax.request etc...
The partial request is determined, via a param sent with the ajax request.
And after all the partial processing itself also is view layer 
independend, or isn´t it?
I must be missing something here.


Werner


Am 09.04.10 22:04, schrieb Leonardo Uribe:
> Hi
>
> The problem is trinidad override PartialViewContext implementation, and
> on Render Response phase, the output is disabled. Myfaces
> PartialViewContextImpl enables it before render the output but trinidad
> doesn't know how to do that. Jira is down right now, so I'll put this
> comment as soon as is up again.
>
> Maybe this is a good time to get rid response switch code. I did a fast
> check to mojarra and as I expected they are not doing anything. The
> point is ajax in jsp case will not work, and this code only has sense on
> jsp case (because vdl.buildView trigger dispatch and in jsp that render
> unwanted code). Note there is no "standard" way to know if the current
> page is for jsp or not, so we don't have a way to enable this code only
> for jsp case.
>
> regards,
>
> Leonardo Uribe
>
> 2010/4/9 Max Starets <max.starets@oracle.com
> <ma...@oracle.com>>
>
>     Werner,
>
>     Thanks for the analysis. I don't think Myfaces is doing anything
>     wrong in this case -
>     our web.xml had javax.faces.FACELETS_VIEW_MAPPINGS mapped to *.jspx
>     asd well as *.xhtml
>
>     I committed the change to leave *.xhtml only.
>
>     I was unable to update the JIRA since Apache JIRA the site is down
>     at the moment.
>
>     Max
>
>
>     Werner Punz (JIRA) wrote:
>>          [https://issues.apache.org/jira/browse/MYFACES-2654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12855433#action_12855433  <https://issues.apache.org/jira/browse/MYFACES-2654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12855433#action_12855433>  ]
>>
>>     Werner Punz commented on MYFACES-2654:
>>     --------------------------------------
>>
>>     Ok I am not sure since I have not touched this area but the ViewDeclarationFactoryImpl returns a Facelets View declaration on the files passed by the demos, but those files are clearly  jspx files.
>>     The reason for this is that our default factory checks for facelets first and has as allowed pattern jspx.
>>     The files however are clearly not facelets!
>>     Hence the wrong View Declaration Language is returned, this could be the reason why the rendering is never triggered on the partial rendering (I still wonder why it renders at all in the normal case)
>>     In either way the problem is somewhere in the partial processing part of myfaces!
>>     I will forward this problem to Leonardo.
>>
>>
>>
>>>     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
>>>
>>>     run the demo (like via Jetty):
>>>     Go to"http://localhost:8080/trinidad-demo/faces/demos/pprDemos.jspx"  <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
>>>
>>
>
>



Re: [jira] Commented: (MYFACES-2654) Trinidad ajax-branch does not work with MyFaces2

Posted by Werner Punz <we...@gmail.com>.
Am 09.04.10 22:04, schrieb Leonardo Uribe:
> rid response



Re: [jira] Commented: (MYFACES-2654) Trinidad ajax-branch does not work with MyFaces2

Posted by Leonardo Uribe <lu...@gmail.com>.
Hi

The problem is trinidad override PartialViewContext implementation, and on
Render Response phase, the output is disabled. Myfaces
PartialViewContextImpl enables it before render the output but trinidad
doesn't know how to do that. Jira is down right now, so I'll put this
comment as soon as is up again.

Maybe this is a good time to get rid response switch code. I did a fast
check to mojarra and as I expected they are not doing anything. The point is
ajax in jsp case will not work, and this code only has sense on jsp case
(because vdl.buildView trigger dispatch and in jsp that render unwanted
code). Note there is no "standard" way to know if the current page is for
jsp or not, so we don't have a way to enable this code only for jsp case.

regards,

Leonardo Uribe

2010/4/9 Max Starets <ma...@oracle.com>

>  Werner,
>
> Thanks for the analysis. I don't think Myfaces is doing anything wrong in
> this case -
> our web.xml had javax.faces.FACELETS_VIEW_MAPPINGS mapped to *.jspx asd
> well as *.xhtml
>
> I committed the change to leave *.xhtml only.
>
> I was unable to update the JIRA since Apache JIRA the site is down at the
> moment.
>
> Max
>
>
> Werner Punz (JIRA) wrote:
>
>     [ https://issues.apache.org/jira/browse/MYFACES-2654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12855433#action_12855433 ]
>
> Werner Punz commented on MYFACES-2654:
> --------------------------------------
>
> Ok I am not sure since I have not touched this area but the ViewDeclarationFactoryImpl returns a Facelets View declaration on the files passed by the demos, but those files are clearly  jspx files.
> The reason for this is that our default factory checks for facelets first and has as allowed pattern jspx.
> The files however are clearly not facelets!
> Hence the wrong View Declaration Language is returned, this could be the reason why the rendering is never triggered on the partial rendering (I still wonder why it renders at all in the normal case)
> In either way the problem is somewhere in the partial processing part of myfaces!
> I will forward this problem to Leonardo.
>
>
>
>
>  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
>
> run the demo (like via Jetty):
> Go to "http://localhost:8080/trinidad-demo/faces/demos/pprDemos.jspx" <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
>
>
>
>

[jira] Commented: (MYFACES-2654) Trinidad ajax-branch does not work with MyFaces2

Posted by "Werner Punz (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12855433#action_12855433 ] 

Werner Punz commented on MYFACES-2654:
--------------------------------------

Ok I am not sure since I have not touched this area but the ViewDeclarationFactoryImpl returns a Facelets View declaration on the files passed by the demos, but those files are clearly  jspx files.
The reason for this is that our default factory checks for facelets first and has as allowed pattern jspx.
The files however are clearly not facelets!
Hence the wrong View Declaration Language is returned, this could be the reason why the rendering is never triggered on the partial rendering (I still wonder why it renders at all in the normal case)
In either way the problem is somewhere in the partial processing part of myfaces!
I will forward this problem to Leonardo.


> 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
>
> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-2654) Trinidad ajax-branch does not work with MyFaces2

Posted by "Werner Punz (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12856920#action_12856920 ] 

Werner Punz commented on MYFACES-2654:
--------------------------------------

Ok I did a quick testrun here on my testing setup against the latest myfaces trunk and it works here for me.
Tested on Firefox and Safari.
1-2 ppr cases do not work but about 95% of the page works with ppr, which browser did fail?
We might have a small javascript issue here which might be triggered on a certain browser version.



> 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
>          Components: JSR-314
>    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
>            Assignee: Leonardo Uribe
>             Fix For: 2.0.0
>
>         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

       

[jira] Commented: (MYFACES-2654) Trinidad ajax-branch does not work with MyFaces2

Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12856051#action_12856051 ] 

Jakob Korherr commented on MYFACES-2654:
----------------------------------------

Since I worked on the last problem related to trinidad's ajax branch, I still have the environment in place and I will take a look at it!

> 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
>
> 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

       

[jira] Issue Comment Edited: (MYFACES-2654) Trinidad ajax-branch does not work with MyFaces2

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12856085#action_12856085 ] 

Leonardo Uribe edited comment on MYFACES-2654 at 4/12/10 2:03 PM:
------------------------------------------------------------------

Yes, we know that. This was my last post on dev list:

".....The problem is trinidad override PartialViewContext implementation, and on Render Response phase, the output is disabled. Myfaces PartialViewContextImpl enables it before render the output but trinidad doesn't know how to do that. Jira is down right now, so I'll put this comment as soon as is up again.

Maybe this is a good time to get rid response switch code. I did a fast check to mojarra and as I expected they are not doing anything. The point is ajax in jsp case will not work, and this code only has sense on jsp case (because vdl.buildView trigger dispatch and in jsp that render unwanted code). Note there is no "standard" way to know if the current page is for jsp or not, so we don't have a way to enable this code only for jsp case......."

I think it is possible to move the code from RenderResponseExecutor to jsp vld.buildView().

Max Starets says this:

"...Thanks for the analysis. I don't think Myfaces is doing anything wrong in this case -
our web.xml had javax.faces.FACELETS_VIEW_MAPPINGS mapped to *.jspx asd well as *.xhtml..."

So the problem is not the mapping. As I said before, the problem is trinidad overrides completely PartialViewContextImpl.

In this case, allow an implementation to override PartialViewContextImpl takes precedence over allow ajax work in jsp case, so as first solution the code should be removed.

      was (Author: lu4242):
    Yes, we know that. This was my last post on dev list:

".....The problem is trinidad override PartialViewContext implementation, and on Render Response phase, the output is disabled. Myfaces PartialViewContextImpl enables it before render the output but trinidad doesn't know how to do that. Jira is down right now, so I'll put this comment as soon as is up again.

Maybe this is a good time to get rid response switch code. I did a fast check to mojarra and as I expected they are not doing anything. The point is ajax in jsp case will not work, and this code only has sense on jsp case (because vdl.buildView trigger dispatch and in jsp that render unwanted code). Note there is no "standard" way to know if the current page is for jsp or not, so we don't have a way to enable this code only for jsp case......."

I think it is possible to move the code from RenderResponseExecutor to jsp vld.buildView().

Max Starets says this:

  
> 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
>
> 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

       

[jira] Commented: (MYFACES-2654) Trinidad ajax-branch does not work with MyFaces2

Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12856518#action_12856518 ] 

Jakob Korherr commented on MYFACES-2654:
----------------------------------------

OK, then I agree on committing your patch. 

We will see if this causes any future user problems with custom VDLs. We definitely have to keep this issue in our minds.

> 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

       

[jira] Resolved: (MYFACES-2654) Trinidad ajax-branch does not work with MyFaces2

Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-2654?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthias Weßendorf resolved MYFACES-2654.
-----------------------------------------

    Resolution: Fixed

actually...

I had some cache sitting on my browser...

However I noticed an issue with selectmanyListbox, will file a new ticket for that...

> 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
>          Components: JSR-314
>    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
>            Assignee: Leonardo Uribe
>             Fix For: 2.0.0
>
>         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

       

[jira] Commented: (MYFACES-2654) Trinidad ajax-branch does not work with MyFaces2

Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12856091#action_12856091 ] 

Jakob Korherr commented on MYFACES-2654:
----------------------------------------

Hi Leo,

Oh sorry, I did not see that...

Please do not remove the code, Mojarra also does response switching, although they have an error in their implementation, thus Trinidad works on Mojarra.

I already came up with a solution to this problem. I'll provide a patch and then we can talk about it!

> 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
>
> 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

       

[jira] Reopened: (MYFACES-2654) Trinidad ajax-branch does not work with MyFaces2

Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-2654?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthias Weßendorf reopened MYFACES-2654:
-----------------------------------------


does not work, check the mentioned Trinidad Ajax-branch and see it is failing

> 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
>          Components: JSR-314
>    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
>            Assignee: Leonardo Uribe
>             Fix For: 2.0.0
>
>         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

       

[jira] Commented: (MYFACES-2654) Trinidad ajax-branch does not work with MyFaces2

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12856286#action_12856286 ] 

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

On MYFACES-2654-2.patch there is an alternate solution for this issue. The idea is move the code to JspViewDeclarationLanguage.buildView(), then do some fixes on that method to allow it work correctly (trim everything ouside f:view). I tried the following example (using test-webapp):

<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<html>
    <head>
        <title>Hello World</title>
        <script type="text/javascript" src="/test-webapp/javax.faces.resource/jsf.js.jsf?ln=javax.faces"></script>
    </head>
    <body>
        <f:view>
           <h:form id="mainForm">
               <p>JSP Ajax Example...</p>
               <h:panelGrid columns="2">
                   <h:outputLabel for="outname" value="Name: " />
                   <h:outputText id="outname" value="#{helloWorld.name}"/>
                   <h:outputLabel for="inname" value="Please enter your name" />
                   <h:inputText id="inname" value="#{helloWorld.name}"/>
                   <h:commandButton type="button" value="Ajax Update" 
                       onclick="jsf.ajax.request(this, event, {execute:'mainForm',render: 'mainForm:outname'}); return false;"/>
                   <h:commandButton value="Normal Submit"/>
                   <h:messages showDetail="true" showSummary="false"/>
               </h:panelGrid>
           </h:form>
        </f:view>
    </body>
</html>

And it works!. Note the same example with RI will not work. I think it is possible create a component for render script links in jsp, but with a different behavior as h:outputScript, because relocation in jsp is just not possible, for do not use the script markup on top.

If no objections I'll commit this code very soon.

> 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.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

       

[jira] Commented: (MYFACES-2654) Trinidad ajax-branch does not work with MyFaces2

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ 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

       

[jira] Commented: (MYFACES-2654) Trinidad ajax-branch does not work with MyFaces2

Posted by "Werner Punz (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12855397#action_12855397 ] 

Werner Punz commented on MYFACES-2654:
--------------------------------------

Hi I am investigating this problem so far the data sent down the xhr chain looks pretty sane to me, but it looks like the responsewriter data is not a valid xml and hence the response queue stops early.
Seems like the demos trigger a server error somewhere, still investigating though.


> 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
>
> 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.
-
You can reply to this email to add a comment to the issue online.