Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Benjamin Dittwald
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
solved it, did some stupid things in top-navigation.jsp and ArticlePersistenceFacade... sorry for posting.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic