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:pageBlock title="License Activation">
            <apex:pageBlockSection columns="1">
                <apex:inputField value="{!activationID}" />
                <apex:inputField value="{!computerID}" />
            <apex:pageBlockButtons >
                <apex:commandButton value="Activate" />

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?

1 Answer 1


Since those are not fields on an sObject you will need to use

<apex:inputText value="{!activationID}" />

If those are an Id to another object a trick is to create a property in the controller as a dummy sObject

public contact con {get; set;}

Then in your page use

<apex:inputField value="{!con.AccountId}"/>

for example to get the account lookup. Then in the controller simply reference con.AccountId to put where you really need it

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .