Zimlet JavaScript API Reference - ZmObjectManager

Class ZmObjectManager


This class is used to high-light objects within a given view.

Defined in: ZmObjectManager.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
ZmObjectManager(view, selectCallback, skipHandlers)
Creates an object manager.
Method Summary
Method Attributes Method Name and Description
 
addHandler(h, type, priority)
Adds the handler.
 
findObjects(content, htmlEncode, type, isTextMsg, options)
Finds objects.
 
Gets the handlers.
 
Gets the image attachment handler.
 
Gets the count of objects.
<static>  
ZmObjectManager.registerHandler(obj, type, priority)
Registers the handler.
 
removeHandler(h, type)
Removes the handler.
 
Resets the objects.
 
setHandlerAttr(type, name, value)
Sets handler attribute.
 
setView(view)
Sets the view.
 
Sorts the handlers.
 
Returns a string representation of the object.
Class Detail
ZmObjectManager(view, selectCallback, skipHandlers)
Creates an object manager.
Author: Kevin Henrikson.
Parameters:
{DwtComposite} view
the view this manager is going to high-light for
{AjxCallback} selectCallback
the callback triggered when user clicks on high-light object (provide if you want to do something before the clicked on object opens its corresponding view)
{Boolean} skipHandlers
true to avoid adding the standard handlers
Method Detail
addHandler(h, type, priority)
Adds the handler.
Parameters:
{ZmObjectHandler} h
the handler
{constant} type
the type
{constant} priority
the priority

{String} findObjects(content, htmlEncode, type, isTextMsg, options)
Finds objects.
Parameters:
{String} content
the content
{Boolean} htmlEncode
true to HTML encode the content
{constant} type
the type
{Boolean} isTextMsg
true if is text msg
{hash} options
arbitrary options to pass to handler
Returns:
{String} the object

{Array} getHandlers()
Gets the handlers.
Returns:
{Array} an array of ZmObjectHandler objects

{ZmImageAttachmentObjectHandler} getImageAttachmentHandler()
Gets the image attachment handler.
Returns:
{ZmImageAttachmentObjectHandler} the handler

{int} objectsCount()
Gets the count of objects.
Returns:
{int} the count

<static> ZmObjectManager.registerHandler(obj, type, priority)
Registers the handler.
Parameters:
{Object} obj
the object
{constant} type
the type
{constant} priority
the priority

removeHandler(h, type)
Removes the handler.
Parameters:
{ZmObjectHandler} h
the handler
{constant} type
the type

reset()
Resets the objects.

setHandlerAttr(type, name, value)
Sets handler attribute.
Parameters:
{String} type
the type
{String} name
the attribute name
{Object} value
the value

setView(view)
Sets the view.
Parameters:
{DwtComposite} view
the view

sortHandlers()
Sorts the handlers.

{String} toString()
Returns a string representation of the object.
Returns:
{String} a string representation of the object

Documentation generated by JsDoc Toolkit 2.3.0 on Tue Jun 28 2016 21:01:38 GMT-0400 (EDT)