DynamicCategory Collection Methods
In this section, we discuss the DynamicCategory collection methods. The methods are discussed in alphabetical order.
Syntax
DeleteItem(Name)
Description
The DeleteItem method deletes the PageletCategory object identified by Name from the DynamicCategory Collection. This does not delete the PageletCategory from the database, just from the DynamicCategory collection.
This method is not executed automatically. It is executed only when the parent object is saved.
Note: If you delete a DynamicCategory, tabs with the attribute PORTAL_HPTAB_DYN lists must be searched for and updated (if necessary) to reflect the deleted category.
Parameters
Field or Control |
Definition |
---|---|
Name |
Specify the name of an existing category in the DynamicCategory collection. |
Returns
A Boolean value: True if the PageletCategory was deleted from the DynamicCategory collection, False otherwise.
Example
If Not &MyColl.DeleteItem("Dictionaries") Then
/* do error processing */
End-If;
Syntax
First()
Description
The First method returns the name of the first PageletCategory in the DynamicCategory collection.
Parameters
None.
Returns
A string.
Example
&MyDynamicCategory = &MyCollection.First();
Syntax
InsertItem(Name)
Description
The InsertItem method inserts the PageletCategory object identified by Name into the DynamicCategory Collection. This does not insert the PageletCategory into the database, just into the DynamicCategory collection. After a PageletCategory is marked as dynamic, it is immediately available to the end-user.
This method is not executed automatically. It is executed only when the parent object is saved.
Parameters
Field or Control |
Definition |
---|---|
Name |
Specify the name of the DynamicCategory to insert. |
Returns
A string containing the name of the new DynamicCategory object if the method executed successfully, Null otherwise.
Example
&MyCat = &MyColl.InsertItem("User_Info");
Syntax
ItemByName(Name)
Description
The ItemByName method returns the name of the PageletCategory object with the name Name.
Parameters
Field or Control |
Definition |
---|---|
Name |
Specify the name of an existing DynamicCategory within the DynamicCategory collection. If you specify an invalid name, this method returns a Null string. |
Returns
A string.
Example
&MyPagelet = &MyColl.ItemByName("Dictionary");
Syntax
Next()
Description
The Next method returns the name of the next PageletCategory object in the DynamicCategory 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 string.
Example
&MyDynamicCategory = &MyCollection.Next();