• 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

how to disable datascroller in jsf when the datatable doesn't have any records

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how to disable datascroller in jsf when the datatable doesn't have any records
 
Saloon Keeper
Posts: 27763
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
That depends partly on what you are using for a datascroller. There is no datascroller UI component in the core JSF. To get one, you have to either design/code/debug/maintain one of your own or use a third-party JSF extension tagset such as Tomahawk or RichFaces.

It also depends on how you define "disable". Whether you want the scroll gadget literally disabled (visible ghosted) or not displayed (rendered) at all.

However, one thing that you can rely on almost universally is that as long as your target dataTable has a statically-determined sized (something like a ListDataModel as opposed to a JDBC datamodel), then the following EL construct should work:


You can also use the "empty" EL expression to hide empty tables and/or display "No Data Available" messages.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic