You need to sign in to do that
Don't have an account?
Grady Duncan
How to bind variable for Contact standard controller
Hey,
I am working on "Create a Visualforce page which shows a basic Contact record". I have everything displaying as long as I provide an ID in the URL. The problem is it does not accept it as a solution.
What does it mean by bound (binding) to a variable?
I am working on "Create a Visualforce page which shows a basic Contact record". I have everything displaying as long as I provide an ID in the URL. The problem is it does not accept it as a solution.
What does it mean by bound (binding) to a variable?
Please explain your requirment bit more ,or else post your code for which we can help !!
Thanks
Manoj
I don't have a clear explanation about Bound (bind) variable actually means, but I will try to explain what I get from it. The BIND variable is the variable name TIED with the controller, in this case the bind variable for the Contact controler would be Contact.
Using the standard controlar (<apex:page standardController="Contact">) and referencing it as {! Contact.FirstName } would be accepted as solution.
---------------------
<apex:page standardController="Contact">
<apex:pageBlock title="Contact Summary">
<apex:pageBlockSection >
First Name: {! Contact.FirstName } <br/>
Last Name: {! Contact.LastName } <br/>
Contact owner: {!Contact.Owner.Email} <br/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:page>
----------------------
Try this code,it will surely works,,,,
<apex:page standardController="Contact">
<apex:form >
<apex:pageBlock title="Contact Summary">
<apex:pageBlockSection >
<apex:inputField value="{! Contact.FirstName }"/> <br/>
<apex:inputField value="{! Contact.LastName }"/> <br/>
<apex:inputField value="{! Contact.Owner.Email }"/> <br/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
---------------------------------------------------------------------------------------------------------------------------------------
<apex:page standardController="Contact">
<apex:pageBlock >
<apex:pageBlockSection >
<apex:pageBlockSectionItem >
First Name: {!Contact.Firstname}
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
Last Name: {!Contact.Lastname}
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
Emailid: {!Contact.Owner.Email}
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:page>