Hello,
The SimpleURLChooserEditor example in the SDF is the Java
implementation of a sample form control. It is not used in the SDF
project, however you can write a simple CSS file to add it on some
element like this:
myElement {
content: oxy_editor(
rendererClassName,
"ro.sync.ecss.extensions.commons.editor.SimpleURLChooserEditor",
swingEditorClassName,
"ro.sync.ecss.extensions.commons.editor.SimpleURLChooserEditor",
edit, "@my_attr",
columns, 20
)
}
The SimpleURLChooserEditor is present in Oxygen's classpath and so
the previous CSS is all you need. If you implement your own custom
form control there is one additional step to be performed: you
must pack it inside a JAR file and add it in the framework's
classpath [1].
The steps required for a custom form controls are:
- download the authorSDK [2]
- implement the custom form control by extending
ro.sync.ecss.extensions.api.editor.InplaceEditorRendererAdapter.
You can also take a look at
ro.sync.ecss.extensions.api.editor.AbstractInplaceEditor (it
offers some default implementations and some listeners management)
- pack the previous implementation in a JAR
- go to Oxygen and add the JAR inside the Classpath tab of the
framework [3]
- bind the form control in the CSS as described both in [4] and
also above.
[1]
http://www.oxygenxml.com/doc/ug-editor/index.html#topics/document-type-classpath-tab.html
[2]
http://oxygenxml.com/download_sdk.html?file=oxygenAuthorSDK.zip
[3]
http://www.oxygenxml.com/doc/ug-editor/index.html#topics/document-type-classpath-tab.html
[4]
http://www.oxygenxml.com/doc/ug-editor/index.html#topics/implementing-custom-form-controls.html
Best regards,
Alex
--
Alex Jitianu
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
On 27-Feb-14 8:00 PM, Nathan wrote: