WARNING: Most of this content (with the exception of the Mozilla 1.9 XPCOM reference) is very old, and can be expected to be out of date and possibly obsolete. For better XUL documentation, please visit the XUL hub at the Mozilla Developer Center.

nsIDynamicContainer

IID:7e85d97b-4109-4ea7-afd8-bc2cd3840d70
Inherits From:nsISupports

The dynamic container interface provides a base class for services that want to provide containers for temporary contents.

The service can fill result nodes directly into the container when it is being opened. It can use the property bag on every result node to store data associated with each item, such as full path on disk. It would create additional containers for each container, registered to its service.

See also createDynamicContainer in nsINavBookmarksService.


Methods

void onContainerMoved ( PRInt64 itemId , PRInt64 newParent , PRInt32 newIndex ) void onContainerNodeClosed ( nsINavHistoryContainerResultNode container ) void onContainerNodeOpening ( nsINavHistoryContainerResultNode container , nsINavHistoryQueryOptions options ) void onContainerRemoving ( PRInt64 itemId )

void onContainerMoved ( PRInt64 itemId , PRInt64 newParent , PRInt32 newIndex )

Called when the given container has just been moved, in case the service needs to do any bookkeeping. Called AFTER the container has been moved.

Arguments:
itemId: The item-id of the container item.
newParent: The item of the new parent folder for the container.
newIndex: The index the container will be inserted at, or -1 for append.

void onContainerNodeClosed ( nsINavHistoryContainerResultNode container )

Called when the given container has just been collapsed so that the service can do any necessary cleanup. This is NOT guaranteed to get called. In particular, if the query just goes away, you will not get this call. This only happens when the container itself goes from the open state to the closed state. A service with large numbers of dynamically populated items might use this to do some cleanup so those items don't hang around

Arguments:
container: The container node of the container being closed. The service need not worry about removing any created nodes, they will be automatically removed when this call completes.

void onContainerNodeOpening ( nsINavHistoryContainerResultNode container , nsINavHistoryQueryOptions options )

Called when the given container node is about to be populated so that the service can populate the container if necessary.

Arguments:
container: The container node for the container being opened. Note that all result nodes implement a property bag if you need to store state.
options: The options used to generate this query. Containers should follow these when possible, for example, whether to expand queries, etc. Implementations should use this when possible if adding query and folder nodes to the container. DO NOT MODIFY THIS VALUE.

void onContainerRemoving ( PRInt64 itemId )

Called when the given container is about to be deleted from the bookmarks table, so that the service can do any necessary cleanup. Called BEFORE the container is deleted, so that the service can still reference it.

Arguments:
itemId: The item-id of the container item.

Reference documentation is generated from Mozilla's source.

Copyright © 1999-2006 XULPlanet.com