File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
arunr ram
Greenhorn
Posts: 3
  • 0
  • 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">

<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
Pie
Posts: 17616
39
Android Eclipse IDE Linux
  • 0
  • 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
Greenhorn
Posts: 3
  • 0
  • 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.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic