Documentation

Plugins/Claypool/manage

From jQuery JavaScript Library

Jump to: navigation, search

« Back to Plugins/Claypool

manage( container, nickname )

Adds the containers object pool to the pool of application managed objects.
This method is used internally for the ioc container, mvc container, aop container etc, so that when you access an object through the application context ( with $.$('id') ), the managed container will be searched and automatically created by the containers.
Arguments:
containerString
The dot-delimited name of the container class.
nicknameObject
The nickname will be used by the application content to hold a reference to the managed container.


Examples:
Taken directly from jquery.claypool, this is how we internally delegate management of the mvc container to the application framework. Now when we call $.$("#helloController"), the mvc container will be searched for an object with this id, and will be responsible for creating it if it hasn't been created before.

$.manage('Claypool.MVC.Container', 'claypool:MVC');

NameType