You need to sign in to do that
Don't have an account?
Narinder Singh 1
{!input}'. can only be used with SObjects, or objects that are Visualforce field component resolvable
Hello,
My component code is
Error: Could not resolve the entity from value binding '{!input}'. can only be used with SObjects, or objects that are Visualforce field component resolvable.
What binding am I missing?
My component code is
<apex:component > <apex:attribute name="label" description="" type="String" required="true"/> <apex:attribute name="input" description="" type="sObject" required="true"/> <div class="form-group col-md-6"> <label for="input" class="col-md-2 control-label">{!label}</label> <div class="col-md-6 form-control-wrapper"> <apex:inputField styleClass="form-control" id="input" value="{!input}" /> <span class="material-input"></span> </div> </div> </apex:component>When I use this, I get this error
Error: Could not resolve the entity from value binding '{!input}'. can only be used with SObjects, or objects that are Visualforce field component resolvable.
What binding am I missing?
Try changing your code to something along these lines and it should work.
If my answer helps resolve your query, please select it as a 'Best Answer' so that it benefits others and helps us improve the overall quality of the forums.
All Answers
Try changing your code to something along these lines and it should work.
If my answer helps resolve your query, please select it as a 'Best Answer' so that it benefits others and helps us improve the overall quality of the forums.
Try by changing this line <apex:inputField styleClass="form-control" id="input" value="{!input}" />
to
<apex:inputText styleClass="form-control" id="input" value="{!input}" />
Because <apex:inputField> will bind a sobject field. But here there is no Sobject field. <!input> is not a field.
So use <apex:inputText> to bind <!input>
Regards,
Bhanu Mahesh