You need to sign in to do that
Don't have an account?
neeedhelp
Disabling Command button
Hi their,
my code
<Apex:pageblockbuttons >
<Apex:commandButton value="Process" action="{!Submit}" rerender="SeeResult,SeeXml" onclick="if(!Submit()){return false;}" disabled="{!error}" oncomplete="processing();" />
</Apex:pageblockbuttons>
public void Submit()
{
error = true;
}
I would disable the button after the first click, but I cannot figure out how to do that. I need the button disabled as soon as the user clicks the button.
But its not working......Help pls
<Apex:pageblockbuttons id="pbb">
<Apex:commandButton value="Process" action="{!Submit}" rerender="SeeResult,SeeXml, pbb" disabled="{!error}" oncomplete="processing();" />
</Apex:pageblockbuttons>
I don't see anything else that's missing here. You were not rerendering the buttons I guess. Please try the code above.
Can I get through javascript or else......
You can use of <apex : facet > tag. It's quite straight-forward.
<apex:facet name="start">
<apex:outputPanel >
<apex:commandButton value="Process" disabled="true" />
</apex:outputPanel>
</apex:facet>
<apex:facet name="stop">
<apex:outputPanel >
<apex:commandButton action="{!Submit}" value="Process"
immediate="true" reRender="form">
</apex:commandButton>
</apex:facet>