function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
javierjiesjavierjies 

Change Value of a commandButton

Hello again!!

 

Now I have the value !Status, It could be 1, 2 or 3. I want to put 1,2 or 3 inside of the commandButton but I don't know what kind of data should I put in the Value of the commandButton. As I know I can write nothing but text!!

 

 

 

 

 <apex:page standardController="Data__c" extensions="functions">

    <apex:form >
        <apex:pageBlock id="result" title="Stuff">
                     <apex:commandButton action="{!buttons}" value="¿¿??" id="addButton1" />
        </apex:pageBlock>  
     </apex:form>       
</apex:page>

 

 

 

Thank you in advance

mikeafter6mikeafter6
Try the following:

 

 

value="{!Status}"

 

This assumes that !Status is a public controller variable.  If its value is 1, the button will show '1'.

 

javierjiesjavierjies

Thank you!! It worked!!

 

I was wondering....

 

Status is a Picklist, and I want to work with the following Status so, What can I do if I want to show something like, Click to pass to Status "next"?!?!?

mikeafter6mikeafter6

 

value="Click to pass to Status {!Status}"

So, if status = 1, button will say "Click to pass to Status 1"

Message Edited by mikeafter6 on 2009_0415 09:52 AM
Message Edited by mikeafter6 on 2009_0415 09:52 AM