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
karthic sankar 9karthic sankar 9 

Urgent :: how to take the modified value from an inputText

Hi Guys,

I have a VF page, which loads the value when its opened based on SOQL query output.

When user modifies the input value, it should update on the same record whereas its not heppening for me.

Below is my code, and its very urgent. Can someone pls help me? as I am new to this development, I am struggling.

public class EditQAAMController {
 Double MondayPrevet{get; set;}
    public Double EmpMap_Monday { get
    return EmpMap.get('Monday');    
        this.MondayPrevet = EmpMap_Monday;

public map<String,Double> EmpMap = new map<String, Double>();

 public EditQAAMController()
         strText = ApexPages.currentPage().getParameters().get('str');
    list<QAAM_Weekly_Planner__c> queryData;
    public void init()
        queryData = [select CommentsAvailability__c, Other1Title__c, Other2Title__c, Picklist__c, Date_QAAM__c, Week_Start_Date__c,
                                                  Availability__c, ReasonAvailability__c, Work_Hours__c, Pre_Vet_Reviews__c, BAU_File_Reviews__c, Debriefs__c,
                                                  File_Selection__c, Other_work__c, Other_work_Estimate__c, Total_Work_Time__c, Team_Meeting__c, Huddle__c, 
                                                  Quarterly_Updates__c, Governance_Forums__c, Performance_Reviews__c, Tea_Breaks__c, CPD_e_Learning_Maintenance__c, 
                                                  Coaching__c, PD_Days__c, One_on_Ones__c, Weekly_Tracker_preparation__c, Business_Communications__c, 
                                                  Other__c, Other1__c, Other2__c, Project_Time__c, Other_Time__c, Project_Time_Description__c, 
                                                  Other_Time_Description__c, Shrinkage_time__c, Available_Time__c, Availability_Checking__c, id, Week__C 
                                                  from QAAM_Weekly_Planner__c where Week__C =: strText];
        list<String> weekDataStatic = new list<String>{'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'};
            integer i=0;
        for(QAAM_Weekly_Planner__c q : queryData)
            dateInput = q.Week_Start_Date__c;
            EmpMap.put(weekDataStatic[i], q.Pre_Vet_Reviews__c);


/////This below method is called while doing the save action

 public void saveButton() {
         List<QAAM_Weekly_Planner__c> updateWeekValuetotal = new List<QAAM_Weekly_Planner__c>(); 
        for(QAAM_Weekly_Planner__c q : queryData)
            q.Week_Start_Date__c = q.Week_Start_Date__c;
            System.debug('The value from UI is: ' +MondayPrevet); 
           q.Pre_Vet_Reviews__c = MondayPrevet;
        update updateWeekValuetotal;



David Zhu 19David Zhu 19
Which property in Apex class binds to the input field on VF page?
karthic sankar 9karthic sankar 9
Hi David, Thanks for getting back to me. I really have no hope than disturbing you multiple times, I am sorry for that. EmpMap_Monday is the property which binds to the Apex class Please help Regards Karthic Sankar
karthic sankar 9karthic sankar 9
What i understand from this is, I have the action attribute in Page tag of my VF page, so each time when i click the save button from my VF page, Init method loads and the values for my getter are replaced.

1st step, I load the page..  my Init method gets called by attribute action from tag page, loads value to my VF page.
all the input feilds are populated with proper values.

2nd step, i edit the values in the input feild. I click on save action. only old values are retained and updated. I guess my Init method is again called. Kindly help.
David Zhu 🔥David Zhu 🔥
You may change MondayPrevet and bind it to VP page.

pubulic Double MondayPrevet{get; set;}