• 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 ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Himai Minh
  • Carey Brown
  • salvin francis

Mulitple headings for sortable datatable column?

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

I have built a datatable using jsf and tomahawk. It looks somewhat simplyfied like this:



As you can see a have a backing bean called testUseCaseBean used to retrieve the transactions that populates the table. What I would like to do is to split the heading (Name / date) of this first column (only one visable in the example) and fil it with both both name and date in each row. Then I would like to be able to sort the column clicking either date or name. The problem for me is that only one header is allowed and that each sortable column only can send one value to the useCaseBean.

Does anyone know if there is a solution for this using jsf?
 
author and cow tipper
Posts: 5000
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found the h:dataTable runs out of steam quickly when you want to perform even relative simple customizations. I found writing a custom bean was the solution for many extensions like these, or perhaps use something like the RichFaces extended datatable component.

-Cameron McKenzie
 
Saloon Keeper
Posts: 22779
153
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't quite follow all that - it sounds like you want to have 1 column that acts like 2 columns. But you might want to look at the RichFaces extended datatable control. It has a fairly rich set of both formatting and sorting options, and RichFaces and Tomahawk can co-exist fairly well (I'm doing that right now).
 
Damien Edison
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Holloway wrote:I don't quite follow all that - it sounds like you want to have 1 column that acts like 2 columns. But you might want to look at the RichFaces extended datatable control. It has a fairly rich set of both formatting and sorting options, and RichFaces and Tomahawk can co-exist fairly well (I'm doing that right now).



Yes that is correct. I want to place the name and date in the same column with the date on top. This because I want to save table witdh as I will have a lot of more columns not introduced in the example code. Thanks for your answers, I'll look into the RichFaces extended datatable control.

/Dejmien
 
Look ma! I'm selling my stuff!
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic