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
4u4u 

rendering

<apex:outputpanel id="share">
<apex:pageBlockSection title="Share Info"
columns="1"
rendered="{!CONTAINS(theRequest.Type__c,'Share')}"
collapsible="false">

 

I want the above section to be repeated depending on the number of shares in Aircraft Product table 

can any one help me in that 

ManjunathManjunath

Hi,

 

Since you want to display the pageBlockSection dynamically. Use apex:dynamicComponent in VF page. To help you out I have posted an example

VF Page

<apex:page controller="SimpleDynamicController1">
    
    <apex:dynamicComponent componentValue="{!dynamicDetail}" /> 
    
</apex:page>

 and controller

 

/* Controller */
public class SimpleDynamicController1 {
    
    public Component.Apex.PanelGroup getDynamicDetail() {
        Component.Apex.PanelGroup PG = new Component.Apex.PanelGroup();
        Component.Apex.PageBlock PB = new Component.Apex.PageBlock(title='acc');
        for(integer i=0;i<5;i++){
           Component.Apex.PageBlockSection PBS = new Component.Apex.PageBlockSection(title='PBS'+i);
            PB.childComponents.add(PBS);
        }
        PG.childComponents.add(PB);
        return PG;

    }
} }

 Regards,