XPages can be bound to forms.
If I'm creating a new application with new XPages, do I also have to create matching forms?
Or can I point it to fields that may or may not exist in the DB already and manually assign a type to them?
Creating a form is not required, although it provides the following functionality:
- It acts as a data schema, and eases the data binding as Domino Designer then knows the list of fields. If you don't have a form, you can still manually type in the data binding, but without any particular UI help from Domino Designer.
- You can execute logic associated with the form. If you look at the Document data source, there is a "computeWithForm" property that triggers the computation whenever the document is loaded or saved.
You can also map an XPage to a form in the form's infobox by selecting the XPage in the "Display XPage instead" dropdown listbox:
As a result, you'll be able to open a designated XPage for a document when the ?OpenDocument
URL command is sent, instead of the regular form.
(This requires the "form" field to be initialized within the document).
In case you develop a brand new application, it is advisable to define a (hidden) form with just the list of fields, without any UI in it. It will act as the data schema for your documents.