• 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

JSF BackingBean

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have problem with backingbean. I have java classes MenuItems and MenuBean (wich actualy suposed to act as BackingBean). The problem is the setter method is MenuBean.java.

Home.xhtml


MenuItems.xhtml


in runtime it shows nothink, it suposed to cal the method from the java classes. it dose overwrites defined name=menuItems in home.xhtml but it shows nothink.

MenuBean


MenuItems.java


Is there somethink missing in javacode?

kind regards,

ubey
 
ubey bey
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
SOLVED

I found the problem,i forgot to add

@ManagedBean
@RequestScoped

 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Congratulations!

But be careful - Request Scope is almost always useless in JSF. JSF relies heavily on postbacks, and postbacks span multiple requests, so anything in request scope tends to get trashed. Specifically, destroyed and re-created from scratch minus any stateful information you might have been keeping in it.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic