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
NewToForceDevelopmentNewToForceDevelopment 

Inputfield acess the value

I am trying to get the value of the inputfield when doing a save on that field.

The requirement is on save on this page should update the table with th enew values that are entered in the amount_c and date_c fields.

 

This is how my code looks...

 

public with sharing class PaymentDetailsController {

            public PageReference save() {

                  return null;

            }

}

 

 

<apex:page controller="PaymentDetailsController" tabStyle="Payment__c" >
<apex:form >
 
        <apex:pageBlock title="Payment Details">
            <apex:pageBlockTable value="{!PaymentDetails}" var="pd">
                <apex:column HeaderValue="Amount">
                    <apex:inputField value="{!pd.Amount__c}" id="amount_c"/>
                </apex:column>               
                <apex:column headerValue="Date">
                    <apex:inputField value="{!pd.Date__c}" id="date_c"/>
                </apex:column>
            </apex:pageBlockTable>
            <apex:pageBlockButtons >
                <apex:commandButton value="Save" action="{!save}"/>
            </apex:pageBlockButtons>
        </apex:pageBlock>
       
    </apex:form>
</apex:page>