In my visualforce page there is 2 buttons(Insert and Continue). When Continue button is clicked then Insert button should be shown in page otherwise Insert button should be hidden.
<apex:pageBlockButtons Id="buttonContainer">
<apex:commandButton value="Insert" rerender="mainForm"rendered=
{!showInsertButton}" onClick="javascript:fnInsertCompany();return false;" />
<apex:commandButton action="{!continue}" value="Continue"
</apex:pageBlockButtons>
You have used rendered attribute to your Insert button. You can easily render this button in a conditional logic.
In Continue button, the action is continue
i.e. you have a method called continue()
in your controller.
So, globally make the showInsertButton = false
AND in continue()
method, make the
showInsertButton = true
Thats all.