I'm trying to disable in a visualforce page a custom button after clicking once. Admittedly, I'm newer to v-force pages than apex, so I don't fully understand what's going on here. But, after some research, I believe using the actionStatus
tag is the preferred method. (I tried using onClick="this.disabled=true"
, but my controller methods weren't firing.) Anyway, this is what I'm trying to do:
<apex:actionStatus id="addPaymentPlanStatus">
<apex:facet name="stop">
<apex:commandButton action="{!doSubmit}" status="addPaymentPlanStatus" value="Set Up Payment Plan"
styleClass="pay-staff-button" rendered="{!(planType != null) && chargeGroupsSelected}" />
</apex:facet>
<apex:facet name="start">
<apex:commandButton disabled="true" value="Adding Plan ..." styleClass="pay-staff-button" />
</apex:facet>
</apex:actionStatus>
The functionality still works, but the button's status doesn't change after a click. Would anyone like to help me figure out what I'm missing here?
Thank you.