Combining different actions

Oxygen general issues.
bastjan
Posts: 3
Joined: Thu Dec 13, 2012 3:42 pm

Combining different actions

Post by bastjan »

Hi!

I have the following scenario: I want to add an action to the author mode (to the toolbar) that performs different steps. I have an action that sets the current date to a node in the xml-file, now I want to save the file automatically afterwards. I compiled a java class that saves the file. Both action do what they are suppsed to do when i run them separately. I thought I could just add another action to an existing action (since there is an "add"-option where an other action can be defined). But only the first action is executed when I click the button in the toolbar. Am I doing something wrong or is there something else I have to do to accomplish this task?

thanks in advance!
Radu
Posts: 9445
Joined: Fri Jul 09, 2004 5:18 pm

Re: Combining different actions

Post by Radu »

Hi,

An Author action can have several action modes which trigger certain operations when the activation XPath expression is fulfilled them.
Only the first action mode on which the XPath expression is fulfilled gets triggered.
So you cannot trigger two operations from the same action. You need an operation which both sets the date and saves the document. Of course you can have different parameters for an operation which can be configured when editing the action side.
Our API allows you both to make modifications to the XML structure and to save the file.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
bastjan
Posts: 3
Joined: Thu Dec 13, 2012 3:42 pm

Re: Combining different actions

Post by bastjan »

ah, ok. I hoped I could use it as a kind of pipe of different actions performed one after another. I will just edit the first action class und add the save command. thanks a lot!
Post Reply