You need to sign in to do that
Don't have an account?
RaviKumar
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;
}
}
}
<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;
}
}
}
<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
Mark this as "SOLVED" if your query is Answered
Regards,
Bhanu Mahesh