Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

rich:dataTable and rich:listshuttle rerendering issue

 
Pritamjeet Sarangi
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,


I have the follwoing issue regarding the ajax rerendering. I am using richfaces 3.3 along with Spring 2.5.6.

I have a rich:dataTable with binding attribute, as the columns in this case are dynamic so they get populated from the backing bean.

My requirement is to add a rich:listShuttle so that I can select/de-select or re-arrange the columns visible in the data table. This list shuttle opens up in a Modal Panel.

The issue is once I submit the modal panel and try to rerender the data table the data does not get refreshed. Only when I click F5 the tables gets refreshed.

Following are the sample code

The data table in my parent jsp


<h:form id="inquiryForm" ajaxSubmit="true">
< a4jutputPanel id="searchResultPanel" layout="block" ajaxRendered="true">
<rich:dataTable binding="<binding attribute>">
<some extra columns>
</rich:dataTable>
</h:form>


The list:shuttle modal panel is as following
<rich:modalPanel id="colChooserPanel1" >
<a4j:form id="colChooserForm1">

<rich:listShuttle sourceValue="<some value>"
targetValue="<some value>" var="items"
id="listShuttle" >
<rich:column>
<hutputText id="text6" value="#{items}"></hutputText>
</rich:column>

</rich:listShuttle>
<a4j:commandButton id="columnChsrOk1"
value="OK"
action="#{bean.actionMethod}"
reRender="searchResultPanel"
oncomplete="javascript: Richfaces.hideModalPanel('colChooserPanel1')"
/>
</a4j:form>
</rich:modalPanel>

Will appreciate the help

TIA.
 
Tim Holloway
Saloon Keeper
Posts: 18303
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Pritamjeet!

There's a "Code" button on the editor that will wrap special tags around selected text so that you won't lose your formatting or get emoticons displayed in the middle of your JSF elements.

A table display will update on one of 2 conditions:

1. You update/refresh the entire webpage.

2. You specifically request a reRender of the table or an element containing that table on an AJAX (a4j) request.

I didn't see an "id=" on your table or a reRender referencing your table (although I often am too blind to see the obvious). However, without those items, you'd fail on condition #2 and only a full-page update would work.
 
Pritamjeet Sarangi
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tim for your reply,

Here the first option suggested by you is working, but most of the time we get id not available issue as the table does'nt get rendered.
The second option is not working. For this the data part is refreshing but we have dynamic columns which are not getting refreshed.

Please, let me know if there are any other options.

TIA
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic