5.13.3 Implementation info
A part editor is implemented by means of a CForm (Cocoon Form). This consists of a form definition and a form template. To fit into Daisy's document editor framework, there are two things you need to pay attention to:
- The form definition should declare an action with id "dummy", as follows:
<fd:action id="dummy"> <fd:label>dummy action</fd:label> </fd:action>
This action is needed for the working of the document editor, you simply need to add it and not care about it otherwise (i.e. you do not need to insert it into your form template).
- The form template should not contain a ft:form-template element, as it will be embedded inside the document editors' template.
Besides the form definition and template, you need to implement the interface org.outerj.daisy.frontend.PartEditor (and corresponding PartEditorFactory). This interface defines methods that will be called for constructing, loading and saving of the form.
To learn more, it is best to explore the sources of the default Daisy part editors.