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

A bug with repeat/component?



I'm experiencing some unexpected behavior when trying to use the apex:repeat function with apex component.


Basically, I want to add component on the basis of data value. My Standalone component is working fine but when I try to put it inside apex:repeat tab rerender stop working.


here is my 'simplified' and easily testable page & controller


Any assistance greatly appreciated.




<apex:component controller="customViewController">
<apex:form >
<apex:actionFunction name="changeView" action="{!updateViewList}" reRender="viewList" />
<apex:pageBlock >
<apex:outputpanel id="filterPanel" layout="block" style="background-color:#D9D9D9">
<apex:selectList size="1" multiselect="false" value="{!objectType}" onchange="changeView()">
<apex:selectOptions value="{!ObjectList}"></apex:selectOptions>
<apex:selectList id="viewList" size="1" multiselect="false" value="{!objectView}">
<apex:selectOptions value="{!ObjectViewList}"></apex:selectOptions>
<apex:commandButton value="Go!" action="{!reloadView}" rendered="true" reRender="dataPanel" />

 Component controller


public with sharing class customViewController {

public customViewController() {
objectType = 'Opportunity';

objectView = 'My Opportunity';

public PageReference reloadView() {
return null;

public List<SelectOption> getObjectViewList() {
List<SelectOption> objectViewList = new List<SelectOption>();

if(objectType.equals('Opportunity')) {
objectViewList.add(new Selectoption('My Opportunity','My Opportunity'));
objectViewList.add(new Selectoption('All Opportunity','All Opportunity'));

if(objectType.equals('Case')) {
objectViewList.add(new Selectoption('My Case','My Case'));
objectViewList.add(new Selectoption('All Case','All Case'));

return objectViewList;

public List<SelectOption> getObjectList() {
List<SelectOption> objectList = new List<SelectOption>();

objectList.add(new Selectoption('Opportunity','Opportunity'));
objectList.add(new Selectoption('Case','Case'));

return objectList;

public PageReference updateViewList() {
return null;

public String objectView {get; set;}

public String objectType { get; set;}


 VisualForce Page - With Repeat Tab - Component Rerender Not Working


<apex:page controller="repeatTestController" >

<apex:repeat value="{!DataList}" var="data">


 VisualForce Page - Without Repeat Tab - Component Rerender Working


<apex:page controller="repeatTestController" >






public with sharing class repeatTestController {
public List<String> getDataList() {
List<String> dataList = new List<String>();


return dataList;



Message Edited by Naishadh on 11-04-2009 03:38 AM

Reredner functionality is not working if I put component inside apex repeat.  Moderator any help?

Message Edited by Naishadh on 11-05-2009 04:44 AM

Id's in the component will not be unique anymore insde the resulting document?