I am trying to get an input field value to reference a standard controller extension property.
Here is my controller extension:
public class LicenseActivationController {
private final Contact contact;
public LicenseActivationController(ApexPages.StandardController controller) {
contact = (Contact)controller.getRecord();
}
public String activationID { get; set; }
public String computerID { get; set; }
}
Here is my VisualForce page:
<apex:page standardController="Contact" extensions="LicenseActivationController">
<apex:form>
<apex:pageBlock title="License Activation">
<apex:pageBlockSection columns="1">
<apex:inputField value="{!activationID}" />
<apex:inputField value="{!computerID}" />
</apex:pageBlockSection>
<apex:pageBlockButtons >
<apex:commandButton value="Activate" />
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
As you can see, I am trying to use activationID and computerID properties in the corresponding inputField, but the error I get is:
Error: Could not resolve the entity from value binding '{!activationID}'. can only be used with SObjects, or objects that are Visualforce field component resolvable.
How can I achieve extending the Contact controller and using properties inside the extension class like I am trying to do here?