Adding custom dialog from element drop down menu in author v

Post here questions and problems related to oXygen frameworks/document types.
easirois
Posts: 13
Joined: Thu Feb 04, 2010 10:37 pm

Adding custom dialog from element drop down menu in author v

Post by easirois »

Hi,

Is it possible to launch a dialog add a custom dialog for a specific element in the dropdown list from the author view, something like the current image dialog? I would expect at some point to use the ro.sync.ecss.extensions.commons.operations API to plop down some text after the user has made some selection in the dialog.

Kind regards,
Eric
easirois
Posts: 13
Joined: Thu Feb 04, 2010 10:37 pm

Re: Adding custom dialog from element drop down menu in auth

Post by easirois »

I see there's a sample code in the SDK but it seems to be available from everywhere. I would like it to be more context specific. So do I need to look at the
InsertElementOperation
to be able to do an action on s specific element.
alex_jitianu
Posts: 1016
Joined: Wed Nov 16, 2005 11:11 am

Re: Adding custom dialog from element drop down menu in auth

Post by alex_jitianu »

Hello Eric,

Let's make sure I've fully understood your scenario. You want to contribute an action to the content completion window. When this action is pressed it should present a dialog for user interaction. The action should also be presented only in specific contexts. If these assumptions are correct, here is what you should do:
1. Create a custom Author operation. This operation is Java code and is responsible for presenting the dialog.
2. Create an author action over the previous operation. A specific point of interest here is the field When this XPath expression is true. This XPath expression will give the context in which your action will be active. The action will appear only in these contexts.
3. Contribute this action to content completion window.

Best regards,
Alex
Post Reply