You need to sign in to do that
Don't have an account?
downloading
Get the Values from Controller
Hi,
I wanna get the value from Controller and Display them on my apexPage,
Could anyone help me with the Sample Code , how to achieve this..
thankyou
Hi,
Try the below code as reference:
Public class TestData
{
Public list<contact> con{get;set;}
Public TestData()
{
con=[select id ,lastname from contact limit 10];
}
}
//////////////////// VF Page /////////////////////
<apex:page controller="TestData">
<apex:pageBlock >
<apex:pageBlockTable value="{!con}" var="c">
<apex:column value="{!c.id}"/>
<apex:column value="{!c.lastname}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
All Answers
Hi,
Try the below code as reference:
Public class TestData
{
Public list<contact> con{get;set;}
Public TestData()
{
con=[select id ,lastname from contact limit 10];
}
}
//////////////////// VF Page /////////////////////
<apex:page controller="TestData">
<apex:pageBlock >
<apex:pageBlockTable value="{!con}" var="c">
<apex:column value="{!c.id}"/>
<apex:column value="{!c.lastname}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
What type of value, you want to display?
List of object can be display using pageblocktable,datatable or repeat
Refer : http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_pageBlockTable.htm
http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_repeat.htm
http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_dataTable.htm
If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.