Hi,
Can someone tell me how to use ajax to load an apex pageBlockTable via ajax on page load? I've seen examples showing how to use an apex actionFunction, but the samples are usually simple (e.g. - returning a string from the controller and putting it on the page. My controller returns a list of sObjects and i'm just not quite sure how it's done.
page:
<apex:pageBlockTable value="{!TopContent}" var="item">
<apex:column headerValue="Title">
<apex:outputLink value="/sfc/#version?selectedDocumentId={!item.Id}">
{!item.Title}
</apex:outputLink>
</apex:column>
</apex:pageBlockTable>
controller:
List<ContentDocument> topContent;
public List<ContentDocument> getTopContent()
{
if (topContent == null)
{
topContent = [select Id,Title from ContentDocument limit 10];
}
return topContent;
}