function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Unable to display the fields which were in the custom component..

hi experts,
Here i created one custom component. when i call this custom component in vf page it is not able to displaying the fields..
but in some of the pages it is displaying the fields which were in the custom component..
So please suggest me,

Thanks in Advance,
JyothsnaJyothsna (Salesforce Developers) 
Hi Anjireddy,

Please check the below sample code.

Visualforce component
<apex:component >

 <apex:attribute name="Contact" type="Contact" 
    description="The contact to edit" required="true" />
    <apex:pageBlock >
    <apex:pageBlockSection >
     <apex:inputField value="{!Contact.Salutation}"/>
<apex:inputField value="{!Contact.FirstName}"/>
<apex:inputField value="{!Contact.LastName}"/>

Visualforce Page
<apex:page standardController="Contact">
  <apex:pageMessages />
  <apex:form >
    <c:contactComponent contact="{!contact}"/>


User-added image

Hope this helps you!
Best Regards,
Thanks Jyothsna,,
Here the issue is my component is working in some another pages, 
But in one of the page it is not displaying fields..
im unable to know the reason why it is not showing ...

Thanks in Advacne,