Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I know this should work, so what is wrong?

 
Jonny Andersson
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MoviePage is a managed bean with a method getMovieListByLocation() that returns a map<String, Collection<Movie>> and #{movieItem.key} in the code below should then be a String and #{movieItem.value} should be the collection that is handed over to the datatable. But nothing is printed on the output page despite I know that there is data returned. I think I am doing something stupid with the JSF/JSP-syntax but can't see it myself.

 
Stefan Evans
Bartender
Posts: 1755
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From my experience the JSTL tags and JSF tags don't play so well together.

First suggestion: Start with one movieList. Make sure your Datatable is working as expected.
Then try adding the forEach tag and see if it breaks again.

 
Jonny Andersson
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an another page where I have only one big movie list that is displayed with a data table and that works. But I think you are right in that it is a good idea to try this also with only one list first. But if JSTL and JSF don't play well together, could it be a good idea if the for each were replaced with a data table which then cause a data table to be nested within a data table? It is not as a beautiful solution as with the for each but if it works would it be good enough. I'll try to play with this again some time during the weekend.

Thanks for your advice!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic