ajax form parameter collection erroneously submits nameless inputs by their id
------------------------------------------------------------------------------
Key: MYFACES-2847
URL: https://issues.apache.org/jira/browse/MYFACES-2847
Project: MyFaces Core
Issue Type: Bug
Components: JSR-314
Affects Versions: 2.0.1
Environment: AJAX Javascript
Reporter: Ganesh Jung
ajax form parameter collection erroneously submits nameless inputs by their id.
This form:
<h:form id="testForm" >
<h:panelGroup id="testGroup">
<h:inputText id="myTest" value="#{myBean.test}">
<f:ajax render="testGroup" />
</h:inputText>
<script type="text/javascript">
var node = document.getElementById("testForm:myTest");
node.name = null;
var newNode = document.createElement("input");
newNode.name = node.id;
node.parentNode.appendChild(newNode);
</script>
</h:panelGroup>
</h:form>
submits testForm:myTest two times, here's the POST body after filling x in the
second field, then y in the firtst field, then triggering AJAX by leaving the
first field:
testForm%3AmyTest=y&testForm%3AmyTest=x&testForm_SUBMIT=1&javax.faces.ViewState=oz6Aoi2KHAqmJJI7fOyCSJE3roA7LBpW2w%2FkX5zlIRqf8mwbQAPsaxhQH2d3lDSWBhNgY03GIEFjk%2Fln4A3MZ57dY6dKv3pXaAtvN4X1Hc6GTpwA&javax.faces.behavior.event=valueChange&javax.faces.partial.event=change&javax.faces.source=testForm%3AmyTest&javax.faces.partial.ajax=true&javax.faces.partial.execute=testForm%3AmyTest&javax.faces.partial.render=testForm%3AtestGroup
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.