I have the following code in a JSF facelet backed by a conversation scoped SFSB with an injected session scoped SFSB. This is a Seam2 web app with JBoss 4.2.1.GA. Immediately after I click 'yes' or 'no' on the radio button, I run a select on the DB table for the JPA entity that is in question and an update transaction has been committed. I don't want that to happen until the user clicks the submit button in the form (i.e. this is a premature update).
When I removed the a4j:support tag, the update stopped happening. How can I fix this problem? I started commenting attributes (e.g. reRender) but that didn't help.
Does the a4j:support tag always force the h:form to submit?? If so, what method will be called?
<h:column>
<f:facet name="header">Account Approved?</f:facet>
<h:selectOneRadio id="accountApprovedRB" value="#{myRow[1].icomsAccountApproved}">
<a4j:support event="onclick"
oncomplete="showHideRadioButtons(#{myAuditList.getRowIndex()}); processNote(#{myAuditList.getRowIndex()}, 'accountApproved'); checkForSubmit(#{myAuditList.getRowIndex()})"
action="#{noteAction.setRenderRadioButtons(myAuditList.getRowIndex(), myRow[1].icomsAccountApproved)}"
ajaxSingle="true"/>
<!-- reRender="mainForm" -->
<f:selectItems value="#{securityAuditAction.securityAuditRadioButtons}" />
</h:selectOneRadio>
<h:graphicImage id="acctGraphic" value="/img/icon_edit.gif"
onclick="editNote(this, #{myAuditList.getRowIndex()}, 'accountApproved');" style="visibility:hidden"/>
</h:column>