I have a ui:repeat. I want it to refresh for every 5 seconds. I tried p:poll but it doesnt work. Is there any way to make this working?
<ui:repeat value="#{videoImpl.fGetAllComments()}" var="v" id="commentlist">
<div class="comment-entry"><h:outputText value="#{v.comment}"/></div>
</ui:repeat>
<p:poll update="commentlist" interval="5" />
The
<ui:repeat>doesn’t generate any HTML by itself. So there is no element withid="commentlist"in the HTML output and hence the JS code behind<p:poll>can’t find anything to update.Wrap it in another JSF component which renders a fullworthy HTML element, such as
<h:panelGroup>, and update it instead.