| Author |
Access session Bean from another backing Bean
|
Daniel Breitner
Ranch Hand
Joined: Nov 13, 2008
Posts: 70
|
|
Hello everybody,
I have the following issue:
I have a session bean containing some information that I want to access in another backing bean.
So bean2 should somehow have access to bean1.
I thought I could use managed-properties for that but somehow I can“t find out how to do this.
Who can help me ?
with kind regards
daniel
|
Visit me at http://liferay-blogging.blogspot.com
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14456
|
|
You are correct. Inject the second bean into the first bean:
This bean has 2 other beans injected into it - categoryService and categoryKeyService. So in addition to the faces-config info, there are public setter methods which I've given the same names as the injected beans. Like so:
public void setCategoryService( CategoryServiceBean injectedbean) {
this.categoryService = injectedbean;
}
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
 |
I agree. Here's the link: jrebel
|
|
subject: Access session Bean from another backing Bean
|
|
|