Even though it is possible to sort in a normal rich:dataTable because the graphical model supports it, the component actually does not support sorting out of the box. They just support it graphically so you can implement your own. We've had the same problem, it does work in Firefox and IE8 (IIRC) somehow, but it screws up in pretty much all the other browsers. This is 3.3.3 though, so if they've changed it in 4, disregard my words, otherwise, there's no need to even attempt it.
What you need is extendedDataTable, if you want sorting.
Your header should also not be a commandlink. That's not how you sort a column. Just an outputlabel.
check some examples on the richfaces site.
Also, you should REALLY follow your naming conventions. Not doing so leads to all kinds of confusion, and difficult to track bugs.
Oracle Certified Professional: Java SE 6 Programmer
Oracle Certified Expert: Java EE 6 Web Component Developer
Oracle Certified Expert: Java EE 6 Enterprise JavaBeans Developer
Joined: Jun 24, 2011
Facing same issue in ExtendedDataTable. I have used the commandLink for sorting as it was provided in the Richfaces website itself: RichFaces Showcase: DataTable
Anyhow can you provide me a working example for the case? Thanks for the reply though
Joined: Aug 06, 2010
Ah, I think I get it now. You're implementing your own sorting.
Well, first thing I'd do if I were you is follow naming conventions. You class name starts with no capital but your variable EL variables do. You might just have a capitalization problem there. Your class is called Alist and your managed bean is called AList, for instance. do you declare them as such in your faces-config?
Joined: Jun 24, 2011
Yes faces-config has the corresponding entry. I don't know how but today the project started showing the data, with the same code.
Then again it went blank. I created a new project and then ran it then also it didn't run. But now again its running... Phew...
I have replace the command link and using command button. But the sorting takes place only once once, the first time I hit the button. Thereafter the sorting doesn't take place, but it should be sorted either way as written in the code. And yes it runs on google chrome too.