我在数据表的列中有一个计数器。一旦计数器达到特定时间,我只需要更改该列的背景颜色。该表的数据正在从数据库中提取。我正在使用a4j:poll重新调用列,但问题是整个表格都被渲染。下面的一些代码:如何更新jsf数据表只有
<a4j:region>
<h:form>
<a4j:poll id="poll" interval="1000" enabled="true" reRender="blink" limitToList="true" />
</h:form>
</a4j:region>
<h:form id="form1">
<a4j:outputPanel id="panel1" ajaxRendered="true">
<h:dataTable id="blinks" styleClass="tableClass" value="#{bean.list}" var="_item">
<h:column id="blink">
<f:facet name="header">
<h:outputText value="Header1" />
</f:facet>
<div id="div1" class="#{bean.check() ? 'red' :''}">
<h:outputText value="Counter text (counts seconds)" />
</h:column>
</h:dataTable>
</a4j:outputPanel>
</h:form>
谢谢丹尼尔。之后我会尝试更新。 – user3389171 2014-11-24 15:41:35
丹尼尔,我能够使用Omnifaces实现解决方案。谢谢你的建议。 – user3389171 2014-12-03 20:15:43