Creating custom form controls

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

Creating custom form controls

Thu Jun 04, 2015 4:13 pm


I have been investigating the built in form controls that can be provided via css to the Oxygen Author users. However, I wish to replace an entire set of elements by a custom form that my users can fill out. The nature of the data being selected makes it impossible to do just with CSS. Consequently, I want to create a customr form control as described here: ... trols.html

I already have a development environment setup in eclipse and have a plugin that provides toolbar functionality available for debugging.

After reading the section and looking at other examples on the forum, I realize I need to create two classes: ro.sync.ecss.extensions.api.editor.InplaceRenderer and a ro.sync.ecss.extensions.api.editor.InplaceEditor. I don't understand what the difference is between these two classes and what they are supposed to be doing. I know that the InplaceEditor provides the custom form object that the user interacts with, as seen in this example: post30533.html?hilit=custom%20form%20controls#p30533.

However, what is the purpose of the InplaceRenderer? How would I go about setting up a custom form control that would fill out an entire structure? Are there any examples that show how a more complex custom form is created? Thank you for all your help.

XML Programmer, Technical Writing
Matrox Imaging
Posts: 5876

Re: Creating custom form controls

Fri Jun 05, 2015 9:53 am

Hi Dirk,

Indeed you need two java implementations, one for the editor and one for the renderer.
When you open the XML document and you just scroll through it or work without interacting with any form control in the page, the renderers will be used to visually present the form control in the document.
The renderer needs to be Java Swing based.
When you click inside a form control or you use TAB to give focus to it, the renderer for that form control is replaced with the editor which is actually added there and interacts with you until you click in another location in the document to stop the editing. The editor needs to be SWT based.

If you email us ( I could try to give you some sample Java sources for a renderer and SWT-based editor to get you started.

Radu Coravu
<oXygen/> XML Editor

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

Who is online

Users browsing this forum: No registered users and 1 guest