AuthorOperation finished event

Post here questions and problems related to oXygen frameworks/document types.
Johann
Posts: 59

AuthorOperation finished event

Fri Jun 23, 2017 2:59 pm

Hi everyone,

Is there any event fired when an AuthorOperation (more specifically an InsertFragmentOperation) is finished ?

Thanks !

Johann
Radu
Posts: 5088

Re: AuthorOperation finished event

Fri Jun 23, 2017 3:13 pm

Hi Johann,

I need more context about your use case.
One option for you would be to extend our "ro.sync.ecss.extensions.commons.operations.InsertFragmentOperation" with your custom operation which notifies a static set of listeners when it gets invoked. Then for all actions use your custom operation instead of ours.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Johann
Posts: 59

Re: AuthorOperation finished event

Fri Jun 23, 2017 3:30 pm

Hi Radu,

Here is my use case.
I have a webservice which allows to insert an XML fragment at a specific XPath in my document. I would like to notify that the insertion has been done successfully in the response of the webservice.
At the moment, once the InsertOpeartion is invoked, the webservice response is returned... and problems seem to happen when several call of this webservice come one after another. The document seems not to have finished the insertion and try to do another one.

I would like to continue using InsertFragmentOperation and I want to know when the fragment has been really inserted and the document is ready for a new insertion.

Johann
Radu
Posts: 5088

Re: AuthorOperation finished event

Fri Jun 23, 2017 3:48 pm

Hi Johann,

Is this question about the Author Component that you are using in your own Swing application or about our Oxygen Online Web editor?
If it's about the former modifications to the document must always be done on the AWT thread. So if you have multiple invocations of operations from multiple threads, you need to make sure only one of them executed changes at once and that all other invocation are blocked waiting for the current operation to finish.
About your remark:

The document seems not to have finished the insertion and try to do another one.


How did you realize this?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Return to “SDK-API, Frameworks - Document Types”

Who is online

Users browsing this forum: No registered users and 2 guests