• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

How to implement a rich:datatable that shows popup with message “Sorting in progress”

Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm new to JSF and Richfaces...

Our web application uses JSF 1.2 and Richfaces 3.1. We have a problem when the user does multiple click on the rich:datatable header to sort (before the results are back, the user end up clicking multiple time). To avoid this, i want to show a modal panel and hide when sorting is complete

I have a rich:datatable something like this

<rich:column id="lotno" sortBy="#{tableData.lots.id}">

<f:facet name="header">

<h:outputText value="Lot#" />


<h:outputText value="#{tableData.lots.id}" />


On Click of LOT# Header Column, I want to show a modal panel with message "Sorting is in progress please wait..." and once sorting is done, I want to hide the modal panel.

Can you please tell how to implement this i.e what event should i use to call "Richfaces.hideModalPanel("pleasewaitpanel");" and Richfaces.showModalPanel("pleasewaitpanel");


Can this be done using A4J:Status..? Code example with a4j:status will be of great help!!
Saloon Keeper
Posts: 22483
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Arunr!

There's a "Code" button on the message editor. Use it to wrap formatted text such as Java code and XML examples and they'll be easier to read.

I do use the "a4j:status" tag a bit, but it's for displaying simple messages, not for pop-up dialogs and other complex UI elements.

In general cases, I use the dialog show/hide javascript methods, and I also often change the mouse pointer to a "busy" pointer while stuff like this is going on.

In the case of the RichFaces extended datatable, it's a bit more problematical. They really should have handled those long waits better themselves. You'll probably have to experiment.
arunr ram
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Tim for the suggestion.

You are right that I should go for show/hide dialog using javascript or hour glass option.

The thing that I'm stuck is, I have 3 sortable columns out of total 6 columns and sorting should happen only when the header row click (not on row click) of those 3 columns.
My confusion is what is the event that I should use to show the dialog and using what event should i hide the dialog.

I experimented with this

but action event didn't get fired but oncomplete did.
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic