I'm trying to develop a color picker using JSColor but I don't know how to do it with an <apex:inputField>
.
I have the error below :
Save error: Could not resolve the entity from value binding '{!color}'. can only be used with SObjects, or objects that are Visualforce field component resolvable.
Here's my code :
VF :
<apex:inputField styleClass="color" value="{!color}" />
Controller :
public SObject color {get; set;}
I can't use another object type like String
. But it doesn't work with SObject
.
Do I need to use a standard object like Account
or a custom object saved in database ?
I don't want to create a custom object only for store the color. If possible I just want to store it in a controller field.
apex:inputText
instead.