I have the following code.
<apex:outputPanel id="deliveryRights" rendered="true">
<table id="table">
<thead>
<tr>
<th>Category:</th>
<th>Product:</th>
<th>Details:</th>
<th>Delivered:</th>
</tr>
</thead>
<tbody>
<apex:repeat value="{!RightsTrackerListDelivery}" var="O">
<tr>
<td>
<apex:inputField value="{!O.Category__c}"/>
</td>
<td>
<input type="text" value="{!O.Product__c}"/>
</td>
<td>
<input type="text" value="{!O.Details__c}"/>
</td>
<td>
<apex:inputField value="{!O.Delivered__c}"/>
</td>
</tr>
</apex:repeat>
</tbody>
</table>
<div>
<apex:commandLink value="Add New Delivery Record" onClick="addTableRow();" id="addRowDelivery"/>
</div>
I have a list callled RightsTrackerListDelivery. When I edit the contents of the table I would like to be able to track the changes and update the rows dynamically.
I know this would be easier if I used an Apex component but I am forced to use a Apex repeat component.
I am using input fields to display the table data. I have the logic to add a new row but as for actually taking the new / editited values and passing them to the controller to update the list I'm a bit stuck.
Should I just loop though every cell, convert it all to a JSON object and pass it to the server?
Any ideas?
apex:repeat
your collection is already accessible from apex