InsertItem method: AssignedPagelet collection

Syntax

InsertItem(PageletName, Column, Row, LayoutBehavior)

Description

The InsertItem method inserts the AssignedPagelet object identified by the parameters into the AssignedPagelet Collection.

This method is not executed automatically. It is executed only when the parent object is saved.

Parameters

Parameter Description

PageletName

Specify the name of the pagelet that you want to insert.

Column

Specify the column that you want this pagelet to display in, as a number.

Row

Specify the row that you want this pagelet to display in, as a number. You can specify a zero if you don't know which row.

LayoutBehavior

Specify whether the user can change when and how the pagelet displays. This property takes a string value. The values are:

Value Description

4OPT

The user can choose to add this pagelet to their tab. It doesn't show up by default. The user can remove and reposition this pagelet on the tab.

3DEF

The user sees this pagelet the first time they log in, however, they can remove or reposition this pagelet if they'd like.

2REQ

The user can't remove this pagelet from the tab. However, they are allowed to reposition the pagelet on the tab.

1FIX

The user can't remove this pagelet or change its position on the tab.

Returns

A reference to the new AssignedPagelet object if the method executed successfully, NULL otherwise.

Example

&MyPagelet = &MyColl.InsertItem("Weather_411");

If Not &MyPagelet Then 
   /* do error processing */
End-If;