我有一個數據表,我打開並點擊圖像<rich:modalPanel>
。但<rich:componentControl for="panel" attachTo="showPreview"
必須有確切的ID,在我的情況如下:showPreview
,但我的鏈接是一個DataTable中,它會像2:showPreview
生成..... n:showPreview
如何知道在JSF 1.2和richfaches從h:列h:數據表中的id
有沒有辦法知道在哪個我是表的行,得到一個動態綁定?
我在JSF 1.2 XHTML看起來是這樣的:
<h:dataTable styleClass="tb_tabletag" id="dtContentPosts" value="#{listOfObjects}" var="object">
<h:column id="columnnumber" >
<h:outputLink id="showPreview" value="#">
<h:graphicImage value="preview.png" />
<rich:componentControl for="panel" attachTo="showPreview" operation="show"
event="onclick"/>
</h:outputLink>
</h:column>
</h:dataTable>
...
...
...
<rich:modalPanel id="panel" autosized="true">
some stuff
</rich:modalPanel>
感謝您的幫助!
檢查RichFaces的3.3'<豐富:modalPanel>現場演示'和'<豐富:dataTable>將'例如:[編輯表ModalPanel(HTTP://livedemo.exadel .com/richfaces-demo/richfaces/dataTable.jsf?tab = editDataTable) –