SelectedPagelet Collection Methods

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

Syntax

DeleteItem(SelectedPageletName)

Description

The DeleteItem method deletes the SelectedPagelet object identified by SelectedPageletName from the SelectedPagelet Collection.

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

Parameters

Field or Control

Definition

SelectedPageletName

Specify the name of a SelectedPagelet existing in the SelectedPagelet collection.

Returns

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

Example

If Not &MyColl.DeleteItem("Test_SelectedPagelet") Then
   /* can't delete test data. Do error processing */
End-if;

Syntax

First()

Description

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

Parameters

None.

Returns

A SelectedPagelet object.

Example

&MySelectedPagelet = &MyCollection.First();

Syntax

InsertItem(SelectedPageletName, Column, Row)

Description

The InsertItem method inserts the SelectedPagelet object identified by SelectedPageletName into the SelectedPagelet Collection.

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

Parameters

Field or Control

Definition

SelectedPageletName

Specify the name of a new SelectedPagelet. This parameter takes a string value. If you specify a name that already exists in the collection, you get an error.

Column

Specify the column number for this pagelet.

Row

Specify the row number for this pagelet.

Returns

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

Syntax

ItemByName(Name)

Description

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

Parameters

Field or Control

Definition

Name

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

Returns

A SelectedPagelet object if successful, NULL otherwise.

Example

&MySelectedPagelet = &MyColl.ItemByName("PORTAL_ADMIN");

Syntax

Next()

Description

The Next method returns the next SelectedPagelet object in the SelectedPagelet 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

A SelectedPagelet object.

Example

&MySelectedPagelet = &MyCollection.Next();