Reputation: 1247
I have two Java beans for my webapp: one is the userController and the other is the profileController. Both of them are conversation scoped. I want that when the current user in the userController is changed, the profileController detects the change and changes its current profile. How to achieve this?
Upvotes: 4
Views: 82
Reputation: 10139
There has to be a mechanism that listen each other. You can use Observer Pattern.
Upvotes: 0
Reputation: 777
You could achieve this using the Observer Pattern.
The ProfilerController should suscribe to UserController events.
Upvotes: 1