I have a visual force page as follows which includes a component call Example one,
Component has a command button and I want to call the standard controller save action of VF page from the VF component. Is this possible?
visualforce page
<apex:page standardController="Account">
<apex:form>
<apex:pageBlock title="My Content" mode="edit">
<apex:pageBlockButtons>
<apex:commandButton action="{!save}" value="Save"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="My Content Section" columns="2">
<apex:inputField value="{!account.name}"/>
<apex:inputField value="{!account.site}"/>
<apex:inputField value="{!account.type}"/>
<apex:inputField value="{!account.accountNumber}"/>
</apex:pageBlockSection>
</apex:pageBlock>
<c:exampleOne/>
</apex:form>
</apex:page>
Component "exampleOne"
<apex:component allowDML="true">
<apex:commandButton action="{!save}" />
</apex:component>
Note : I know we can use a separate controller class and use a custom save that would be my second option.