teo panait
teo panait

Reputation: 85

rerender rich:dataTable

I am having trouble re-rendering a rich:dataTable
My bean has list of strings, when I modify the list I want to re-render the table

I tried

<a4j:commandButton value="Add" action="#{bean.add}" reRender="table">
</a4j:commandButton>

In the been list I have the element but the rich:datatable with the id table doesn't rerender

I am using richfaces 4

Upvotes: 1

Views: 5224

Answers (1)

uı6ʎɹnɯ ꞁəıuɐp
uı6ʎɹnɯ ꞁəıuɐp

Reputation: 3481

Try to put your data table in an a4j:outputPanel and re-render the output panel instead:

<a4j:outputPanel id="tablePanel">
    <rich:dataTable ... >
    ..
    </rich:dataTable>
</a4j:outputPanel>

OutputPanel must be visible on first page load (rendered=true). You can not re-render elements which are not rendered on first page load.

Upvotes: 2

Related Questions