I have a visual force page where the standard controller is the Case object and it has a related object. I need to save edits made to the related object, but there doesn't seem to be a straight forward way of doing so.
Code:
<apex:repeat value="{!Case.Vitality_Check_Attributes__r}" var="att">
<table>
<td class="text-right">
<apex:outputLabel value="Name" for="name"/>
<apex:inputField value="{!att.name}" id="name"/>
<br></br>
<apex:outputLabel value="Assesment Group ID" for="agi"/>
<apex:inputField value="{!att.Assessment_Group_ID__c}" id="agi"/>
<br></br>
<apex:outputLabel value="Assesment Identifier" for="ai"/>
<apex:inputField value="{!att.Assessment_Identifier__c}" id="ai"/>
<br></br>
<apex:outputLabel value="Assesment ID" for="aid"/>
<apex:inputField value="{!att.Attribute_ID__c}" id="aid"/>
<br></br>
<apex:outputLabel value="Attribute Identifier" for="ati"/>
<apex:inputField value="{!att.Attribute_Identifier__c}" id="ati"/>
<br></br>
<apex:outputLabel value="Attribute" for="atr"/>
<apex:inputField value="{!att.Attribute_Value__c}" id="atr"/>
<br></br>
<apex:outputLabel value="Source Type" for="src"/>
<apex:inputField value="{!att.Source_Type__c}" id="src"/>
<br></br>
<apex:commandButton action="{!att.Save}" value="Save"/>
</td>
</table>
</apex:repeat>
How would I make the att.save work?
Case
controllerExtension class? If yes, then you want to upsert all of the rows in the table in one action, not have a save button on each row