What does Visualforce field component resolvable
mean?
I tried to bind columns editor to a list of custom Apex class instances, and naturally ran into this error. Rather than taking the workaround and breaking this up into inputXXX's I would prefer to modify the class to make it VF friendly. However, nobody seems to know what "Visualforce field component resolvable" means.
Do I need to decorate the class? Add specific metadata methods? Any ideas?
This is NOT a duplicate question.
My question relates to the second part of the description provided by the error message, stating that inputfield
needs SOQL objects OR Objects that are Visualforce field component resolvable
, which is not covered by the other answer.
Example:
public class Item {
public Boolean Selected { get; set; }
}
public List<Item> Items;
VF
<apex:pageBlockTable value="{!Items}" var="item" >
<apex:column headerValue="Select" >
<apex:inputField value="{!item.Selected}" />
</apex:column>
</apex:pageBlockTable>
Save error:
Could not resolve the entity from value binding '{!item.Selected}'. can only be used with SObjects, or objects that are Visualforce field component resolvable.
To reiterate again, I know that inputField works with SOQL, what I want to know about is the meaning and implementation of the second part of the error message. How can one go about making a custom class VF inputField friendly.
apex:inputField
is only used for Salesforce object fields. Is there any reason you cant useapex:input
instead?inputField
because of the richness of editors. If I can make this class work, I can also make one with theDate
field work and show a proper date selection input.