<apex:panelbar> のベストプラクティス
- 子 <apex:panelBarItem> コンポーネントのコレクションの <apex:panelBar> コンポーネントへの追加
-
<apex:panelBar> コンポーネントに含めることができるのは、<apex:panelBarItem> の子コンポーネントのみです。ただし、子コンポーネントのコレクションを追加する必要がある場合があります。たとえば、取引先に関連付けられている取引先責任者ごとに項目を追加する必要がある場合などです。これを実行するには、次のように <apex:repeat> コンポーネントで <apex:panelBarItem> をラップします。
1swfobject.registerObject("clippy.codeblock-0", "9"); 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17<apex:page standardController="account"> 18 <apex:panelBar > 19 <apex:repeat value="{!account.contacts}" var="c"> 20 <apex:panelBarItem label="{!c.firstname}">one</apex:panelBarItem> 21 </apex:repeat> 22 </apex:panelBar> 23</apex:page>