I'm working on the following problem; I have an <apex:repeat>
element which contains a <tr>
. In some cells of the row I have an <apex:outputPanel>
element. If the page is rendered this results in a table with multiple rows. In each row some of the columns contain an outputPanel. Is there a way to rerender a single row's outputPanel? Or as an alternative; rerender a single row from the repeater? In my current solution every outputPanel is rerendered, but I get some quirky results.
My VF code looks like this:
<table>
<tr>
<th></th>
<th>Name</th>
<th>Added</th>
</tr>
<apex:repeat value={!people} var="person">
<tr>
<td><apex:inputCheckbox value="{!person.added}" onchange="addOrRemove('{!person.Id}'); /></td>
<td>{!person.Name}</td>
<td><apex:outputPanel id="personAddedPanel" rendered={!person.added}>Yes</apex:outputPanel></td>
</tr>
</apex:repeat>
</table>
<apex:actionFunction name="addOrRemove" action="{!addOrRemove}" rerender="personAddedPanel">
<apex:param name="firstParam" assignTo="{!curPersonId}" value="" />
</apex:actionFunction>
the addOrRemove
is an actionFunction that toggles the added boolean on the person and after that rerenders the outputPanel personAddedPanel
.