AssignedPagelet Collection Methods

In this section, we discuss the AssignedPagelet collection methods. The methods are discussed in alphabetical order.

Syntax

DeleteItem(PageletName)

Description

The DeleteItem method deletes the AssignedPagelet object identified by PageletName from the AssignedPagelet Collection.

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

Parameters

Field or Control

Definition

PageletName

Specify the name of an AssignedPagelet existing in the AssignedPagelet collection.

Returns

A Boolean value: True if the AssignedPagelet was deleted, False otherwise.

Example

If Not &MyColl.DeleteItem("Weather_411") Then 
   /* do error processing */
End-If;

Syntax

First()

Description

The First method returns the first AssignedPagelet object in the AssignedPagelet collection.

Parameters

None.

Returns

An AssignedPagelet object.

Example

&MyAssignedPagelet = &MyCollection.First();

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

Field or Control

Definition

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;

Syntax

ItemByName(Name)

Description

The ItemByName method returns the AssignedPagelet object with the name Name.

Parameters

Field or Control

Definition

Name

Specify the name of an existing AssignedPagelet within the AssignedPagelet collection. If you specify an invalid name, the object is NULL.

Returns

An AssignedPagelet object if successful, NULL otherwise.

Example

&MyPagelet = &MyColl.ItemByName("Dictionary");

Syntax

Next()

Description

The Next method returns the next AssignedPagelet object in the AssignedPagelet collection. You can use this method only after you have used the First method: otherwise the system doesn’t know where to start.

Parameters

None.

Returns

An AssignedPagelet object.

Example

&MyAssignedPagelet = &MyCollection.Next();