You need to sign in to do that
Don't have an account?
Dilip_V
Unknown property Error in VF
I wrote a page for Searching.I declared a list in controller InvByLocation.
But when I am trying to Access the list it was showing Error: Unknown property 'InvLocationSearchContr.InvByLocation.
But when I am trying to Access the list it was showing Error: Unknown property 'InvLocationSearchContr.InvByLocation.
public with sharing class InvLocationSearchContr { public Boolean refer { get; set; } public string location { get;set;} public List<Inventory__C> InvByLocation=new List<Inventory__C>(); public PageReference Search() { refer=true; InvByLocation=[Select Name,Location__C From Inventory__C where Location__C='Location']; return null; } } <apex:page Controller="InvLocationSearchContr" showHeader="False"> <apex:form id="MyF"> <apex:pageBlock title="Inventory Search By Location"> <apex:pageBlockSection > <apex:inputText value="{!Location}" label="Location"/> </apex:pageBlockSection> <apex:pageBlockSection > <apex:commandButton action="{!Search}" value="Search" style="background:black;font-weight:bold;color:white"/> </apex:pageBlockSection> </apex:pageBlock> <apex:pageblock rendered="{!refer}"> <apex:pageBlockTable value="{!InvByLocation}" var="lap"> <apex:column value="{!lap.Name}"/> <apex:column value="{!lap.Location__c}"/> </apex:pageBlockTable> </apex:pageblock> </apex:form> </apex:page>
All Answers
May I know the reason behind it.
Thanks.