• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSF BackingBean  RSS feed

 
ubey bey
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • 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: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SOLVED

I found the problem,i forgot to add

@ManagedBean
@RequestScoped

 
Tim Holloway
Bartender
Posts: 18715
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!