So I got my Visualforce Page
to display a table with columns (e.g. Version
, Date
, Type
, etc.) as well as values from a dataset for each corresponding column of the next rows.
I'm trying to integrate Custom Settings
in the form of selected fields, to be able to determine which columns show up on the Visualforce Page
. I've created a Select Fields
custom setting in the form of checkboxes for each column name.
Here's my markup without the custom settings integration:
<head>
<apex:includescript value="//code.jquery.com/jquery-1.11.1.min.js" / >
<apex:includescript value="//cdn.datatables.net/1.10.4/js/jquery.dataTables.min.js" />
<apex:stylesheet value="//cdn.datatables.net/1.10.4/css/jquery.dataTables.css" />
<script>
j$ = jQuery.noConflict();
j$(document).ready( function () {
var Timeline = j$('[id$="Timeline"]').DataTable({
});
});
</script>
</head>
<body>
<table id="Timeline" class="display">
<thead>
<tr>
<th>Subscription Version</th>
<th>Start Date</th>
<th>End Date</th>
<th>Amendment</th>
<th>Amendment Date</th>
<th>Amendment Type</th>
<th>Amendment Description</th>
<th>Charge Name</th>
<th>Charge Price</th>
</tr>
</thead>
<tbody>
<apex:repeat value="{!subscriptionInfo}" var="cs">
<tr>
<td>{!cs.version}</td>
<td>{!cs.startDate}</td>
<td>{!cs.endDate}</td>
<td>{!cs.amendment}</td>
<td>{!cs.effectiveDate}</td>
<td>{!cs.amdType}</td>
<td>{!cs.description}</td>
<td>{!cs.chargeName}</td>
<td>{!cs.price}</td>
</tr>
</apex:repeat>
</tbody>
</table>
</body>