myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Werner Punz (JIRA)" <...@myfaces.apache.org>
Subject [jira] Issue Comment Edited: (MYFACES-2847) ajax form parameter collection erroneously submits nameless inputs by their id
Date Fri, 30 Jul 2010 07:42:17 GMT

    [ https://issues.apache.org/jira/browse/MYFACES-2847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12893955#action_12893955
] 

Werner Punz edited comment on MYFACES-2847 at 7/30/10 3:40 AM:
---------------------------------------------------------------

This is an issue probably with an id fallback if a name is not sent, which does not take into
account that the component already might be parsed, I have to check what the browsers correctly
send in that case and do the encoding behavior accordingly.
I will fix that, this indeed is an issue on the client.

The issue might have been introduced in the cleanup,, but it could be older (the normal encoding
part was not too much touched by me), whatever it is I will fix it.


      was (Author: werpu):
    This is an issue probably with an id fallback if a name is not sent, which does not take
into account that the component already might be parsed, I have to check what the browsers
correctly send in that case and do the encoding behavior accordingly.
I will fix that, this indeed is an issue on the client.



  
> 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
>         Attachments: Test.war
>
>
> 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.


Mime
View raw message