【问题标题】:How to reRender one cell @ rich:dataTable如何重新渲染一个单元格@rich:dataTable
【发布时间】:2011-04-20 16:50:12
【问题描述】:

我目前正在使用rich:dataTable 来显示数据库中的一些信息。一旦用户单击特定链接,我想重新渲染该表中的单个单元格。我的问题是我不知道从哪里获取单元格的完整 ID (tableId:consecutiveNumber:cellId)?如果我只是在 reRender 属性中使用 cellId,它不起作用。

作为一种“解决方法”,我只是重新渲染整个表格,但如果可能的话,我想避免这种情况。

谢谢!

【问题讨论】:

    标签: richfaces


    【解决方案1】:

    通过 rich:dataTable 上的 ajaxKeys 属性指定行 ID,并通过标准 reRender 指定行内的哪个组件。像这样的:

    <a4j:commandButton reRender="di2"/>
    <rich:dataTable ajaxKeys="#{bean.rows}">
      <rich:column>
        <h:outputText id="di2"/>
      </rich:column>
    
    </rich:dataTable>
    

    【讨论】:

      猜你喜欢
      • 2013-06-26
      • 2011-08-28
      • 2011-11-05
      • 2020-04-25
      • 2021-04-18
      • 2015-12-15
      • 2019-05-14
      • 2016-05-17
      • 2021-07-03
      相关资源
      最近更新 更多