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
Abhilash Mishra 13Abhilash Mishra 13 

using same Dynamic component Twice or more?

Hi,
using same Dynamic component Twice or more?
can this be achieved and how?

I have this component and I am trying to user this more than one's.

It does not give any error, but however only the last one renders.

Here is the page:
 
<apex:page controller="mycustomcontroller">

<apex:dynamicComponent componentValue="{!footerDetails}"/>
</apex:page>

here is the controlller
 
public with sharing class mycustomcontroller {

 public list<string> getfooterlinks(){
         return new list<string>{'user','Leads',' Account' ,'contact'};
      }


 public Component.Apex.datalist getfooterDetails(){
      		Component.Apex.datalist dt= new Component.Apex.datalist();
      		dt.expressions.value='{!footerlinks}';
      		dt.styleclass='footer-link-list';
      		dt.var='s';
      		
      		Component.Apex.outputlink otl=new Component.Apex.outputlink();
      		otl.value='#';
      		Component.Apex.outputText ot= new Component.Apex.outputText();
      		ot.expressions.value='{!s}';
      		otl.childComponents.add(ot);
      		dt.childComponents.add(otl);

      		
         return dt;
      }

}


Need Help?

Regards
Abhilash MIshra