I tried to pass the input field variable value(as provided by the user) to a global variable in the controller. I have the following code.
<div class="Modal">
<apex:pageBlockSectionItem id="DateTimeofComment">
<apex:outputLabel>Comment Sent Date</apex:outputLabel>
<apex:inputfield id="CommentDate" value="{!AModel.dateTimeInput}" />
<apex:commandButton action="{!AModel.save}" value="Save" id="saveCommentButton" />
</apex:pageBlockSectionItem>
AModel is an extension class. In the AModel class I have the global variable
public DateTime dateTimeInput {get;set;}
public void save() {
//Save Code.............
}
What is happening is that whenever I am trying to save the visualforce page code given above it is throwing the following error.
Error:
Could not resolve the entity from
<apex:inputField>
value binding{!AModel.dateTimeInput}
. can only be used with SObjects, or objects that are Visualforce field component resolvable.
Can anyone tell me how this issue will be ressolved?