Creating a custom controlAdded by IBM on September 28, 2011 | Version 1 (Original)
|The custom control interface is similar to the XPages interface including an edit area, properties area, controls palette, and data palette.
The custom control interface is similar to the XPages interface including an edit area, properties area, controls palette, and data palette.
- On the Application Navigator, right-click Custom Controls and select New Custom Control.
- In the New Custom Control dialog, name the control header and click OK.
- Drag a Label control into the edit area.
- Under properties, click the diamond alongside Label and select Compute value.
- Enter the following code in the script editor and click OK
This displays the title of the current database.
- Click Font under Style and change the font properties to make the label stand out.
- Add two more labels on their lines.
Set the fonts to 10 plain.
For the second label, display the pathname of the current database:
For the third label, display the date the database was last modified:
"Last modified on " + database.getLastModified().getLocalTime()
- Save the custom control.
You have to use the control on an XPage to preview it.
Parent topic: Your first custom control