-
1. Re: sort table help
gjeudy Jun 23, 2008 4:30 PM (in response to albtorresmo)You did not explain clearly what is the problem.
Try checking Richfaces demo its a good starting point, go in Data Iteration - Table Sorting section.
You can also check out Richfaces Dev Guide.
-
2. Re: sort table help
albtorresmo Jun 24, 2008 8:24 AM (in response to albtorresmo)What I said is that when I insert sort atributes as in richfaces demo inside a rich datatable,
It does not work becouse it looks as allways,with nothing new, no sort click appear.
And I try a lot of times to make it works but i can not.
Thanks
-
3. Re: sort table help
suckerd Jun 24, 2008 11:26 AM (in response to albtorresmo)Well no xhtml code so I'll just post a working example:
The trick is sortBy with hash and brackets.
<rich:dataTable value="#{bean.sortData}" var="data" width="300px" columnClasses="center" rows="10"> <f:facet name="header"> <h:outputText value="Sorting Example"/> </f:facet> <rich:column> <f:facet name="header"> <h:outputText value="ID"/> </f:facet> <h:outputText value="#{data.id}"/> </rich:column> <rich:column sortBy="#{data.foo}"> <f:facet name="header"> <h:outputText value="Foo"/> </f:facet> <h:outputText value="#{data.foo}"/> </rich:column> <rich:column sortBy="#{data.bar}"> <f:facet name="header"> <h:outputText value="Bar"/> </f:facet> <h:outputText value="#{data.bar}"/> </rich:column> </rich:dataTable>
CU Mike
-
4. Re: sort table help
albtorresmo Jun 25, 2008 8:30 AM (in response to albtorresmo)Hello Mike,
Yes, this is what a try, and I have tried more options that i have found on the internet, but it doesn´t work, nothing new appear for sort the table.
Thanks
-
5. Re: sort table help
mail.micke Jun 25, 2008 9:24 AM (in response to albtorresmo)In which scope is your backing bean, it isn't event/request scope is it?
micke
-
6. Re: sort table help
albtorresmo Jun 25, 2008 10:39 AM (in response to albtorresmo)Hello,
My backing bean is session scope.
do you know how to view the properties on my api jar?
thanks a lot,
-
7. Re: sort table help
mail.micke Jun 25, 2008 11:12 AM (in response to albtorresmo)Hi
Session socpe is fine.
What propeties do you want to view?
I think you need to post the xhtml and java code, I have no idea why it doesn't sort for you. The sorting just works for me.
The only other thing I can think of is validation error perhaps, do you have a rich:messages in the page?
Are you absolutely sure the 3.2.1 version of RichFaces is used, no other old version on the classpath (should be logging when it loads taglibs which includes version number)?
Good luck,
Micke
-
8. Re: sort table help
pwojewodka Jul 3, 2008 11:54 AM (in response to albtorresmo)I came accross the same problem... Need I do anyhing except things in your file Mike? Because my file is similar to yours and still without clickable column name. Is clickable column name created by default when sortBy is used on column?
Thanks in advance
-
9. Re: sort table help
jchouinard Jul 3, 2008 5:08 PM (in response to albtorresmo)I had the same problem, just updated to the last RichFaces and then it was allright. So make sure your libs are from the right version.