[
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