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
abivenkatabivenkat 

Using the Created Custom Component in VF Page

 

hi all,

 

i have created a custom component to use it in the visualforce page. There is no problem for me until i use only one component in my VF page, but, when i use more than one custom component in my VF page, it is not recognizing which one is what and cant able to differentiate it. What is the solution to differentiate the components when used in more number. Is there any attribute can solve this problem.

 

I have tried using the default ID attribute, but, still i cant differentiate it.. please suggest me what i have to do to get rid of this..

 

thanks,

abivenkat,

SFDC Learner

cloudmaniacloudmania

I really cant understand ur case clearly but you can define a specific attribute for all each custom components.

abivenkatabivenkat

 

hi cloudmania,

 

I have a custom component in which i can use it in all visualforce page.

 

If i use the above custom component in my VF page for once, it is not a problem. But, if i use the component more than once in the same VF page, it is working similar. Cant differentiate both the components. This is the problem. can u understand my case now. I need a simple solution to do this. suggest me some ideas. 

 

thanks,

abivenkat,

SFDC Learner

cloudmaniacloudmania

Isnt it expected result :same components work  similar in same Visualforce?

Please try to write some detail VF code...

abivenkatabivenkat

 

hi cloudmania,

 

No it is not the expected result. Components are same, but the attribute inputs are different. the components works differently based on the input given to the attribute. let me give u the component code.

 

using the component for the first time in a VF Page

<c:DynLookup id="comp_id" LovName="Big Opportunities" fieldLabelName="lov"/>

 

using the component for second time in the same VF Page

<c:DynLookup id="id_comp" LovName="Dynamic Lookup" fieldLabelName="lov"/>

 

As you can see the above components. Here LovName is the important attribute and i have provided different inputs and i have provided different id's too, but, it is giving similar outputs. This is my problem.

 

thanks,

abivenkat,

SFDC Learner

cloudmaniacloudmania

It is clear now...do you invoke a controller in component ?