I'm trying to update a repeater list with AJAX based on this : How to re-render <ui:repeat> using <f:ajax render>
But the HTML list is not updated after the first load, even if the ArrayList in the ManagedBean is.
Here is what I have in my xHTML file :
<h:form>
<h:panelGroup id="messages">
<a4j:repeat var="mes" value="#{talking.listMessages}">
<h:outputText value="#{mes.sendTime}">
<f:convertDateTime type="date" pattern="dd-MM-yyyy HH:mm"/>
</h:outputText>
#{mes.content}
</a4j:repeat>
</h:panelGroup>
<a4j:commandLink action="#{talking.testAdd}">
<h:outputText value="Add Item" />
<f:ajax execute="@form" render="messages" />
</a4j:commandLink>
</h:form>
In the MB I did this simple action :
private ArrayList<Message> listMessages;
public void testAdd() {
this.listMessages.add(new Message(/* [...] */));
}
Did I miss something ?