File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes rich:dataTable and rich:listshuttle rerendering issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "rich:dataTable and rich:listshuttle rerendering issue" Watch "rich:dataTable and rich:listshuttle rerendering issue" New topic

rich:dataTable and rich:listshuttle rerendering issue

Pritamjeet Sarangi

Joined: Jul 05, 2011
Posts: 5

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>

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" >
<hutputText id="text6" value="#{items}"></hutputText>

<a4j:commandButton id="columnChsrOk1"
oncomplete="javascript: Richfaces.hideModalPanel('colChooserPanel1')"

Will appreciate the help

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17410

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.

An IDE is no substitute for an Intelligent Developer.
Pritamjeet Sarangi

Joined: Jul 05, 2011
Posts: 5
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.

I agree. Here's the link:
subject: rich:dataTable and rich:listshuttle rerendering issue
It's not a secret anymore!