You need to sign in to do that
Don't have an account?

Newbie in visualforce need help on help on identifying objects and fields in visual force.
I am trying to put all the positions in the position object in a datatable using the visualforce. I am not sure how i can identify the field needed
<apex:page standardController="position__c">
<apex:pageBlock title="Hello {!$User.FirstName}!">
You are viewing the {!position__c.name} account.
</apex:pageBlock>
<apex:pageBlock title="table">
<apex:pageBlockTable value="{!position__c.???}" var="contact">
<apex:column value="{!Position__c.Name}"/>
<apex:column value="{!Position__c.location}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
I don't know what to mention in the ??? area and how i can point out the fields of the each position in a tabular form.
Try this,
<apex:page standardController="position__c">
<apex:pageBlock title="Hello {!$User.FirstName}!">
You are viewing the {!position__c.name} account.
</apex:pageBlock>
<apex:pageBlock title="table">
<apex:pageBlockTable value="{!position__c}" var="contact">
<apex:column value="{!contact.Name}"/>
<apex:column value="{!contact.location}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
you need to send id of position record along with page link to test it properly
example - https://c.ap1.visual.force.com/apex/positionpage?id=a0090000006XHjU
also read "visualforce workbook" pdf on link http://wiki.developerforce.com/page/Force.com_workbook
this should help.
Hi Rahul,
I think i didn't write what exactly i am looking for in the datatable. my datatable in visualforce page should display all the records in a tabular fashion. If i mention the ID in the URL, it will display only the context related to the particular ID alone but i am looking for all the records to be displayed.
Then you have to use recordsetvar attribute of page component. Please follow link for similar example.
http://www.salesforce.com/docs/developer/cookbook/index_Left.htm#CSHID=vf_multi_record_edit.htm|StartTopic=Content%2Fvf_multi_record_edit.htm|SkinName=webhelp
also go through the pdf link in the my past reply for better understanding of visualforce pages.
Rahul,
You got me now. I know to use recordsetvar in the tag but i don't know what would be the value of it. Suppose my custom object API name is Position__c. really i don't know what i should give in recordsetvar value, as i saw that in some example in visual force tutorial. they used "Account "standard object and recordsetvar was set as "Accounts". do i have to provide the plural name over there?