aspose file tools*
The moose likes JSF and the fly likes [solved] datatable (tom) shows data only on first visit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "[solved] datatable (tom) shows data only on first visit" Watch "[solved] datatable (tom) shows data only on first visit" New topic
Author

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

Benjamin Dittwald
Greenhorn

Joined: Mar 05, 2009
Posts: 8
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

Joined: Mar 05, 2009
Posts: 8
solved it, did some stupid things in top-navigation.jsp and ArticlePersistenceFacade... sorry for posting.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [solved] datatable (tom) shows data only on first visit