You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2013/10/17 22:54:46 UTC

[jira] [Commented] (MYFACES-3728) "javax.faces.partial.execute=@none" still process "javax.faces.source" component

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

Leonardo Uribe commented on MYFACES-3728:
-----------------------------------------

Checking the code and the log it seems there is a code in PartialViewContextImpl.getExecuteIds() that includes the component associated with javax.faces.source even if @none is used. It has this description (See MYFACES-2458):

                // The "javax.faces.source" parameter needs to be added to the list of
                // execute ids if missing (otherwise, we'd never execute an action associated
                // with, e.g., a button).

One use case is this:

<f:ajax execute="@none" listener="..."

If we don't include the source component in the execute list, the listener will not be executed, which is incorrect. Handle @none on server side will not help, because what we have here is probably a fix we did in MyFaces long time ago that is not in Mojarra. According to the javadoc of getExecuteIds() it says:

"... Return a Collection of client identifiers from the current request with the request parameter name PARTIAL_EXECUTE_PARAM_NAME. If there is no such request parameter, return an empty Collection. These client identifiers are used to identify components that will be processed during the execute phase of the request processing lifecycle. The returned Collection is mutable. ..."

We have here an inconsistency, between the spec and the code, but it is clear the right behavior is the one MyFaces is doing right now, basically because it does not have sense to send an ajax request that do nothing on the server side. This is something to discuss on the EG.

> "javax.faces.partial.execute=@none" still process "javax.faces.source" component
> --------------------------------------------------------------------------------
>
>                 Key: MYFACES-3728
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3728
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.1.10
>            Reporter: Thomas Andraschko
>             Fix For: 2.1.13
>
>
> i found a weird issue that if i use p:ajax on inputText with process="@none", the InputTextRenderer#decode method will be still invoked.
> This works fine with f:ajax in myfaces and mojarra.
> p:ajax only works expected on mojarra.
> The only difference i found is, that p:ajax sends the "javax.faces.partial.execute" param and f:ajax not.
> Here is a list with the post params (without my inputs):
> PrimeFaces:
> javax.faces.ViewState=N%2F6uUZMB9%2BPXSBTJVus5p6rncWDWwUAgQ9UIOweKuerVM0Z7
> javax.faces.partial.ajax=true
> javax.faces.source=xxx
> javax.faces.partial.execute=%40none
> javax.faces.partial.render=%40none
> javax.faces.behavior.event=change
> javax.faces.partial.event=change
> form_SUBMIT=1
> MyFaces:
> javax.faces.ViewState=EHCQlskNw%2BLXSBTJVus5pyzjdxWpT%2B72t7rvnK11Nffi10%2Bl
> javax.faces.partial.ajax=true
> javax.faces.source=xxx
> javax.faces.behavior.event=change
> javax.faces.partial.event=change
> javax.faces.windowId=2cc
> form_SUBMIT=1
> form=form



--
This message was sent by Atlassian JIRA
(v6.1#6144)