[ https://issues.apache.org/jira/browse/MYFACES-4680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17879991#comment-17879991 ]
Volodymyr Siedlecki edited comment on MYFACES-4680 at 9/7/24 1:46 AM: ---------------------------------------------------------------------- This looks like a server side script generation issue – I will look into it see what kind of fix I can provide. https://github.com/apache/myfaces/blob/4.1.x/impl/src/main/java/org/apache/myfaces/push/WebsocketComponentRenderer.java#L237 was (Author: volosied): This looks like a server side script generation issue – I will look into it see what kind of fix I can provide. > 4.1 TCK Failure: Spec1396IT#testViewScopedWebsocket > --------------------------------------------------- > > Key: MYFACES-4680 > URL: https://issues.apache.org/jira/browse/MYFACES-4680 > Project: MyFaces Core > Issue Type: Bug > Affects Versions: 2.2.15, 2.3.10, 2.3-next-M8, 4.0.0, 4.1.0-RC2 > Reporter: Volodymyr Siedlecki > Assignee: Volodymyr Siedlecki > Priority: Major > Attachments: test-faces23-websocket.war > > > Ajax requests do not occur when they are registered a websocket tag, from > what I could gather. It seems like the renderAjaxOutput behavior isn't > registered with the faces.push.init script. > MyFaces generated code (see behavior param (1) – second to last): > <script><!-- > faces.push.init('j_id_a','/test-faces23-websocket/jakarta.faces.push/user?7d67dec51e155ff40267fab691468b7b','user',function()\{document.getElementById('opened').innerHTML='yes';},function(message)\{document.getElementById('message').innerHTML=message;},null,null,{*}{}{*},true); > //--></script> > Facelet: > [https://github.com/jakartaee/faces/blob/4.1.0-RELEASE/tck/faces23/websocket/src/main/webapp/spec1396ViewScopedWebsocket.xhtml#L39] > {code:java} > <f:websocket channel="view" scope="view" > onopen="function(){document.getElementById('opened').innerHTML='yes';}"> > <f:ajax event="renderAjaxOutput" render="ajaxOutput" /> > </f:websocket>{code} > Link to Test: > [https://github.com/jakartaee/faces/blob/4.1.0-RELEASE/tck/faces23/websocket/src/test/java/ee/jakarta/tck/faces/test/javaee8/websocket/Spec1396IT.java#L94] > I test the same TCK app on Mojarra, and it sends out two XHR requests when > the button is clicked. One for the button click and another for the > renderAjaxOutput event. > MyFaces only handle the XHR for the button click. > Docs: > [1) > https://jakarta.ee/specifications/faces/4.0/jsdoc/faces.push|https://jakarta.ee/specifications/faces/4.0/jsdoc/faces.push] -- This message was sent by Atlassian Jira (v8.20.10#820010)