You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Ricard Moré (JIRA)" <de...@myfaces.apache.org> on 2012/09/19 11:30:07 UTC

[jira] [Commented] (MYFACES-3611) Validator method fired N times for ajax action if there's a binding attribute

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

Ricard Moré commented on MYFACES-3611:
--------------------------------------

I just realized that it happens too for a standar (non ajax) actionListener.
                
> Validator method fired N times for ajax action if there's a binding attribute
> -----------------------------------------------------------------------------
>
>                 Key: MYFACES-3611
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3611
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 2.1.2
>         Environment: Tomcat 7, windows
>            Reporter: Ricard Moré
>
> There's a problem in the validation phase when you mix ajax action and a binding value in the same form. For example I have this simple form:
> <h:form id="form">
> 	<h:inputText id="text" value="#{controles.text}" validator="#{controles.validateText}" 
> 	binding="#{controles.textComponent}"/>		
> 	<br/><br/>
> 	<h:commandButton value="validate">
> 		<f:ajax event="click" render="text" listener="#{controles.clearText}" execute="@form" immediate="false"/>
> 	</h:commandButton>
> </h:form>
> And when validate button is clicked the validator method validateText is called twice the first time, 3 times for the second submit and one more time each time the ajax action is fired.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira