Now that we have our new XPage and custom
control created lets add some content to it. Open up your content_person
custom control again and lets get started.
Because we are associating this XPage
with a document we will need to tell the XPage which form we are using
so that it can determine what fields are available. To do this we setup
a new data source for the XPage, Go to the root node in the outline view
and in the properties section select the ‘Data’ properties tab. Click on
the ADD button but instead of selecting a ‘Domino View’ like we did in
earlier parts of tutorial we will select a ‘Domino Document’ and then select
the ‘Person’ form from the current database.
Now that we have told the XPage where
to find the fields that it has access to we can see then in the ‘Data’
pane in Domino Designer. To access then have a look at the ‘Controls’ pane,
you should see a drop down arrow, select it and you can choose the data
You should now see your data source
and all the fields that are available.
Lets put them on to our XPage, we’ll
worry about formatting them a little later but for now I’d like to just
get them onto the Xpage so that I can show you how to link to the page.
In the data view select ALL the fields and then just drag them all on to
the XPage. The Domino Designer will automatically create a table with labels
and input fields.
Lets save our custom control but we
can’t preview the Xpage just yet because we have not told it which document
to open. We’ll cover that in the next part.