How can i update datatable in primefaces.Datatable updates only when i refresh the page. I have found some solutions but none of them worked for me.For example when i change update to ":companyForm:companyPanel" save button disappers. I removed colon and now i can see button but still doesn't update datatable. Here is my jsf page;
<h:form id="companyForm" prependId="false">
<p:panel id="companyPanel">
<p:dataTable id="companyListTable">
//columns
</p:dataTable>
</p:panel>
<p:outputPanel id="newDatePanel">
<p:commandButton value="Save"
update="companyForm:companyPanel
companyForm:newDatePanel"
action="#{myController.save()}"/>
</p:outputPanel>
</form>
and my spring controller;
init(){
companyList = service.getAllCompany();
}
public void save(){
service.save(company);
}