當標籤與ui:repeat
標籤一起使用時,我遇到了一個奇怪的問題!P:CommandLink不適用於ui:重複
commandLink根本不起作用。
這是我的XHTML代碼:
<h:form>
<ui:repeat varStatus="miteraionno" value="#{bussinessOwnerViewerMB.bOwner.bOBranches}" var="branch" >
<div class="details" >
<ul class="services">
<li>
<p:commandLink actionListener="#{bussinessOwnerViewerMB.testMethod}" styleClass="nav_services" oncomplete="">
<h:outputText value="#{branch.branchName}"/>
</p:commandLink>
</li>
</ul>
</div>
</ui:repeat>
的ActionListener的只是測試方法:
public void testMethod(){
System.out.println("BussinessOwnerViewerMB.changeMapListener()");
}
我嘗試c:foreach
,但它給了我同樣的結果!
任何幫助將不勝感激..
範圍到視圖範圍(因爲現在它的請求範圍)
而且讀子彈N#4爲了調試目的,將'
'放在頁面中,您將看到發生了任何錯誤。我也會刪除'我已經有 並且沒有錯誤信息出現! 我刪除了
2012-07-17 10:34:16
btw刪除了空的'oncomplete =「'' – Daniel 2012-07-17 11:03:17