• 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

[solved] datatable (tom) shows data only on first visit

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

i have a webapplication which loads some data from a database (postgresql). what i want to do is.
my class Article has among other things another class MediaType which stores 3 booleans (book, film, music), thats all stored in the DB with hibernate as OR-mapper. in my webapplication the user has three links he can click, books, films, music. if he decide to click on book he gets all articles wether the boolean book is true shown in a datatable. if he clicks on films he gets all films and so on. its half working....
...because its only working at the first click, then never shows its data again... only an empty table and no exception.

what can i do or if you look at my code, is there a better way to get what i want? i think the way i used in top-navigation.jsp (shown below) is very ugly.

my JSP which should show the datatable (showArticles.jsp)


the JSP where the user click on book, film, music (top-navigation.jsp):


the bean, which holds the data for showArticle.jsp (ShowArticlesBean):


the method which loads the data from the database:


the relevant code from the faces-config.xml:
 
Benjamin Dittwald
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
solved it, did some stupid things in top-navigation.jsp and ArticlePersistenceFacade... sorry for posting.
reply
    Bookmark Topic Watch Topic
  • New Topic