Skip to main content link. Accesskey S

XPages Wiki

Submit Search

YouAtNotes XPages Wiki


Home > Controls > Work with custom controls

Work with custom controls

ShowTable of Contents

Use a custom control as container for your layout


For example, create a panel wich some elements. Assume you want this panel in every page, but you want to place your actual content inside that panel:

- Place an "editable area" control in your panel.
- Make a custom control out of the panel.
- Create a new XPage.
- Place your custom control on it.
- And in the editable area, you can add stuff without touching the centrally stored custom control.

Parameterize the custom control


In the custom control's properties you can define parameters in the "property definition" section.
In the XPage where you embed the control, you can set values for these properties.

In the custom control you can access the parameters by using "compositeData.parameterName" in a server side javascript (mind the case!).

Example: you have a custom control which acts as header for each XPage. You include the custom control in each XPage, but you want to display a different header text for each page:

- define a parameter "title" of type "string" in the custom control -> property defintion
- in the custom control, place a label and compute it's value with "compositeData.title"
- place the custom control in your XPage, click on it, go to "custom properties" and set a value for the "title" property

Control your custom control with parameters


- You can send parameters from your page to a control by using controlName.parameterName = "something".
- In your control you can get parameters with compositeData.ParameterName.
See what's possible with Xpages.
Have a look at our ServiceCommunicator website
and the YouAtNotes Support.
Use  searchlotus.com  for news in the Web related to Lotus Notes and Domino,
and to search those sites.
Check  youatnotes.com  for great Lotus Notes, Domino and XPages software.
Did this wiki help you?
Did this saved you time? Express your gratitude by making a donation:
PayPal - The safer, easier way to pay online!