PageletCategory Collection Methods
In this section, we discuss the PageletCategory collection methods. The methods are discussed in alphabetical order.
Syntax
DeleteItem(PageletCategoryName)
Description
The DeleteItem method deletes the PageletCategory object identified by PageletCategoryName from the database.
Note: The portal registry classes execute some methods "interactively", that is, as they happen. The item won't be marked for deletion, then actually deleted later. The item is deleted from the database as soon as the method is executed.
Parameters
Field or Control |
Definition |
---|---|
PageletCategoryName |
Specify the name of a PageletCategory existing in the PageletCategory collection. |
Returns
A Boolean value: True if the PageletCategory was deleted, False otherwise.
Example
If Not &MyPageletCategoryColl.DeleteItem("MYPAGELETCATEGORY") Then
/* PageletCategory not deleted. Do error checking */
End-If;
Syntax
First()
Description
The First method returns the first PageletCategory object in the PageletCategory collection.
Parameters
None.
Returns
PageletCategory object.
Example
&MyPageletCategory = &MyCollection.First();
Syntax
InsertItem(PageletCategoryName, Label)
Description
The InsertItem method inserts the PageletCategory object identified by PageletCategoryName from the PageletCategory Collection. You must specify both a name and a label for each PageletCategory. This method returns a reference to the new PageletCategory object. You must specify a unique PageletCategoryName, or you receive an error.
Note: The portal registry classes execute some methods "interactively", that is, as they happen. The item won't be marked for insertion, then actually inserted later. The item is inserted into the database as soon as the method is executed.
Parameters
Field or Control |
Definition |
---|---|
PageletCategoryName |
Specify the name of a PageletCategory existing in the PageletCategory collection. This parameter takes a string value. |
Label |
Specify a label for the new PageletCategory. This parameter takes a string value. |
Returns
A reference to the new PageletCategory object if the method executed successfully, False otherwise.
Syntax
ItemByName(Name)
Description
The ItemByName method returns the PageletCategory object with the name Name.
Parameters
Field or Control |
Definition |
---|---|
Name |
Specify the name of an existing PageletCategory within the PageletCategory collection. If you specify an invalid name, the object is NULL. You must specify a name, not a label. |
Returns
A PageletCategory object if successful, NULL otherwise.
Syntax
Next()
Description
The Next method returns the next PageletCategory object in the PageletCategory 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 PageletCategory object.