• notThatShane
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies

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.

How can I determine the URL of a static resource from my Apex code?

 

I'm looking for the equivalent of the VisualForce $Resource variable, but one that I can use from with Apex code.

 

Thanks!

  • February 28, 2009
  • Like
  • 0