I've already read "all" other issues concerning not working CommandLinks, but none apply for me, hopefully there's another solution.
I have an a4j:htmlCommandLink which only works the first time it is clicked. If I click somewhere else on the page which triggers a reRender of the a4j:outputPanel, then it WILL work every time I click.
<a4j:outputPanel rendered="true" id="results">
<a4j:form id="csv-form">
<a4j:htmlCommandLink title="Export" action="#{bean.export()}" value="Export CSV" id="csv-link"/>
</a4j:form>
<a4j:form id="other-form">
<a4j:commandLink value="Test" action="#{bean.action()}" reRender="results" title="Test">
</a4j:form>
</a4j:outputPanel>
Why doesn't it work the second time I click (before I do a reRender)?
UPDATE This works:
<a4j:form id="csv-form">
<a4j:htmlCommandLink title="Export" action="#{bean.export()}" value="Export CSV" id="csv-link"/>
<a4j:support event="onclick" reRender="results"></a4j:support>
</a4j:form>