I have read through all the posts really but still not able to figure this out. I want to pass the no. of hours that are input on the VF Page back to the controller. Basically, user should be able to update the no. of hours on his saved Timesheet.
Below is my VF Page -
<apex:page standardController="Project_Timesheet__c" extensions="i3_ProjectTimesheet_Controller_Edit" sidebar="false">
<apex:inputText value="{!TSHours}" label="Hours" id="TSHours"/>
Below is my extension
public class i3_ProjectTimesheet_Controller_Edit {
public i3_ProjectTimesheet_Controller_Edit(ApexPages.StandardController stdController)
{
CurrentTS = (Project_Timesheet__c)stdController.getRecord();
CurrRecId = ApexPages.currentPage().getParameters().get('Id');
TSRecord = [Select Contract__c, Assigned_To__c, Account__c, Project__c, ProjectPhase__c, Hours__c, Comments__c, Date__c from Project_Timesheet__c where ID = :CurrRecId];
}
public decimal TSHours
{
get {
return TSRecord[0].Hours__c;
}
set;
}
public PageReference Save()
{
system.debug (TSHours);
}
What am I missing?