Hi,
I am new to jsf.My problem is I am not able to access a property value from one bean in another bean..can somebody please help.
I have an addressBook bean.I want to access this bean in my groups bean,where both my beans are session scoped. I Tried using @ManagedProperty but did not get a result.This is how i do it.
@ManagedBean
@SessionScoped
public class Groups extends GroupStore {
@ManagedProperty(value="#{addressBook}")
private AddressBook a;
public void setA(AddressBook a) {
this.a = a;
}
But it gives this eror .
Unable to create managed bean groups. The following problems were found: - Property addressBook for managed bean groups does not exist. Check that appropriate getter and/or setter methods exist.
You apparently didn't publish a bean named "addressBook". If you're using the annotations on the AddressBook class, make sure that you have the "@ManagedBean" annotation set up correctly in AddressBook.java.
Customer surveys are for companies who didn't pay proper attention to begin with.
Anu kuriakose
Greenhorn
Joined: Mar 13, 2011
Posts: 6
posted
0
Thank you soo much for the reply.....ys now its working properly. I had done some mistakes in my web-config.xml Thank u
Lito Juliano
Greenhorn
Joined: Sep 20, 2012
Posts: 1
posted
0
I having the same problem.
How to get value from extends bean?
in my class
public class c002Bean extends LoginMB {
....
}
in my LoginMB i have a value of email field.
how do?
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: Acessing a managed bean from another managed bean