• Post Reply Bookmark Topic Watch Topic
  • New Topic

forEach tag

 
Popescu Ion
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Have this JSF page :

and the bean:

why I'm getting the same error every time:


Any help will be appreciated. Thnx
 
Greg Charles
Sheriff
Posts: 3010
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to instantiate selectedItems to something, like an ArrayList. At the moment, you'll get NullPointerExceptions in the constructor.
 
Popescu Ion
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greg Charles wrote:You have to instantiate selectedItems to something, like an ArrayList. At the moment, you'll get NullPointerExceptions in the constructor.


I modified, but I'm getting the same error, please help !
 
Stefan Evans
Bartender
Posts: 1822
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ClassNotFound: javax/servlet/jsp/jstl/core/LoopTagStatus

Well that class is a JSTL class.
Do you have the JSTL library in your classpath?

I would also recommend not mixing the JSTL and JSF tag libraries.
If you are going to write JSF, then just stick to the JSF taglibraries.

That means for displaying a list of results you should probably use a h:dataTable
 
Tim Holloway
Bartender
Posts: 18417
60
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stefan Evans wrote:
That means for displaying a list of results you should probably use a ht:dataTable


I think Stefan meant "h:dataTable". I, of course, never maek tiping misnakes.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!