+ Start a Discussion

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 headerValue="Date">
                    <apex:inputField value="{!pd.Date__c}" id="date_c"/>
            <apex:pageBlockButtons >
                <apex:commandButton value="Save" action="{!save}"/>