I am using JSF2, Richfaces4 and Spring. I have a command link. On execute I save records and on complete I execute search to display records like following code.
Problem is that fireSearch()
in oncomplete executes even if there is a validation error in form. I need to execute fireSearch()
only when the record get saved successfully.
只有在验证成功之后 我才能完全完成呢?
<a4j:commandLink styleClass="button" action="#{myBean.save}" render="detail_form" execute="@form" oncomplete="fireSearch()">
<span> Save </span>
</a4j:commandLink>