我在visualforce頁面中設置了一些HTML表格,其中一些功能似乎超出了標準apex:datatable的掌握範圍。當用戶更新其中一個行的信息時,我試圖重新渲染表,以便反映更新後的值。如果我使用apex:datatable這可以正常工作,但是然後我失去了很多我必須添加到我的表中的功能。apex:actionFunction在非Visualforce組件上重新渲染
結構相當簡單,但是這是怎麼一回事呢:
<table>
<thead>
<tr>
<th>Col 1</th>
</tr>
</thead>
<tbody>
<apex:outputPanel id="table-panel">
<apex:repeat value="{!Parent}" var="row">
<tr name="{!row.Id}">
<td>Cell 1</td>
</tr>
<apex:repeat value="Child__r" var="child">
<tr name="child-{!row.Id}">
<td>Child Cell 1</td>
</tr>
</apex:repeat>
</apex:repeat>
</apex:outputPanel>
</tbody>
</table>
這在本質上,我試圖完成的功能,與它下面列出的父對象的孩子。到目前爲止,rerender會將我所有的表格元素轉換爲跨度,並完全無法處理所有內容。是否有可能重新渲染一個非Visualforce組件,或者,有沒有一種方法可以在apex中重現此功能:datatable?
謝謝!
我沒有在這裏看到任何問題,只是reRender你的「桌面」? – mast0r 2012-08-14 07:05:06