[ https://issues.apache.org/jira/browse/MYFACES-3611?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13458827#comment-13458827 ]
Mike Kienenberger commented on MYFACES-3611: -------------------------------------------- You might also be able to return null in controles.getTextComponent() and accomplish the same thing. My guess is that you only want a reference to the component, and you are not trying to create a new component. public UIComponent getTextComponent() { return null; } http://drewdev.blogspot.com/2009/01/jsf-component-binding-stinks.html > 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