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

Unable to fetch Field values of an object
Hi,
I m using a standard controller for my custom object
i want my object's field values to be displayed on visualforce page.
<apex:page showHeader="false" standardStylesheets="false" standardController="Project__c" recordSetVar="ProjectID">
<apex:form >
<apex:pageBlock title="Project Details ">
<apex:pageBlockSection>
<apex:inputField value="{!Project__c.Project_Description__c}"/>
<apex:inputField value="{!Project__c.Maintainance_Type__c}"/>
<apex:inputField value="{!Project__c.Registration_Date__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
here project description is a text field.
i want data of this field to be displayed on visualforce page in text box.
Assuming name of this VF page is showProjectDetails.page, can you share what is the URL that you are providing in Browser to launch this VF?
Since you are using Standard controller, it will be required to pass ID of an existing record in order for <apex:inputField value="{!Project__c.Project_Description__c}"/> tag to show a value on the page.
- Satgur
URL for page is https://c.ap1.visual.force.com/apex/ProjectDetail
as name of my page is ProjectDetail
which id u r talking abut to pass
ns where to pass
can u plz guide me
In your page declaration, you have specified the recordSetVar attribute, which indicates to VF that you are using a standard list controller. Looking at your page content, that doesn't appear to be the case.
Try changing your page declaration to:
<apex:page showHeader="false" standardStylesheets="false" standardController="Project__c">
This indicates to VF you are using a standard controller that is managing a single object instance named Project__c.
WRT the id, when you view an instance of Project__c, the URL will end with an id like: a00A0000001jOkx - this is the unique id of the record. To use this record in your VF page, you'd use a URL like:
https://<salesforce instance>/apex/<page_name>?id=<record_id>
All of this is documented in detail in the Visualforce Developer's Guide.
If you want editable input text, then try .... <apex:inputTex>
I m still unable to fetch any value frm the field of an object on the visualforce page in the page block using inputfield
value shuld **bleep** in the text box on that page which is already bieng saved previously.
Have you changed your page declaration to remove the recordSetVar?
Can you post the URL that you use to access the page.
i have changed the page declaration to remove recordstevar.
i dont want data of a particular record .as data keep on adding i want it to display data on page
https://c.ap1.visual.force.com/apex/ProjectDetail
Hi,
Your use case is not clear, as per my understand I think you need to write one extension conroller or custome controller for ur requirement.
--Hani