Invoke JS Action through the operation defined in SDK

Oxygen general issues.
karthickmv
Posts: 5
Joined: Mon Oct 16, 2023 4:53 pm

Invoke JS Action through the operation defined in SDK

Post by karthickmv »

Hi,

I am trying to implement two things and would like to know if there are any solutions for this.
  • I would like to call the JS defined action from the Java code defined on the SDK's authoroperation Below is the snipped that i used and i am not able to determine the JS action in the map
    Map<String,Object> map =authorAccess.getEditorAccess().getActionsProvider().getAuthorExtensionActions();.
  • I am trying to read a response from the author operation, but the default method uses a "void" return type. And how do i read response if i could use a different class with the below snippet
    editor.getActionsManager().invokeOperation(
    'com.boeing.rsuite.oxygen.EditContentBear',
    function() {
    console.log('Done!');
    });
Thanks in advance,
Karthick
Bogdan Dumitru
Site Admin
Posts: 142
Joined: Tue Mar 20, 2018 5:28 pm

Re: Invoke JS Action through the operation defined in SDK

Post by Bogdan Dumitru »

Hello,

There is no way to invoke client-side actions (JS defined) from server-side (Oxygen SDK).

Regarding the void return type, if you want to return something from an AuthorOperation see AuthorOperationWithResult.
Bogdan Dumitru
http://www.oxygenxml.com
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Invoke JS Action through the operation defined in SDK

Post by Radu »

Hi,
One more thing, the Oxygen forum is divided in categories, right now you are in a category named "Oxygen XML Editor/Author/Developer" which is for Oxygen desktop.
I think that you should ask your WebAuthor questions in this category in the future:
common-problems-f34/
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply