誰かがajaxを使用してページロード時にajaxを介してapexpageBlockTableをロードする方法を教えてもらえますか?apex actionFunctionの使用方法を示す例を見てきましたが、サンプルは通常単純です(たとえば、コントローラーから文字列を返し、それをページに配置します。コントローラーはsObjectのリストを返しますが、よくわかりません。それがどのように行われるか。
ページ:
<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>
コントローラ:
List<ContentDocument> topContent;
public List<ContentDocument> getTopContent()
{
if (topContent == null)
{
topContent = [select Id,Title from ContentDocument limit 10];
}
return topContent;
}