• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Datatable

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I was hoping somebody could offer me the best way forward. I am still fairly new to JSF and am not sure how to proceed.

What I have is a backing bean with all the data I require that is populated into a rich:datatable. The issue I have is that one of the columns in the table is a column of buttons and I require for one of the rows to not have a button based on the data in the backing bean.

Ie. there are three possible rows returned to populate the table, and only if 2 specific rows are returned, I need only one of them to have a button, or better yet, for the button to span 2 rows and effectively apply to both.

If anyone has any ideas as to how to proceed it would be greatly appreciated.

Thanks,
Jason
 
Saloon Keeper
Posts: 27792
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JSF dataTables do not support the rowspan or colspan attributes that HTML tables do. People usually compensate by defining sub-tables to get the same appearance.

It's easy to control whether a button appears in a given cell, however. The "rendered=" attribute does that.
 
We must storm this mad man's lab and destroy his villanous bomb! Are you with me tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic