[jira] [Commented] (MYFACES-4606) Missing source button id:value pair from request parameters in ajax requests

2023-11-24 Thread Werner Punz (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17789435#comment-17789435
 ] 

Werner Punz commented on MYFACES-4606:
--

Yes, sorry to answer so late, has been resolved this week!

 

> Missing source button id:value pair from request parameters in ajax requests
> 
>
> Key: MYFACES-4606
> URL: https://issues.apache.org/jira/browse/MYFACES-4606
> Project: MyFaces Core
>  Issue Type: Improvement
>Affects Versions: 2.0.24, 2.2.15, 2.3.10, 3.0.2, 2.3-next-M8, 4.0.1
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Fix For: 2.3.11, 3.0.3, 2.2.16, 4.0.2
>
>
>  When the non-ajax submit button is pressed, its id and value is sent as a 
> request parameter.  If the ajax equivalent button is pressed, the id-value 
> pair is missing.  However, the id is included under the "javax.faces.source" 
> attribute, per the spec. 
> This becomes a problem if you do some param checks (via binding attr.) to see 
> if a particular button is pressed. See more info about this here: 
> [https://stackoverflow.com/a/14730658/11402059]
> Here's a sample of the behaviors for ajax and non ajax submissions.  The 
> required parts are in red (which should appear in both requests):
> {code:java}
> 
>  Ajax Checkboxes: 
>  
>     
>     
> 
> Message for ajaxCheckbox -> 
> 
>  Non-Ajax Checkboxes: 
>  
>     
>     
> 
> Message for nonajaxCheckbox -> : 
> 
> 
> 
>      
> 
>  binding="#{nonajaxbtn}"/>
> 
>       value="#{entry.key}" /> : 
> 
> 
> {code}
>  
> It used to work in 2.0, but now fails after refactoring.  Haven't tested on 
> 4.0, but I think it's also affected.
> 2.3.x: 
> [https://github.com/apache/myfaces/blob/2.3.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L38-L63]
>  
>  
> 2.0.5: 
> [https://github.com/apache/myfaces/blob/myfaces-core-project-2.0.5/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L57]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MYFACES-4606) Missing source button id:value pair from request parameters in ajax requests

2023-11-22 Thread Volodymyr Siedlecki (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17788798#comment-17788798
 ] 

Volodymyr Siedlecki commented on MYFACES-4606:
--

I believe so. Closing

> Missing source button id:value pair from request parameters in ajax requests
> 
>
> Key: MYFACES-4606
> URL: https://issues.apache.org/jira/browse/MYFACES-4606
> Project: MyFaces Core
>  Issue Type: Improvement
>Affects Versions: 2.0.24, 2.2.15, 2.3.10, 3.0.2, 2.3-next-M8, 4.0.1
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Fix For: 2.3.11, 3.0.3, 2.2.16, 4.0.2
>
>
>  When the non-ajax submit button is pressed, its id and value is sent as a 
> request parameter.  If the ajax equivalent button is pressed, the id-value 
> pair is missing.  However, the id is included under the "javax.faces.source" 
> attribute, per the spec. 
> This becomes a problem if you do some param checks (via binding attr.) to see 
> if a particular button is pressed. See more info about this here: 
> [https://stackoverflow.com/a/14730658/11402059]
> Here's a sample of the behaviors for ajax and non ajax submissions.  The 
> required parts are in red (which should appear in both requests):
> {code:java}
> 
>  Ajax Checkboxes: 
>  
>     
>     
> 
> Message for ajaxCheckbox -> 
> 
>  Non-Ajax Checkboxes: 
>  
>     
>     
> 
> Message for nonajaxCheckbox -> : 
> 
> 
> 
>      
> 
>  binding="#{nonajaxbtn}"/>
> 
>       value="#{entry.key}" /> : 
> 
> 
> {code}
>  
> It used to work in 2.0, but now fails after refactoring.  Haven't tested on 
> 4.0, but I think it's also affected.
> 2.3.x: 
> [https://github.com/apache/myfaces/blob/2.3.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L38-L63]
>  
>  
> 2.0.5: 
> [https://github.com/apache/myfaces/blob/myfaces-core-project-2.0.5/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L57]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MYFACES-4606) Missing source button id:value pair from request parameters in ajax requests

2023-11-22 Thread Thomas Andraschko (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17788716#comment-17788716
 ] 

Thomas Andraschko commented on MYFACES-4606:


we are done with this now?

> Missing source button id:value pair from request parameters in ajax requests
> 
>
> Key: MYFACES-4606
> URL: https://issues.apache.org/jira/browse/MYFACES-4606
> Project: MyFaces Core
>  Issue Type: Improvement
>Affects Versions: 2.0.24, 2.2.15, 2.3.10, 3.0.2, 2.3-next-M8, 4.0.1
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Fix For: 2.3.11, 3.0.3, 2.2.16, 4.0.2
>
>
>  When the non-ajax submit button is pressed, its id and value is sent as a 
> request parameter.  If the ajax equivalent button is pressed, the id-value 
> pair is missing.  However, the id is included under the "javax.faces.source" 
> attribute, per the spec. 
> This becomes a problem if you do some param checks (via binding attr.) to see 
> if a particular button is pressed. See more info about this here: 
> [https://stackoverflow.com/a/14730658/11402059]
> Here's a sample of the behaviors for ajax and non ajax submissions.  The 
> required parts are in red (which should appear in both requests):
> {code:java}
> 
>  Ajax Checkboxes: 
>  
>     
>     
> 
> Message for ajaxCheckbox -> 
> 
>  Non-Ajax Checkboxes: 
>  
>     
>     
> 
> Message for nonajaxCheckbox -> : 
> 
> 
> 
>      
> 
>  binding="#{nonajaxbtn}"/>
> 
>       value="#{entry.key}" /> : 
> 
> 
> {code}
>  
> It used to work in 2.0, but now fails after refactoring.  Haven't tested on 
> 4.0, but I think it's also affected.
> 2.3.x: 
> [https://github.com/apache/myfaces/blob/2.3.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L38-L63]
>  
>  
> 2.0.5: 
> [https://github.com/apache/myfaces/blob/myfaces-core-project-2.0.5/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L57]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MYFACES-4606) Missing source button id:value pair from request parameters in ajax requests

2023-10-13 Thread Werner Punz (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17775044#comment-17775044
 ] 

Werner Punz commented on MYFACES-4606:
--

Pull request opened [https://github.com/apache/myfaces/pull/630]

you can check it, I will merge on monday, unless someone else wants to do it!

 

 

> Missing source button id:value pair from request parameters in ajax requests
> 
>
> Key: MYFACES-4606
> URL: https://issues.apache.org/jira/browse/MYFACES-4606
> Project: MyFaces Core
>  Issue Type: Improvement
>Affects Versions: 2.0.24, 2.2.15, 2.3.10, 3.0.2, 2.3-next-M8, 4.0.1
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Fix For: 2.3.11, 3.0.3, 2.2.16, 4.0.2
>
>
>  When the non-ajax submit button is pressed, its id and value is sent as a 
> request parameter.  If the ajax equivalent button is pressed, the id-value 
> pair is missing.  However, the id is included under the "javax.faces.source" 
> attribute, per the spec. 
> This becomes a problem if you do some param checks (via binding attr.) to see 
> if a particular button is pressed. See more info about this here: 
> [https://stackoverflow.com/a/14730658/11402059]
> Here's a sample of the behaviors for ajax and non ajax submissions.  The 
> required parts are in red (which should appear in both requests):
> {code:java}
> 
>  Ajax Checkboxes: 
>  
>     
>     
> 
> Message for ajaxCheckbox -> 
> 
>  Non-Ajax Checkboxes: 
>  
>     
>     
> 
> Message for nonajaxCheckbox -> : 
> 
> 
> 
>      
> 
>  binding="#{nonajaxbtn}"/>
> 
>       value="#{entry.key}" /> : 
> 
> 
> {code}
>  
> It used to work in 2.0, but now fails after refactoring.  Haven't tested on 
> 4.0, but I think it's also affected.
> 2.3.x: 
> [https://github.com/apache/myfaces/blob/2.3.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L38-L63]
>  
>  
> 2.0.5: 
> [https://github.com/apache/myfaces/blob/myfaces-core-project-2.0.5/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L57]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MYFACES-4606) Missing source button id:value pair from request parameters in ajax requests

2023-10-12 Thread Werner Punz (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17774670#comment-17774670
 ] 

Werner Punz commented on MYFACES-4606:
--

Ok I checked the old code, the old code does not have this problem because only 
buttons and submits are appended (we might add hrefs in the long run if 
requested)

So I can roll a new jsf_ts release tomorrow and pull the changes in.

The fix is more or less that I basically do not append a checkbox or radio 
button as issuing element if it is unchecked (hence the value is not appended 
then)

Since the mechanism is needed mostly for buttons anyway (and hrefs), it should 
be ok to have this behavior!

 

> Missing source button id:value pair from request parameters in ajax requests
> 
>
> Key: MYFACES-4606
> URL: https://issues.apache.org/jira/browse/MYFACES-4606
> Project: MyFaces Core
>  Issue Type: Improvement
>Affects Versions: 2.0.24, 2.2.15, 2.3.10, 3.0.2, 2.3-next-M8, 4.0.1
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Fix For: 2.3.11, 3.0.3, 2.2.16, 4.0.2
>
>
>  When the non-ajax submit button is pressed, its id and value is sent as a 
> request parameter.  If the ajax equivalent button is pressed, the id-value 
> pair is missing.  However, the id is included under the "javax.faces.source" 
> attribute, per the spec. 
> This becomes a problem if you do some param checks (via binding attr.) to see 
> if a particular button is pressed. See more info about this here: 
> [https://stackoverflow.com/a/14730658/11402059]
> Here's a sample of the behaviors for ajax and non ajax submissions.  The 
> required parts are in red (which should appear in both requests):
> {code:java}
> 
>  Ajax Checkboxes: 
>  
>     
>     
> 
> Message for ajaxCheckbox -> 
> 
>  Non-Ajax Checkboxes: 
>  
>     
>     
> 
> Message for nonajaxCheckbox -> : 
> 
> 
> 
>      
> 
>  binding="#{nonajaxbtn}"/>
> 
>       value="#{entry.key}" /> : 
> 
> 
> {code}
>  
> It used to work in 2.0, but now fails after refactoring.  Haven't tested on 
> 4.0, but I think it's also affected.
> 2.3.x: 
> [https://github.com/apache/myfaces/blob/2.3.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L38-L63]
>  
>  
> 2.0.5: 
> [https://github.com/apache/myfaces/blob/myfaces-core-project-2.0.5/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L57]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MYFACES-4606) Missing source button id:value pair from request parameters in ajax requests

2023-10-11 Thread Werner Punz (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17774160#comment-17774160
 ] 

Werner Punz commented on MYFACES-4606:
--

I have it working for the new codebase, the old one I have not had time to fix 
it, will be done by end of the week!

 

> Missing source button id:value pair from request parameters in ajax requests
> 
>
> Key: MYFACES-4606
> URL: https://issues.apache.org/jira/browse/MYFACES-4606
> Project: MyFaces Core
>  Issue Type: Improvement
>Affects Versions: 2.0.24, 2.2.15, 2.3.10, 3.0.2, 2.3-next-M8, 4.0.1
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Fix For: 2.3.11, 3.0.3, 2.2.16, 4.0.2
>
>
>  When the non-ajax submit button is pressed, its id and value is sent as a 
> request parameter.  If the ajax equivalent button is pressed, the id-value 
> pair is missing.  However, the id is included under the "javax.faces.source" 
> attribute, per the spec. 
> This becomes a problem if you do some param checks (via binding attr.) to see 
> if a particular button is pressed. See more info about this here: 
> [https://stackoverflow.com/a/14730658/11402059]
> Here's a sample of the behaviors for ajax and non ajax submissions.  The 
> required parts are in red (which should appear in both requests):
> {code:java}
> 
>  Ajax Checkboxes: 
>  
>     
>     
> 
> Message for ajaxCheckbox -> 
> 
>  Non-Ajax Checkboxes: 
>  
>     
>     
> 
> Message for nonajaxCheckbox -> : 
> 
> 
> 
>      
> 
>  binding="#{nonajaxbtn}"/>
> 
>       value="#{entry.key}" /> : 
> 
> 
> {code}
>  
> It used to work in 2.0, but now fails after refactoring.  Haven't tested on 
> 4.0, but I think it's also affected.
> 2.3.x: 
> [https://github.com/apache/myfaces/blob/2.3.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L38-L63]
>  
>  
> 2.0.5: 
> [https://github.com/apache/myfaces/blob/myfaces-core-project-2.0.5/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L57]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MYFACES-4606) Missing source button id:value pair from request parameters in ajax requests

2023-10-11 Thread Volodymyr Siedlecki (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17774136#comment-17774136
 ] 

Volodymyr Siedlecki commented on MYFACES-4606:
--

[~werpu] Any updates?

> Missing source button id:value pair from request parameters in ajax requests
> 
>
> Key: MYFACES-4606
> URL: https://issues.apache.org/jira/browse/MYFACES-4606
> Project: MyFaces Core
>  Issue Type: Improvement
>Affects Versions: 2.0.24, 2.2.15, 2.3.10, 3.0.2, 2.3-next-M8, 4.0.1
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Fix For: 2.3.11, 3.0.3, 2.2.16, 4.0.2
>
>
>  When the non-ajax submit button is pressed, its id and value is sent as a 
> request parameter.  If the ajax equivalent button is pressed, the id-value 
> pair is missing.  However, the id is included under the "javax.faces.source" 
> attribute, per the spec. 
> This becomes a problem if you do some param checks (via binding attr.) to see 
> if a particular button is pressed. See more info about this here: 
> [https://stackoverflow.com/a/14730658/11402059]
> Here's a sample of the behaviors for ajax and non ajax submissions.  The 
> required parts are in red (which should appear in both requests):
> {code:java}
> 
>  Ajax Checkboxes: 
>  
>     
>     
> 
> Message for ajaxCheckbox -> 
> 
>  Non-Ajax Checkboxes: 
>  
>     
>     
> 
> Message for nonajaxCheckbox -> : 
> 
> 
> 
>      
> 
>  binding="#{nonajaxbtn}"/>
> 
>       value="#{entry.key}" /> : 
> 
> 
> {code}
>  
> It used to work in 2.0, but now fails after refactoring.  Haven't tested on 
> 4.0, but I think it's also affected.
> 2.3.x: 
> [https://github.com/apache/myfaces/blob/2.3.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L38-L63]
>  
>  
> 2.0.5: 
> [https://github.com/apache/myfaces/blob/myfaces-core-project-2.0.5/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L57]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MYFACES-4606) Missing source button id:value pair from request parameters in ajax requests

2023-10-05 Thread Werner Punz (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17772292#comment-17772292
 ] 

Werner Punz commented on MYFACES-4606:
--

Working on it, only checkboxes and radio buttons are affected by this problem.

I will need to roll another small jsf_ts bugfix script for it, the fix is 
minor, I just check the type and exclude the appendIssuingItem in this case. 
Given that the behavior is needed for links or buttons only anyway, I can live 
with this small inconsistency!

 

> Missing source button id:value pair from request parameters in ajax requests
> 
>
> Key: MYFACES-4606
> URL: https://issues.apache.org/jira/browse/MYFACES-4606
> Project: MyFaces Core
>  Issue Type: Improvement
>Affects Versions: 2.0.24, 2.2.15, 2.3.10, 3.0.2, 2.3-next-M8, 4.0.1
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Fix For: 2.3.11, 3.0.3, 2.2.16, 4.0.2
>
>
>  When the non-ajax submit button is pressed, its id and value is sent as a 
> request parameter.  If the ajax equivalent button is pressed, the id-value 
> pair is missing.  However, the id is included under the "javax.faces.source" 
> attribute, per the spec. 
> This becomes a problem if you do some param checks (via binding attr.) to see 
> if a particular button is pressed. See more info about this here: 
> [https://stackoverflow.com/a/14730658/11402059]
> Here's a sample of the behaviors for ajax and non ajax submissions.  The 
> required parts are in red (which should appear in both requests):
> {code:java}
> 
>  Ajax Checkboxes: 
>  
>     
>     
> 
> Message for ajaxCheckbox -> 
> 
>  Non-Ajax Checkboxes: 
>  
>     
>     
> 
> Message for nonajaxCheckbox -> : 
> 
> 
> 
>      
> 
>  binding="#{nonajaxbtn}"/>
> 
>       value="#{entry.key}" /> : 
> 
> 
> {code}
>  
> It used to work in 2.0, but now fails after refactoring.  Haven't tested on 
> 4.0, but I think it's also affected.
> 2.3.x: 
> [https://github.com/apache/myfaces/blob/2.3.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L38-L63]
>  
>  
> 2.0.5: 
> [https://github.com/apache/myfaces/blob/myfaces-core-project-2.0.5/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L57]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MYFACES-4606) Missing source button id:value pair from request parameters in ajax requests

2023-10-02 Thread Werner Punz (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17771244#comment-17771244
 ] 

Werner Punz commented on MYFACES-4606:
--

Will look at this.

 

 

> Missing source button id:value pair from request parameters in ajax requests
> 
>
> Key: MYFACES-4606
> URL: https://issues.apache.org/jira/browse/MYFACES-4606
> Project: MyFaces Core
>  Issue Type: Improvement
>Affects Versions: 2.0.24, 2.2.15, 2.3.10, 3.0.2, 2.3-next-M8, 4.0.1
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Fix For: 2.3.11, 3.0.3, 2.2.16, 4.0.2
>
>
>  When the non-ajax submit button is pressed, its id and value is sent as a 
> request parameter.  If the ajax equivalent button is pressed, the id-value 
> pair is missing.  However, the id is included under the "javax.faces.source" 
> attribute, per the spec. 
> This becomes a problem if you do some param checks (via binding attr.) to see 
> if a particular button is pressed. See more info about this here: 
> [https://stackoverflow.com/a/14730658/11402059]
> Here's a sample of the behaviors for ajax and non ajax submissions.  The 
> required parts are in red (which should appear in both requests):
> {code:java}
> 
>  Ajax Checkboxes: 
>  
>     
>     
> 
> Message for ajaxCheckbox -> 
> 
>  Non-Ajax Checkboxes: 
>  
>     
>     
> 
> Message for nonajaxCheckbox -> : 
> 
> 
> 
>      
> 
>  binding="#{nonajaxbtn}"/>
> 
>       value="#{entry.key}" /> : 
> 
> 
> {code}
>  
> It used to work in 2.0, but now fails after refactoring.  Haven't tested on 
> 4.0, but I think it's also affected.
> 2.3.x: 
> [https://github.com/apache/myfaces/blob/2.3.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L38-L63]
>  
>  
> 2.0.5: 
> [https://github.com/apache/myfaces/blob/myfaces-core-project-2.0.5/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L57]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MYFACES-4606) Missing source button id:value pair from request parameters in ajax requests

2023-10-02 Thread Volodymyr Siedlecki (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17771242#comment-17771242
 ] 

Volodymyr Siedlecki commented on MYFACES-4606:
--

Hi, [~werpu]. We discovered a TCK failures after pulling this fix in 4.0.

[https://github.com/jakartaee/faces/blob/master/tck/faces22/ajax/src/test/java/ee/jakarta/tck/faces/test/servlet30/ajax_selenium/Issue2255IT.java#L48C44-L48C44]


My investigation showed that 
`[divInComposite.xhtml`|https://github.com/jakartaee/faces/blob/4c5e8faab21db7edb9e32423bba056c06a0e3082/tck/faces22/ajax/src/main/webapp/divInComposite.xhtml#L26]
 contains a boolean checkbox and we should not submit a value here. 

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox
Note: If a checkbox is unchecked when its form is submitted, neither the name 
nor the value is submitted to the server. There is no HTML-only method of 
representing a checkbox's unchecked state (e.g. value=unchecked). If you wanted 
to submit a default value for the checkbox when it is unchecked, you could 
include JavaScript to create a  within the form with a 
value indicating an unchecked state.


I'm wondering if checkbox is only exception? We may need a few checks here 
before appending the issuing element.


Would you mind looking at this? Thank you.

> Missing source button id:value pair from request parameters in ajax requests
> 
>
> Key: MYFACES-4606
> URL: https://issues.apache.org/jira/browse/MYFACES-4606
> Project: MyFaces Core
>  Issue Type: Improvement
>Affects Versions: 2.0.24, 2.2.15, 2.3.10, 3.0.2, 2.3-next-M8, 4.0.1
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Fix For: 2.3.11, 3.0.3, 2.2.16, 4.0.2
>
>
>  When the non-ajax submit button is pressed, its id and value is sent as a 
> request parameter.  If the ajax equivalent button is pressed, the id-value 
> pair is missing.  However, the id is included under the "javax.faces.source" 
> attribute, per the spec. 
> This becomes a problem if you do some param checks (via binding attr.) to see 
> if a particular button is pressed. See more info about this here: 
> [https://stackoverflow.com/a/14730658/11402059]
> Here's a sample of the behaviors for ajax and non ajax submissions.  The 
> required parts are in red (which should appear in both requests):
> {code:java}
> 
>  Ajax Checkboxes: 
>  
>     
>     
> 
> Message for ajaxCheckbox -> 
> 
>  Non-Ajax Checkboxes: 
>  
>     
>     
> 
> Message for nonajaxCheckbox -> : 
> 
> 
> 
>      
> 
>  binding="#{nonajaxbtn}"/>
> 
>       value="#{entry.key}" /> : 
> 
> 
> {code}
>  
> It used to work in 2.0, but now fails after refactoring.  Haven't tested on 
> 4.0, but I think it's also affected.
> 2.3.x: 
> [https://github.com/apache/myfaces/blob/2.3.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L38-L63]
>  
>  
> 2.0.5: 
> [https://github.com/apache/myfaces/blob/myfaces-core-project-2.0.5/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L57]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MYFACES-4606) Missing source button id:value pair from request parameters in ajax requests

2023-06-13 Thread Volodymyr Siedlecki (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17732247#comment-17732247
 ] 

Volodymyr Siedlecki commented on MYFACES-4606:
--

Thank you again! :)

> Missing source button id:value pair from request parameters in ajax requests
> 
>
> Key: MYFACES-4606
> URL: https://issues.apache.org/jira/browse/MYFACES-4606
> Project: MyFaces Core
>  Issue Type: Improvement
>Affects Versions: 2.0.24, 2.2.15, 2.3.10, 3.0.2, 2.3-next-M8, 4.0.1
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
>
>  When the non-ajax submit button is pressed, its id and value is sent as a 
> request parameter.  If the ajax equivalent button is pressed, the id-value 
> pair is missing.  However, the id is included under the "javax.faces.source" 
> attribute, per the spec. 
> This becomes a problem if you do some binding checks to see if a particular 
> button is pressed. See the link: 
> [https://stackoverflow.com/a/14730658/11402059]
> Here's a sample of the behaviors for ajax and non ajax submissions.  The 
> required parts are in red (which should appear in both requests):
> {code:java}
> 
>  Ajax Checkboxes: 
>  
>     
>     
> 
> Message for ajaxCheckbox -> 
> 
>  Non-Ajax Checkboxes: 
>  
>     
>     
> 
> Message for nonajaxCheckbox -> : 
> 
> 
> 
>      
> 
>  binding="#{nonajaxbtn}"/>
> 
>       value="#{entry.key}" /> : 
> 
> 
> {code}
>  
> It used to work in 2.0, but now fails after refactoring.  Haven't tested on 
> 4.0, but I think it's also affected.
> 2.3.x: 
> [https://github.com/apache/myfaces/blob/2.3.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L38-L63]
>  
>  
> 2.0.5: 
> [https://github.com/apache/myfaces/blob/myfaces-core-project-2.0.5/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L57]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MYFACES-4606) Missing source button id:value pair from request parameters in ajax requests

2023-06-13 Thread Werner Punz (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17732274#comment-17732274
 ] 

Werner Punz commented on MYFACES-4606:
--

Added the PR for 4.0 as well, I will check 2.2 tomorrow whether the issue is 
there as well.

 

> Missing source button id:value pair from request parameters in ajax requests
> 
>
> Key: MYFACES-4606
> URL: https://issues.apache.org/jira/browse/MYFACES-4606
> Project: MyFaces Core
>  Issue Type: Improvement
>Affects Versions: 2.0.24, 2.2.15, 2.3.10, 3.0.2, 2.3-next-M8, 4.0.1
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
>
>  When the non-ajax submit button is pressed, its id and value is sent as a 
> request parameter.  If the ajax equivalent button is pressed, the id-value 
> pair is missing.  However, the id is included under the "javax.faces.source" 
> attribute, per the spec. 
> This becomes a problem if you do some binding checks to see if a particular 
> button is pressed. See the link: 
> [https://stackoverflow.com/a/14730658/11402059]
> Here's a sample of the behaviors for ajax and non ajax submissions.  The 
> required parts are in red (which should appear in both requests):
> {code:java}
> 
>  Ajax Checkboxes: 
>  
>     
>     
> 
> Message for ajaxCheckbox -> 
> 
>  Non-Ajax Checkboxes: 
>  
>     
>     
> 
> Message for nonajaxCheckbox -> : 
> 
> 
> 
>      
> 
>  binding="#{nonajaxbtn}"/>
> 
>       value="#{entry.key}" /> : 
> 
> 
> {code}
>  
> It used to work in 2.0, but now fails after refactoring.  Haven't tested on 
> 4.0, but I think it's also affected.
> 2.3.x: 
> [https://github.com/apache/myfaces/blob/2.3.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L38-L63]
>  
>  
> 2.0.5: 
> [https://github.com/apache/myfaces/blob/myfaces-core-project-2.0.5/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L57]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MYFACES-4606) Missing source button id:value pair from request parameters in ajax requests

2023-06-13 Thread Werner Punz (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17732261#comment-17732261
 ] 

Werner Punz commented on MYFACES-4606:
--

I have issued pull requests for 2.3, 2.3-next and 3.0 but the new codebase also 
has the same issue. since it is getting late I will fix this tomorrow and issue 
also a pull request for 4.0.

I will merge all PRs tomorrow, feel free to jump ahead and merge tonight, if 
you want!

 

> Missing source button id:value pair from request parameters in ajax requests
> 
>
> Key: MYFACES-4606
> URL: https://issues.apache.org/jira/browse/MYFACES-4606
> Project: MyFaces Core
>  Issue Type: Improvement
>Affects Versions: 2.0.24, 2.2.15, 2.3.10, 3.0.2, 2.3-next-M8, 4.0.1
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
>
>  When the non-ajax submit button is pressed, its id and value is sent as a 
> request parameter.  If the ajax equivalent button is pressed, the id-value 
> pair is missing.  However, the id is included under the "javax.faces.source" 
> attribute, per the spec. 
> This becomes a problem if you do some binding checks to see if a particular 
> button is pressed. See the link: 
> [https://stackoverflow.com/a/14730658/11402059]
> Here's a sample of the behaviors for ajax and non ajax submissions.  The 
> required parts are in red (which should appear in both requests):
> {code:java}
> 
>  Ajax Checkboxes: 
>  
>     
>     
> 
> Message for ajaxCheckbox -> 
> 
>  Non-Ajax Checkboxes: 
>  
>     
>     
> 
> Message for nonajaxCheckbox -> : 
> 
> 
> 
>      
> 
>  binding="#{nonajaxbtn}"/>
> 
>       value="#{entry.key}" /> : 
> 
> 
> {code}
>  
> It used to work in 2.0, but now fails after refactoring.  Haven't tested on 
> 4.0, but I think it's also affected.
> 2.3.x: 
> [https://github.com/apache/myfaces/blob/2.3.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L38-L63]
>  
>  
> 2.0.5: 
> [https://github.com/apache/myfaces/blob/myfaces-core-project-2.0.5/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L57]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MYFACES-4606) Missing source button id:value pair from request parameters in ajax requests

2023-06-13 Thread Werner Punz (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17732240#comment-17732240
 ] 

Werner Punz commented on MYFACES-4606:
--

Found the issue, apparently the branches up to 3.0 still have quirks browser 
support and the getFormData in the AjaxRequestQuirks rightfully calls 
getViewState as per defined by the spec but then omits the append the issuing 
item.

The name was set, but I added the id and name just in case and extended also 
the issuing item detection to submit and button, that should cover all cases 
properly!

 

> Missing source button id:value pair from request parameters in ajax requests
> 
>
> Key: MYFACES-4606
> URL: https://issues.apache.org/jira/browse/MYFACES-4606
> Project: MyFaces Core
>  Issue Type: Improvement
>Affects Versions: 2.0.24, 2.2.15, 2.3.10, 3.0.2, 2.3-next-M8, 4.0.1
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
>
>  When the non-ajax submit button is pressed, its id and value is sent as a 
> request parameter.  If the ajax equivalent button is pressed, the id-value 
> pair is missing.  However, the id is included under the "javax.faces.source" 
> attribute, per the spec. 
> This becomes a problem if you do some binding checks to see if a particular 
> button is pressed. See the link: 
> [https://stackoverflow.com/a/14730658/11402059]
> Here's a sample of the behaviors for ajax and non ajax submissions.  The 
> required parts are in red (which should appear in both requests):
> {code:java}
> 
>  Ajax Checkboxes: 
>  
>     
>     
> 
> Message for ajaxCheckbox -> 
> 
>  Non-Ajax Checkboxes: 
>  
>     
>     
> 
> Message for nonajaxCheckbox -> : 
> 
> 
> 
>      
> 
>  binding="#{nonajaxbtn}"/>
> 
>       value="#{entry.key}" /> : 
> 
> 
> {code}
>  
> It used to work in 2.0, but now fails after refactoring.  Haven't tested on 
> 4.0, but I think it's also affected.
> 2.3.x: 
> [https://github.com/apache/myfaces/blob/2.3.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L38-L63]
>  
>  
> 2.0.5: 
> [https://github.com/apache/myfaces/blob/myfaces-core-project-2.0.5/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L57]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MYFACES-4606) Missing source button id:value pair from request parameters in ajax requests

2023-06-13 Thread Werner Punz (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17732230#comment-17732230
 ] 

Werner Punz commented on MYFACES-4606:
--

Following:

The mentioned code branch is basically not touched anymore, because all 
browsers nowadays support xhr level2

There is a code which always attaches the issuing item, but it seems to have a 
small error, it checks for the name only.

The original code before the smaller refactorings was checking i think the id 
first and then doing a fallback to the name, afair.

I assume this might be the reason why the issuing element is not visible in the 
request!

I will fix this.

 

> Missing source button id:value pair from request parameters in ajax requests
> 
>
> Key: MYFACES-4606
> URL: https://issues.apache.org/jira/browse/MYFACES-4606
> Project: MyFaces Core
>  Issue Type: Improvement
>Affects Versions: 2.0.24, 2.2.15, 2.3.10, 3.0.2, 2.3-next-M8, 4.0.1
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
>
>  When the non-ajax submit button is pressed, its id and value is sent as a 
> request parameter.  If the ajax equivalent button is pressed, the id-value 
> pair is missing.  However, the id is included under the "javax.faces.source" 
> attribute, per the spec. 
> This becomes a problem if you do some binding checks to see if a particular 
> button is pressed. See the link: 
> [https://stackoverflow.com/a/14730658/11402059]
> Here's a sample of the behaviors for ajax and non ajax submissions.  The 
> required parts are in red (which should appear in both requests):
> {code:java}
> 
>  Ajax Checkboxes: 
>  
>     
>     
> 
> Message for ajaxCheckbox -> 
> 
>  Non-Ajax Checkboxes: 
>  
>     
>     
> 
> Message for nonajaxCheckbox -> : 
> 
> 
> 
>      
> 
>  binding="#{nonajaxbtn}"/>
> 
>       value="#{entry.key}" /> : 
> 
> 
> {code}
>  
> It used to work in 2.0, but now fails after refactoring.  Haven't tested on 
> 4.0, but I think it's also affected.
> 2.3.x: 
> [https://github.com/apache/myfaces/blob/2.3.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L38-L63]
>  
>  
> 2.0.5: 
> [https://github.com/apache/myfaces/blob/myfaces-core-project-2.0.5/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L57]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MYFACES-4606) Missing source button id:value pair from request parameters in ajax requests

2023-06-13 Thread Werner Punz (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17732225#comment-17732225
 ] 

Werner Punz commented on MYFACES-4606:
--

I am on it now!

> Missing source button id:value pair from request parameters in ajax requests
> 
>
> Key: MYFACES-4606
> URL: https://issues.apache.org/jira/browse/MYFACES-4606
> Project: MyFaces Core
>  Issue Type: Improvement
>Affects Versions: 2.0.24, 2.2.15, 2.3.10, 3.0.2, 2.3-next-M8, 4.0.1
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
>
>  When the non-ajax submit button is pressed, its id and value is sent as a 
> request parameter.  If the ajax equivalent button is pressed, the id-value 
> pair is missing.  However, the id is included under the "javax.faces.source" 
> attribute, per the spec. 
> This becomes a problem if you do some binding checks to see if a particular 
> button is pressed. See the link: 
> [https://stackoverflow.com/a/14730658/11402059]
> Here's a sample of the behaviors for ajax and non ajax submissions.  The 
> required parts are in red (which should appear in both requests):
> {code:java}
> 
>  Ajax Checkboxes: 
>  
>     
>     
> 
> Message for ajaxCheckbox -> 
> 
>  Non-Ajax Checkboxes: 
>  
>     
>     
> 
> Message for nonajaxCheckbox -> : 
> 
> 
> 
>      
> 
>  binding="#{nonajaxbtn}"/>
> 
>       value="#{entry.key}" /> : 
> 
> 
> {code}
>  
> It used to work in 2.0, but now fails after refactoring.  Haven't tested on 
> 4.0, but I think it's also affected.
> 2.3.x: 
> [https://github.com/apache/myfaces/blob/2.3.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L38-L63]
>  
>  
> 2.0.5: 
> [https://github.com/apache/myfaces/blob/myfaces-core-project-2.0.5/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L57]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MYFACES-4606) Missing source button id:value pair from request parameters in ajax requests

2023-06-13 Thread Werner Punz (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17731917#comment-17731917
 ] 

Werner Punz commented on MYFACES-4606:
--

Yes this could be a refactoring issue!

I will fix it asap, which very likely is tonight!

 

> Missing source button id:value pair from request parameters in ajax requests
> 
>
> Key: MYFACES-4606
> URL: https://issues.apache.org/jira/browse/MYFACES-4606
> Project: MyFaces Core
>  Issue Type: Improvement
>Affects Versions: 2.0.24, 2.2.15, 2.3.10, 3.0.2, 2.3-next-M8, 4.0.1
>Reporter: Volodymyr Siedlecki
>Priority: Major
>
>  When the non-ajax submit button is pressed, its id and value is sent as a 
> request parameter.  If the ajax equivalent button is pressed, the id-value 
> pair is missing.  However, the id is included under the "javax.faces.source" 
> attribute, per the spec. 
> This becomes a problem if you do some binding checks to see if a particular 
> button is pressed. See the link: 
> [https://stackoverflow.com/a/14730658/11402059]
> Here's a sample of the behaviors for ajax and non ajax submissions.  The 
> required parts are in red (which should appear in both requests):
> {code:java}
> 
>  Ajax Checkboxes: 
>  
>     
>     
> 
> Message for ajaxCheckbox -> 
> 
>  Non-Ajax Checkboxes: 
>  
>     
>     
> 
> Message for nonajaxCheckbox -> : 
> 
> 
> 
>      
> 
>  binding="#{nonajaxbtn}"/>
> 
>       value="#{entry.key}" /> : 
> 
> 
> {code}
>  
> It used to work in 2.0, but now fails after refactoring.  Haven't tested on 
> 4.0, but I think it's also affected.
> 2.3.x: 
> [https://github.com/apache/myfaces/blob/2.3.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L38-L63]
>  
>  
> 2.0.5: 
> [https://github.com/apache/myfaces/blob/myfaces-core-project-2.0.5/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L57]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MYFACES-4606) Missing source button id:value pair from request parameters in ajax requests

2023-06-13 Thread Werner Punz (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17731914#comment-17731914
 ] 

Werner Punz commented on MYFACES-4606:
--

Hi yes I coded this behavior definitely in, as the sourcecode shows. I have to 
investigate why.

I have a second issue pending on the 2.x codebase anyway (which I have yet no 
time to fix)

I will investigate the next few days, maybe today in the evening after work)

Please assign it to me. So that I can tackle both issues at once!

 

> Missing source button id:value pair from request parameters in ajax requests
> 
>
> Key: MYFACES-4606
> URL: https://issues.apache.org/jira/browse/MYFACES-4606
> Project: MyFaces Core
>  Issue Type: Improvement
>Affects Versions: 2.0.24, 2.2.15, 2.3.10, 3.0.2, 2.3-next-M8, 4.0.1
>Reporter: Volodymyr Siedlecki
>Priority: Major
>
>  When the non-ajax submit button is pressed, its id and value is sent as a 
> request parameter.  If the ajax equivalent button is pressed, the id-value 
> pair is missing.  However, the id is included under the "javax.faces.source" 
> attribute, per the spec. 
> This becomes a problem if you do some binding checks to see if a particular 
> button is pressed. See the link: 
> [https://stackoverflow.com/a/14730658/11402059]
> Here's a sample of the behaviors for ajax and non ajax submissions.  The 
> required parts are in red (which should appear in both requests):
> {code:java}
> 
>  Ajax Checkboxes: 
>  
>     
>     
> 
> Message for ajaxCheckbox -> 
> 
>  Non-Ajax Checkboxes: 
>  
>     
>     
> 
> Message for nonajaxCheckbox -> : 
> 
> 
> 
>      
> 
>  binding="#{nonajaxbtn}"/>
> 
>       value="#{entry.key}" /> : 
> 
> 
> {code}
>  
> It used to work in 2.0, but now fails after refactoring.  Haven't tested on 
> 4.0, but I think it's also affected.
> 2.3.x: 
> [https://github.com/apache/myfaces/blob/2.3.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L38-L63]
>  
>  
> 2.0.5: 
> [https://github.com/apache/myfaces/blob/myfaces-core-project-2.0.5/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js#L57]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)