How can Actions block other Actions?

  1 post   Feedicon  
Replies: 0 - Last Post: August 25, 2011 09:00
by: cpudney
showing 1 - 1 of 1
 
Posted: August 25, 2011 09:00 by cpudney
G'day,

I have developed an application using BSAF that provides the following actions:

Open
Close
Save
Quit

They're implemented using the @Action annotation with Open and Save returning Tasks to perform the necessary i/o asynchronously.

The Open, Close and Quit tasks each call a method that checks whether the user has made any changes to the current project and if so offers them the opportunity to save their work. If the user chooses to do so then the Save action is performed.

Everything works as expected but there's one situation I'm having difficulty implementing neatly and that is when the Save action fails.

If the user has *first* been prompted to Save their work, and they elect to do so but the Save Task fails then I'd like to offer the user the opportunity to try the Save again. The problem is that because the Save Task is executed asynchronously, the Action that triggered the Save, say, an Open will have already asynchronously started its Task.

I need the Save to block Open/Close/Quit but this doesn't seem straightforward in BSAF.

Any suggestions?

Thanks,
Chris.
Replies: 0 - Last Post: August 25, 2011 09:00
by: cpudney
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120518.3c65429)
 
 
Close
loading
Please Confirm
Close