wood burning stoves 2.0*
The moose likes JSF and the fly likes How to implement a rich:datatable that shows popup with message “Sorting in progress” Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "How to implement a rich:datatable that shows popup with message “Sorting in progress”" Watch "How to implement a rich:datatable that shows popup with message “Sorting in progress”" New topic
Author

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

arunr ram
Greenhorn

Joined: Jul 28, 2011
Posts: 3
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">

<hutputText value="Lot#" />

</f:facet>

<hutputText value="#{tableData.lots.id}" />

</rich:column>

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");

OR

Can this be done using A4J:Status..? Code example with a4j:status will be of great help!!
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16061
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
arunr ram
Greenhorn

Joined: Jul 28, 2011
Posts: 3
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to implement a rich:datatable that shows popup with message “Sorting in progress”