function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
RaviKumarRaviKumar 

Could not resolve the entity from <apex:inputField> value binding '{!a.name}'. <apex:inputField> can only be used with SObjects, or objects that are Visualforce field component resolvable.

<apex:page controller="VF10ActionRegion_Control" >
    <apex:form >
    <apex:pageMessage id="MyMess" severity="info"></apex:pageMessage>

        <apex:outputText >Account Name:</apex:outputText>
        <apex:actionRegion >

        <apex:InputText value="{!recAccNo}"/>
        <apex:commandButton action="{!recordFill}" value="Search"/>
        
        <apex:pageBlock >
        <apex:pageBlockSection >
        <apex:pageBlockTable value="{!accObj}" var="a">
 <table>
 <tr>
<td> <apex:outputLabel value="Account Type"> </apex:outputLabel> </td>
<td> <apex:inputField value="{!a.name}"/> </td>
</tr>
</table>
        
            <apex:outputField value="{!a.name}"/>
        
          <apex:outputText value="{!a.name}"/>
          </apex:pageBlockTable>
        </apex:pageBlockSection>

         </apex:pageBlock>
        </apex:actionRegion>

    </apex:form>
</apex:page>

***********************************
public class VF10ActionRegion_Control {

  Public String recAccNo{set; get;}
  Public List<Account> accObj{ get; set;}

    public void recordFill() {
       If(recAccNo != null && recAccNo != ''){
           accObj = [Select name from Account where name =: recAccNo];
           system.debug(accObj);
           
        }else{
         accObj = null;
        }
    }

}
Best Answer chosen by RaviKumar
Bhanu MaheshBhanu Mahesh
Hi RaviKumar,
<apex:inputField> will try to get the attributes of the field of an object
Try using <apex:column> inside the pageBlockTable to display the data. Then it will bind with field of account whuch is a value from PageBlockTable

Try below code for your page
<apex:page controller="VF10ActionRegion_Control" >
	<apex:form >
		<apex:pageMessage id="MyMess" severity="info"></apex:pageMessage>

		<apex:outputText >Account Name:</apex:outputText>
		<apex:actionRegion >

		<apex:InputText value="{!recAccNo}"/>
		<apex:commandButton action="{!recordFill}" value="Search"/>

		<apex:pageBlock >
			<apex:pageBlockSection >
				<apex:pageBlockTable value="{!accObj}" var="a">
					<apex:column>
						<table>
							<tr>
								<td> <apex:outputLabel value="Account Type"> </apex:outputLabel> </td>
								<td> <apex:inputField value="{!a.name}"/> </td>
							</tr>
						</table>
					</apex:column>
					<apex:column>
						<apex:outputField value="{!a.name}"/>
					</apex:column>
					<apex:column>
						<apex:outputText value="{!a.name}"/>
					</apex:column>
				</apex:pageBlockTable>
			</apex:pageBlockSection>

		</apex:pageBlock>
		</apex:actionRegion>

	</apex:form>
</apex:page>

Mark this as "SOLVED" if your query is Answered

Regards,
Bhanu Mahesh