[jboss-user] [JBoss Seam] - Re: Update Data Model from another Bean
jacob.orshalick
do-not-reply at jboss.com
Wed Dec 12 13:03:35 EST 2007
You could use the event model provided by Seam. In the updateuser bean simply raise an event:
...
| public void updateUser() {
| ...
| Events.instance().raiseEvent("userUpdated", user);
| }
| ...
Listen for that event in a method in your getusers component:
...
| @Observer("userUpdated")
| public void updateDataModel(User user) {
| // update the associated user in users2
| }
| ...
Another option if you don't want to pass the user that was updated through the event, you could simply re-execute the factory method and use the @RaiseEvent annotation on the updateUser() method. Hope that helps.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4112323#4112323
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4112323
More information about the jboss-user
mailing list