So I'm a little unclear based on your writeup but I'll take a guess as to what you are trying to do...
- Clicking a
commandButton
calls enableSpehere()
- After that click, you want that button disabled.
- When the spehere is enabled, the button should always be disabled
If the above is all true, then in your controller, you can use your public boolean to disable the button.
public Boolean spehereEnabled = false;
public void enableSpehere()
{
spehereEnabled = true;
}
Then in your markup for the commandButton
...
<apex:commandButton disabled="{!spehereEnabled}" value="{!enableSpehere}" value="Enable Spehere" />
Note that you had both your method named enableSpehere
and also your Boolean property. I changed the Boolean property name for you to spehereEnabled
. You'd just change the pageBlockSection
rendered binding to...
<apex:pageBlockSection rendered="{!sphereEnabled}"\>