1

As a title says I can't rerender commandButton when it is in pageCommandButtons component. In this case it is rerendered:

<apex:commandButton id="sendEmailButton" value="{!$Label.SendEmail}" action = "{!sendEmail}" disabled="{!isSendEmailButtonDisabled}"/>   
<apex:pageBlockButtons> 
        <apex:commandButton value="{!$Label.New}" reRender= "viewNew" action = "{!show}"/>              
</apex:pageBlockButtons> 

And in this case isn't:

<apex:pageBlockButtons> 
        <apex:commandButton value="{!$Label.New}" reRender= "viewNew" action = "{!show}"/> 
        <apex:commandButton id="sendEmailButton" value="{!$Label.SendEmail}" action = "{!sendEmail}" disabled="{!isSendEmailButtonDisabled}"/>   
</apex:pageBlockButtons> 

Do you have any ideas?

  • 3
    Have you tried rerendering the entire pageBlockButtons component? In general with reRender, you start small, and work your way to bigger and bigger pieces of the UI. So I'd try slapping an id on the pageBlockButtons and point to that to rerender. – pchittum Apr 17 '15 at 14:57
  • Yes, I tried it. It doesn't work. – Iaroslav Petriv Apr 17 '15 at 15:03
  • It is something wrong with pageBlockButtons. It blocks rerendering feature in some way. – Iaroslav Petriv Apr 17 '15 at 15:18
2

Since I just ran into this myself... put an apex:outputPanel inside the apex:pageBlockButtons and put the apex:commandButtons inside that. Now you can rerender the apex:outputPanel.

|improve this answer|||||
1

Please try wrapping the pageblockbuttons in an <apex:outputPanel> and rerender the panel

|improve this answer|||||
  • 2
    Yes, but it's not work due to the rule <apex:pageBlock> must be the direct parent of <apex:pageBlockButtons>. – Iaroslav Petriv Apr 20 '15 at 7:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.