Page 1 of 1

Invoke JS Action through the operation defined in SDK

Posted: Tue Oct 17, 2023 12:38 pm
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

Re: Invoke JS Action through the operation defined in SDK

Posted: Tue Oct 17, 2023 3:34 pm
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.

Re: Invoke JS Action through the operation defined in SDK

Posted: Wed Oct 18, 2023 7:47 am
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