You need to sign in to do that
Don't have an account?
command buttons
hi
i want two buttons one standard update
2)controllerextensionupdate
<apex:page standardController="ControlerETO__c" recordSetVar="ControlerETO" >
<apex:form >
<apex:dataTable value="{!ControlerETO}" var="individualrecords">
<apex:column headerValue="first object">
<apex:inputField value="{!individualrecords.Name}"/>
</apex:column>
<apex:column headerValue="second object">
<apex:inputField value="{!individualrecords.Description__c}"/>
</apex:column>
<apex:column headerValue="third object">
<apex:inputField value="{!individualrecords.Numbaer__c}"/>
</apex:column>
</apex:dataTable>
<apex:pageBlock >
<apex:commandButton value="standard update" action="{!standardupdate}"/>
<apex:commandButton action="{!Controlerextensionupdate}" value="Controlerextensionupdate"/>
</apex:pageBlock>
</apex:form>
</apex:page>
this my code but its not accepting it showing two errors standard controller nd controller extension how can i get tht two buttons
Hi,
If you need to use the standard action then use
<apex:commandButton value="standard update" action="{!save}"/> <!-- Where the save action will be called from the standard controller you are using-->
<apex:commandButton action="{!Controlerextensionupdate}" value="Controlerextensionupdate"/> <!-- Use your custom update action-->
Hope this is what you need.
yes natraj thats correct but i want write apex class also for controllerextensionupdate how can i write apex class for that am using extension controller
standard object is working but coustom object not working it need apex program how can i write for that apex program
Here is a good example .......
http://www.salesforce.com/us/developer/docs/pages/Content/pages_controller_sosc_custom_button.htm
This explains you how to use the record set variables and for your custom update add a new method in the controller like this
public pageReference controllerExtensionUpdate(){
update ControlerETO;
return null;
}