I have a scenario where there are repeating Tabs. Within each tab, there are multiple drop-down lists (say DL1, DL2, DL3). DL2 is dynamically generated based on the value selected from DL1. And DL3 is dynamically generated based on the value from DL2. I implemented something similar as:
<apex:repeat id="repeat1" value="{!reps}" var="rep">
.
.
.
<div id="div1-{!rep.id}">
<apex:outputPanel id="DL1" >
<apex:selectList value="{!selectedVal1}" size="1" id="SL1">
<apex:selectOptions value="{!list1}" />
<apex:actionSupport event="onchange" rerender="DL2"/>
</apex:selectList>
</apex:outputPanel>
</div>
<div id="div2-{!rep.id}">
<apex:outputPanel id="DL2" >
<apex:selectList value="{!selectedVal2}" size="1" id="SL2">
<apex:selectOptions value="{!list2}" />
<apex:actionSupport event="onchange" rerender="DL3"/>
</apex:selectList>
</apex:outputPanel>
</div>
<div id="div3-{!rep.id}">
<apex:outputPanel id="DL3" >
<apex:selectList value="{!selectedVal3}" size="1" id="SL3">
<apex:selectOptions value="{!list3}" />
</apex:selectList>
</apex:outputPanel>
</div>
.
.
.
</apex:repeat>
Issue: Rerender is not getting triggered on DL1. This seems to be because this is within the "repeat" because I have a similar feature implemented outside repeat and it works without any issues.
I tried the following options after browsing several links but still no luck
Set Outputpanel layout attribute to "none"
Tried to assign a dymanic id to Outputpanel. But VisualForce throws error " Literal value is required for attribute id in <apex:outputPanel>"
Modified code to rerender as rerender="repeat1:DL2"
Modified code to rerender as rerender = "{!$Component.DL2}
I am a newbie to SalesForce. Any help would be greatly appreciated!
Thank you!
{!rep}
and not{!var}
?repeat
generates anotheroutputPanel
whose id is "DL1". Unfortunately I don't think you can merge values into standard component ids. Have you tried rerendering the entirerepeat
?rerender
torepeat
id, this is not triggering too.