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

Werner Punz commented on MYFACES-3422:
--------------------------------------

Ok I wrote some code which produces the exact behavior (see the new 
attachments):
The usage is following:
first add the phase listener one way or the other to your system (pagewise 
makes sense since the desired functionality
probably will only be used by a handful of pages)
{noformat}
 <f:phaseListener 
type="extras.apache.org.jsintegration.experimental.EncodingListener" />
{noformat}
secondly add the javascript

{noformat}
 <h:outputScript name="encodeAll/encodeAll.js" library="scripts" target="head"/>
{noformat}


Third use the new request function instead of the standard jsf.ajax request
{noformat}
 <h:commandLink id="booga3" value="press me1" action="#{executeAll.doNav2}"
                           onclick="requestAll(this, event, {execute:'@all', 
render:'centerForm otherform'}); return false;">
{noformat}

What happens now is that all input fields from all forms on the page are now 
passed down in the submit case instead of the issuing form. The phase listener 
then basically simulates an extended apply request values, which checks whether 
additional values are passed down and applies those values properly to the 
components.

Note this solution only works with myfaces, since the javascript uses some 
internal myfaces methods for convenience reasons and to shorten the code.

I will close this issue now, since I cannot do more here. This issue really 
needs to be cleared up in the EG and probably will cause an extension in the 
JSF spec.

                
> f:ajax execute="@all" ist not processing all forms on the page
> --------------------------------------------------------------
>
>                 Key: MYFACES-3422
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3422
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.1.5
>            Reporter: Michael Dietrich
>            Assignee: Werner Punz
>         Attachments: EncodingListener.java, MyFaces215AjaxTest.war, 
> encodeAll.js
>
>
> Hi,
> according to our understanding, setting execute="@all" for a f:ajax tag 
> should submit and process entries of all forms on the page, instead of 
> submitting only entries of the surroundig form, if execute="@form" is set. 
> Unfortunately, this seems not to work. I attached a small project to 
> reproduce the issue.
> Kind regards,
> Michael

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to