You need to sign in to do that
Don't have an account?
In pageBlockButtons, <apex:facet> only works with top set of buttons
I have functionality in a form so when the users click on the button, the button goes disabled. The only problem I have is that in a <apex:pageBlockButtons> block, where two sets of buttons are created, only the top set of buttons becomes disabled. This was put into place to prevent the users from double-clicking the buttons, however they end up double-clicking the lower set of buttons because those buttons do not become disabled.
<apex:pageBlockButtons id="productButtons">
<apex:actionStatus rendered="{!NOT(readOnly)}" id="applyButtonStatus">
<apex:facet name="stop">
<apex:commandButton id="applyButtonActive" action="{!calcRevenue}" value="Apply Changes/Calculate Revenue" status="applyButtonStatus" disabled="false" rerender="productTypeSelectionBlock"/>
</apex:facet>
<apex:facet name="start">
<apex:commandButton id="applyButtonDisabled" action="{!calcRevenue}" value="Applying Changes..." status="applyButtonStatus" disabled="true" rerender="productTypeSelectionBlock"/>
</apex:facet>
</apex:actionStatus>
</apex:pageBlockButtons>
Is there any way to get this to work inside of the pageBlockButtons block, or do I just have to create two sets of buttons? If I create two sets, then they'll disable independently of each other, which isn't ideal.
I'm having a similar problem. Has anyone come across this?
Here's the code:
Hi,
i have a VF page with a save button on top, and a save button at the bottom of the page. To disable one when the user clicks the other, i have created this solution, and it works.
For the top button:
<apex:pageblockbuttons location="top">
<apex:actionStatus id="saveStatus1">
<apex:facet name="stop">
<apex:commandButton onclick="checkDoubleSubmit(this);" action="{!saveall}" status="saveStatus2" value="Save" disabled="false" rerender="<your relevant pageblocks>"/>
</apex:facet>
<apex:facet name="start">
<apex:commandButton value="Save" disabled="true"/>
</apex:facet>
</apex:actionStatus>
and this for the bottom button:
<apex:pageblockbuttons location="bottom" id="pageblockbuttonsbottom">
<apex:actionStatusid="saveStatus2">
<apex:facetname="stop">
<apex:commandButton onclick="checkDoubleSubmit(this);" action="{!saveall}" status="saveStatus1" value="Opslaan" disabled="false" id="savebuttonbottom" rerender="<your relevant pageblocks>"/>
</apex:facet>
<apex:facet name="start">
<apex:commandButton value="Save" disabled="true"/>
</apex:facet>
</apex:actionStatus>
I now face the challenge to add more buttons in the top and bottom sections. And i want this: if the user clicks one button, it should disable all buttons. Don't have the answer yet, but will work on it the next couple of days.
C-u, Marco