Acessing a managed bean from another managed bean
posted 14 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
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.
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.
posted 14 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Welcome to the Javaranch, Anu!
You're doing it right. Almost.
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.
You're doing it right. Almost.
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.
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
Anu kuriakose
Greenhorn
Posts: 6
posted 14 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Thank you soo much for the reply.....ys now its working properly. I had done some mistakes in my web-config.xml
Thank u:)
Thank u:) posted 13 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
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?
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?
| If I'd had more time, I would have written a shorter letter. -T.S. Eliot such a short, tiny ad: Paul Wheaton's 16th Kickstarter: Gardening playing cards for gardeners and homesteaders https://coderanch.com/t/889615/Paul-Wheaton-Kickstarter-Gardening-playing |








