Log Message: |
https://issues.apache.org/jira/browse/MYFACES-2599
Ok the issue cannot fully be resolved on this level since mojarra has some bypass code added and has bent the spec probably as well. But I added some helper code which can ease the integration. If a second element is present in our form which has the name of the original one
a form now can be determined cleanly and no error is thrown anymore.
Following code now works and still everything should be spec compliant:
<h:form id="testForm">
<h:inputText id="test" value="#{myBean.test}">
<f:ajax render="test2"/>
</h:inputText>
<input type="text" name="testForm:test" value="ccc" />
<h:inputText id="test2" value="#{myBean.test}"/>
</h:form>
<script type="text/javascript">
//<![CDATA[
var myTest = document.getElementById("testForm:test");
myTest.parentNode.removeChild(myTest);
myTest.onchange();
//]]>
</script>
That is what pretty much all component sets do, they replace their original elements either with one with the same identifier or with one with a different identifer and the same name, I simulated that by keeping an element with the same name under the form.
(same identifier never have been a problem but normally it is same name, different identifier and the original element is detached)
|