posted 14 years ago
<a4j:commandButton value="Add New Report Distribution" id="add_report_distribution_button"
disabled="#{rptDistCtlr.enabledAddButton}"
reRender="add_edit_report_dist_panel"
oncomplete="#{rich:component('add_edit_report_dist_panel')}.show();"
action="#{rptDistCtlr.createReportDistribution}">
<a4j:actionparam name="distReportId" value="#{rptDistCtlr.distReportId}"/>
</a4j:commandButton>
If I remove the "disabled" property the button behaves as expected and calls rptDisCtlr.createReport... Though if I do use the disabled property as above it just posts the page back and doesn't call my action. The button is disabled/enabled as expected and the rich:panel that it's within gets refreshed (there's a table inside it), but the action isn't called when I click the button to add a new Report.
The html generated is the same.
<input type="button" id="j_id61:add_report_distribution_button" name="j_id61:add_report_distribution_button" onclick="A4J.AJAX.Submit('j_id61',event,{'oncomplete':function(request,event,data){document.getElementById('add_edit_report_dist_panel').component.show();},'similarityGroupingId':'j_id61:add_report_distribution_button','parameters':{'distReportId':'1001','j_id61:add_report_distribution_button':'j_id61:add_report_distribution_button'} } );return false;" value="Add New Report Distribution" autocomplete="off" tabindex="0"/>
<input type="button" id="j_id61:add_report_distribution_button" name="j_id61:add_report_distribution_button" onclick="A4J.AJAX.Submit('j_id61',event,{'oncomplete':function(request,event,data){document.getElementById('add_edit_report_dist_panel').component.show();},'similarityGroupingId':'j_id61:add_report_distribution_button','parameters':{'distReportId':'1011','j_id61:add_report_distribution_button':'j_id61:add_report_distribution_button'} } );return false;" value="Add New Report Distribution" autocomplete="off"/>