• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

rich:dataTable and rich:listshuttle rerendering issue

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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">
< a4j:outputPanel 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>
<h:outputText id="text6" value="#{items}"></h:outputText>
</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.
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic