I'm trying to update the content of a selected tab, but no methods seem to work.
This sort of what I have:
<h:form id="tabsForm">
<p:tabView id="tabs"
dynamic="true"
cache="false"
value="#{mainPage.versions}"
var="version"
scrollable="true">
<p:ajax event="tabChange" listener="#{mainPage.onTabChange}" />
<p:ajax event="tabClose" listener="#{mainPage.onTabClose}" />
<p:tab id="version" title="#{version.value}" closable="true">
<p:poll interval="5" update=":tabsForm:tabs" oncomplete="doSomething()"/>
CONTENT GOES HERE (ALSO NEEDS TO BE UPDATED)
</p:tab>
</p:tabView>
</h:form>
The Line:
<p:poll interval="60" update=":tabsForm:tabs" oncomplete="doSomething()"/>
Supposed to update the content inside each tab every 60 seconds, The problem is, it will always select the first tab after the update
.
I tried to update a tab separately, this way:
<p:poll interval="60" update=":tabsForm:tabs:version" oncomplete="doSomething()"/>
But I get an exception:
Can not update component "org.primefaces.component.tabview.Tab" with id "tabsForm:tabs:0:version" without a attached renderer. Expression ":tabsForm:tabs:version" referenced from "tabsForm:tabs:0:j_idt14"
I also tried a lot of other methods from questions I found here on SO, but nothing is working. It either updates and selects the first tab for me or doesn't update at all.