Using two or more ActionService.execute() in a same class or same method
Hi, everyone.
I have problem using ActionService execute method.
I have an action named customaction . This action open an container dialog container which its container component calls CustomContainer class (extends DialogContainer) ...
In CustomContainer class I want execute two actions ( myexportrenditionaction and checkout ) . I have created myexportrenditionaction and its call custom container class. myexportrenditionaction action export document rendition to the client which client user not select destination directory, because custom class select directory automatically (for example: String destDirectory = "C:\\temp\\test") . it works well. there is not any problem. and chekout action is work too.
There is no problem with actions. They work separately. but I want execute this actions in the same method or the same time. However when I place those actions in the same method together the method execution fails. How can I execute they together?
in CustomContainer class onInit method :
public void onInit(ArgumentList args) {
super.onInit(args);
String id = args.get("objectId"); // document id
ArgumentList rendArgs;
rendArgs.add("objectId", id);
rendArgs.add("contentType", "xml");
ArgumentList checkoutArgs;
checkoutArgs.add("objectId", id);
// ActionService.execute("myexportrenditionaction", rendArgs, getContext(), this,null);
// ActionService.execute("checkout", checkoutArgs, getContext(), this,null);
}
There is no problem with actions, problem is that how can I execute them together?
Best Answer
-
I have found solution
We can execute actions together like this:
public void onInit(ArgumentList args) { - - - - - - - - - - - - ActionService.execute("myexportrenditionaction", rendArgs, getContext(), this, new CallbackDoneListener(this,"completeAction") );}public void completeAction(String s, boolean flag, Map map) { ArgumentList checkoutArgs = new ArgumentList(); checkoutArgs.add("objectId",ID); ActionService.execute("checkout", checkoutArgs, getContext(), this,new CallbackDoneListener(this,null));}
0
Answers
-
I have found solution
We can execute actions together like this:
public void onInit(ArgumentList args) { - - - - - - - - - - - - ActionService.execute("myexportrenditionaction", rendArgs, getContext(), this, new CallbackDoneListener(this,"completeAction") );}public void completeAction(String s, boolean flag, Map map) { ArgumentList checkoutArgs = new ArgumentList(); checkoutArgs.add("objectId",ID); ActionService.execute("checkout", checkoutArgs, getContext(), this,new CallbackDoneListener(this,null));}
0 -
I have pass the parameter but whenever We try to get argument in component behavior class it is null;
help me
0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 150 General Questions
- 148 Thrust Services
- 57 OpenText Hackathon
- 37 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 32 eDOCS
- 186 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 8 XM Fax
- Follow Categories