Package Products :: Package ZenUtils :: Package extdirect :: Module router :: Class DirectProviderDefinition |
[hide private]
[frames] | no frames]

# Class DirectProviderDefinition

source code

    object --+
             |
            DirectProviderDefinition

Turns a DirectRouter subclass into JavaScript object representing the config of the client-side API.

Inspects the given subclass and retrieves the names of all public methods, then defines those as actions on the Ext.Direct provider, and creates the JS that adds the provider.

See http://extjs.com/products/extjs/direct.php for a full explanation of protocols and features of Ext.Direct.

Instance Methods | [hide private]
__init__(self, routercls, url, timeout, ns=None) | source code
_config(self) | source code
render(self) Generate and return an Ext.Direct provider definition, wrapped in a <script> tag and ready for inclusion in an HTML document. | source code

Method Details | [hide private]

### __init__(self, routercls, url, timeout, ns=None) (Constructor) | source code
Parameters: `routercls` (class) - A DirectRouter subclass `url` (str) - The url at which `routercls` is available `ns` - The client-side namespace in which the provider should live. The provider will be available at [ns].[routercls.__name__]. For example, if ns is 'Zenoss.remote' and routercls is named 'EventConsole', client-side code would call `Zenoss.remote.EventConsole.my_method(params, callback)`. Overrides: object.__init__