You need to sign in to do that
Don't have an account?
Pankaj Sharma 195
what is wrong in VF page or Apex Class ?
it is giveing error ->( Formula expression is required for attribute value in <apex:column> in message at line 4 column 43)
apex class->
public class class2
{
List<Account> a= [select Type from Account];
public List<Account> getacc()
{
return a;
}
}
Vf page->
<apex:page controller="class2">
<apex:pageBlock title="List of Accounts">
<apex:pageBlockTable value="{!acc}" var="a">
<apex:column value="{a.Name}"/>
<apex:column value="{a.Type}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
apex class->
public class class2
{
List<Account> a= [select Type from Account];
public List<Account> getacc()
{
return a;
}
}
Vf page->
<apex:page controller="class2">
<apex:pageBlock title="List of Accounts">
<apex:pageBlockTable value="{!acc}" var="a">
<apex:column value="{a.Name}"/>
<apex:column value="{a.Type}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
May I suggest you need to add an " ! "mark in all values
Hope it will be helpful.
Please mark it as best answer if the information is informative.so that question is removed from an unanswered question and appear as a proper solution.
Thanks
Rahul Kumar
Rahul is right, but the exclaimation mark needs to be inside the curly bracket.
Regards
RD