In your code that alters data raise an event:
| Events.instance().raiseEvent("YOUR_EVENT_NAME");
|
In code that can refresh the data model:
| @Observer("YOUR_EVENT_NAME")
| public void refreshTheDataModel() {
|
| // your code to refresh the data model goes here
I love elegant solutions.
Thanks a lot
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032051#4032051
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032051
___
jboss-user mail
I am getting greedy now. Is there somewhere I can place the event call inside a
@Conversational bean so that it will get fired on any @End call? I have many
many ways to end a conversation here.
I thought like this...
| @Remove @Destroy @RaiseEvent("YOUR_EVENT_NAME")
| public void destroy(
The booking example uses a transactionSuccessEvent for this.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032126#4032126
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032126
__
anonymous wrote : In your code that alters data raise an event:
It's better to use an afterTransactionSuccess event, more elegant txn model.
anonymous wrote : I am getting greedy now. Is there somewhere I can place the
event call inside a @Conversational bean so that it will get fired on any @En
Thanks for the response Gavin.
As the refresh is a potentially expenisve operation I wanted to limit it to
just the conversation that bean is involved in. I noticed the
org.jboss.seam.endConversation in the docs before but assumed it was any
conversation as it lacks the '' part such as for pag
That should have read...
conversation as it lacks the '' part such as for pageflows
org.jboss.seam.endPageflow.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032187#4032187
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=repl
Well, can't you use an action in the jBPM process definition for that?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=403#403
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=403
I also have a stateful page view that displays a list of as a @DataModel.
I also have conversations external to the page that manipulate entries int he
model.
I call back from the conversations... and manipulate the mode.
In my code that requires to manipulate the model Inject it.
|