Home > Advanced Programming Techni... > Using Collections > Clearing Collection Session...
Clearing the session state of a collection removes the collection members. A shopping cart is a good example of when you might need to clear collection session state. When a user requests to empty the shopping cart and start again, you need to clear the session state for a collection. You can remove session state of a collection by calling the CREATE_OR_TRUNCATE_COLLECTION
method or by using f?p
syntax.
Calling the CREATE_OR_TRUNCATE_COLLECTION
method deletes the existing collection and then recreates it, for example:
APEX_COLLECTION.CREATE_OR_TRUNCATE_COLLECTION( p_collection_name => collection name,
You can also use the sixth f?p
syntax argument to clear session state, for example:
f?p=App:Page:Session::NO:1,2,3,collection name