When a user requests a web form, an XForm is dynamically generated from the XML schema, and any dynamic includes / imports listed in the XML Schema are executed. The XForm is then interpreted to produce an HTML form, which is presented to the user and used to capture the data that ends up in the XML document saved into the repository.
Ability to add custom widgets to the library of widgets available for use in Web Forms
Implementing Custom Widgets
Detailing how Dojo widgets are implemented is beyond the scope of this document, however Alfresco recommends a two step process for developing and integrating custom Dojo widgets into Alfresco:
Develop and test the widget outside of Alfresco (for example in a static HTML page)
Integrate the tested widget into Alfresco and test it in a Web Form
Integrating a custom Dojo widget into Alfresco involves:
Adding your custom widget definition to xforms.js (located in the /scripts/ajax/ directory in alfresco.war)
Registering the new widget with Alfresco in web-client-config-wcm.xml (located in the /WEB-INF/classes/alfresco/ directory in alfresco.war), giving it a symbolic name as part of that process
Updating your Web Form XML Schema(s) to use your custom widget, by putting the widget's symbolic name in the 'appearance' annotation of the relevant element(s)
Note that the registration process is currently not as clean as it should be and will be improved in a future version of Alfresco - JIRA tickets WCM-786 and WCM-1045 are tracking these issues.