Toolbars and context menus in WebApp

Post here questions and problems related to oXygen frameworks/document types.
PaulHayslett
Posts: 17
Joined: Fri Dec 12, 2014 5:59 pm

Toolbars and context menus in WebApp

Post by PaulHayslett »

What is the secret to getting custom toolbars and context menus to appear in the WebApp? I can see from the sample frameworks that it is possible. But the toolbars in my custom framework do not show. Nor can I find any code in the samples which would seem to make it happen.

Tracing through the Tomcat logs, I did find an error message to the effect that including a "minus" in hotkeys causes a Java exception. So I removed all hotkeys containing "minus". No more exceptions or any other error messages in the logs. But still not toolbar.

What am I missing?

Thanks.
cristi_talau
Posts: 495
Joined: Thu Sep 04, 2014 4:22 pm

Re: Toolbars and context menus in WebApp

Post by cristi_talau »

Hello,

One possible cause is that your custom actions use custom Java operations. These Java operations need to be annotated with @WebappCompatible in order to be used in WebApp. More details here [1].

If you added some JS code to your framework, it may help looking for errors in the browser console.

Best,
Cristian

[1] https://www.oxygenxml.com/doc/versions/ ... works.html
PaulHayslett
Posts: 17
Joined: Fri Dec 12, 2014 5:59 pm

Re: Toolbars and context menus in WebApp

Post by PaulHayslett »

Would "custom Java operations" include "ro.sync.ecss.extensions.commons.operations.InsertOrReplaceTextOperation"?

I have a stripped-down test framework which contains only a single action. I've removed all older versions of Oxygen from my dev machine, so it should be picking up whichever .jar shipped with V17.1. Still no toolbar when I bring up a doc in the WebApp.

I do have a few custom Java operations in the full framework. I don't mind modifying and recompiling those. But I'm going to be a little grumpy if I have to modify and recompile the standard libraries shipped with Oxygen.

Would it help if I posted a zip of my stripped-down test framework for someone to test on another system?
cristi_talau
Posts: 495
Joined: Thu Sep 04, 2014 4:22 pm

Re: Toolbars and context menus in WebApp

Post by cristi_talau »

Hello,

You'll have to annotate and re-compile only your custom operations. This annotation is intended to tell us whether the actions are webapp-compatible or not. For example, if you show a swing dialog while performing one of the operations, it will not work in webapp, so you may want to disable those in webapp by marking them @WebappCompatible(false).

The operation ro.sync.ecss.extensions.commons.operations.InsertOrReplaceTextOperation is already annotated by us.
Would it help if I posted a zip of my stripped-down test framework for someone to test on another system?
Yes, if you can post it I can give you further advice. You can also send it to our support email address: support@oxygenxml.com.

Best,
Cristian
Post Reply