Jsf listener not called inside nested ui: repeat

I have a problem using ui:repeat nested within each other where I would like to call a listener. I also tried c:forEach , but got the same problem.

To demonstrate the problem, I simplified the problem code. There are two buttons, the first inside the first ui: repeat, invoking a successful simple listener. The second button is inside the nested ui: repeat element, it should call the same listener as the first button, but the listener is never called.

Could you tell me what happened to this?

 <div> <ui:repeat var="testList" value="#{testBean.testList}"> <h:commandButton value="test1"> // the listener is called if I click this button <f:ajax event="click" execute="@this" listener="#{testBean.testListener}" /> </h:commandButton> <ui:repeat var="nestedList" value="#{testList.nestedList}"> <h:commandButton value="test2"> // the listener will not be called if I click this button <f:ajax event="click" execute="@this" listener="#{testBean.testListener}" /> </h:commandButton> </ui:repeat> </ui:repeat> </div> 
+2
source share
1 answer

This is a well-known Mojarra question related to broken <ui:repeat> state management. In particular, this issue has been reported as issue 1817 and has been fixed since Mojarra 2.1.15.

Update your Mojarra version. It is currently already in 2.1.19.

+3
source

All Articles