2013-02-08 96 views
0

p:commandLink s带有ID cl1cl2不会触发动作。 Tomcat控制台上没有任何东西,Firebug控制台上没有任何东西。p:commandLink不会触发动作

在这种情况下,我应该在哪里寻找问题,我认为我完全绝望,没有任何错误或例外,在两个控制台。

<ui:composition xmlns="http://www.w3.org/1999/xhtml" 
     xmlns:h="http://java.sun.com/jsf/html" 
     xmlns:f="http://java.sun.com/jsf/core" 
     xmlns:ui="http://java.sun.com/jsf/facelets" 
     xmlns:c="http://java.sun.com/jsp/jstl/core" 
     xmlns:o="http://openfaces.org/" 
     xmlns:p="http://primefaces.org/ui"> 
    <h:form> 
     <ui:repeat var="sharing" value="#{sharingController.myList}"> 
      <ui:repeat var="sharingComment" value="#{sharing.subCommentList}"> 
       <p:commandLink id="cl1" value="" process="@this" action="#{reportController.reportSharingComment(sharingComment)}" style="float:right;" id="sharingComment_alert" styleClass="icon_alert" title="#{msg['label.report']}" update=":messages" > 
       </p:commandLink> 
       <p:commandLink value="" id="cl2" process="@this" action="#{sharingController.deleteComment(sharingComment)}" style="float:right;" id="sharingComment_delete" styleClass="icon_delete" title="#{msg['label.delete']}" update="@form :messages"> 
       </p:commandLink> 
      </ui:repeat> 
     </ui:repeat> 
    </h:form> 
</ui:composition> 

我一个具体的名单后结构试图在嵌套ui:repeat然后commandlinks被解雇了,但我必须遍历像每一个在myList共享子commentlists场名单。我正在加载myList和每次共享我加载subCommentlist在一个for后构造,但我仍然不能使commandLink的火灾。

+0

您能否只发表相关的代码? “”标签中有数百行标记完全不必要。 – 2013-02-08 15:44:40

+0

有时,SO成员会告诉分享一切以找出问题,我将删除'ui:remove's – merveotesi 2013-02-08 16:21:17

+1

您确定这个组件不在另一个''的右边吗?因为这将是'form'嵌套,所以你的'UIInput's不起作用。此外,下次只需发布相关代码以重现问题,而不是整个代码。更多信息:[h:commandLink/h:commandButton未被调用](http://stackoverflow.com/q/2118656/1065197) – 2013-02-08 16:42:20

回答