【发布时间】:2012-07-16 05:16:56
【问题描述】:
当我将p:commandLink 标签与ui:repeat 标签一起使用时,我遇到了奇怪的问题!
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,但结果相同!
任何帮助将不胜感激..
【问题讨论】:
-
将
<p:messages />放在您的页面中用于调试目的,您将看到发生的任何错误。另外我会删除<h:ouputText />并将其放入<p:commandLink />作为值参数 -
我已经有
并且没有出现错误信息!我删除了 -
b.t.w 删除空的
oncomplete=""