• 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

Simple CDI and JSF2

 
Logan Lee
Greenhorn
Posts: 18
Mac Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,

I'm looking into the new JEE6 features. I'm want to use CDI to display some dynamic list of books on a JSF2 page. But I can't see the list.
The page only displays the static string: "This is a list of the top selling books"

It seems the BookManager is not accessed. What do I need to add?

Thanks.

This is my books.xhtml file:


And a manager bean:
 
Logan Lee
Greenhorn
Posts: 18
Mac Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
mmmkay it's working now! Apparently a missing beans.xml was the problem.

I didn't put the beans.xml file in the WEB-INF. (or META-INF) directory.
The beans.xml file is empty but it is a required artifact. This file is used to enable CDI services.

No error messages in Jboss console....
 
Ruth Stout was famous for gardening naked. Just like this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic