Setting properties for custom controls in XPages

Set properties for the custom control as it relates to the XPage that contains it. You can set properties for its name and visibility status as well as for any additional properties that you defined when setting properties for the custom control design element.

Before you begin

About this task

To set properties for custom controls in XPages, do the following steps:

Procedure

  1. Open the XPage that contains the custom control.
  2. Select the custom control inside the XPages editor.
  3. In the Properties view, click the Custom Control tab and do the following steps:
    1. In the Name field, type the name of the custom control.
    2. Select the Visible check box to make the custom control visible in the XPage. To compute the value instead, click the diamond-shaped icon to the right of the field, select Compute value, and use the script editor to write a script that computes the value.
  4. To set values for custom properties, click the All Properties tab and do the following steps:
    Note: Custom properties are properties that you define when working with custom controls as independent design elements.
    1. In the Property column, expand the other category.
    2. For each property, set one or more values in the Value field. For static values, type the value or values. For computed values, click the diamond-shaped icon to the right, select Compute value, and use the script editor to write a formula. If you set a default editor when defining the property, click the editor icon on the right to open the editor and set the property value or values.
  5. To create instances of custom properties, click the All Properties tab and do the following steps:
    Note: You can create instances of properties and groups of properties only if you selected Allow multiple instances while working with custom controls as independent design elements.
    1. In the Property column, expand the other category.
    2. Click the name of the property to display the plus-sign icon.
    3. For each property or group of properties, continue clicking the plus-sign icon until you have created the desired number of instances. By default, the first new instance appends a [0] to the name, the second one appends a [1], and so on.
  6. Click File > Save to save your changes.

What to do next