I'm trying to do it this way, but doesn`t work
<h:panelGroup id="panel">
<rich:dataTable id="table">
...
</rich:dataTa开发者_StackOverflow社区ble>
</h:panelGroup>
<rich:modalPanel>
<h:form>
...
...
<a4j:commandButton value="Update dataTable" ajaxSingle="true" reRender="panel" process="..."/>
</h:form>
</rich:modalPanel>
Try to use <a4j:outputPanel>
to reRender the panelGroup
<a4j:outputPanel id="myOutPanel">
<h:panelGroup id="panel">
<rich:dataTable id="table">
...
</rich:dataTable>
</h:panelGroup>
</a4j:outputPanel>
Modal button...
<a4j:commandButton value="Update dataTable" ajaxSingle="true" reRender="myOutPanel" process="..."/>
You can check your code to see what id
the rendered html <table>
corresponding to your datatable
has. Or you can use the Firebug plugin for Firefox for this.
I am suggesting this because of you have included you datatable in a like this:
<form id="myForm">
<rich:dataTable id="myId">
</rich:dataTable>
</form>
, the id it will end up with will be myForm:myId
. So you must either:
- use
reRender="myForm:myId"
- use the
prependId="true"
on the form to prevent it from appending its own id to the components it includes.
The code that you have should work. Try adding a4j:log and check if the id (node) for re-render is found.
精彩评论