Class Index | File Index

Classes


Class Alfresco.module.DocumentPicker

Extends Alfresco.component.Base
DocumentPicker module

A dialog for creating selecting documents
Defined in: document-picker.js
Constructor Summary
Constructor Attributes Constructor Name and Description
 
Alfresco.module.DocumentPicker(htmlId, (optional))
DocumentPicker constructor.
Field Summary
Field Attributes Field Name and Description
 
Resizable columns
 
The current value of the association including metadata
 
Decoupled event listeners
 
Object container for initialization options
 
Selected items. Keeps a list of selected items for correct Add button state.
 
Single selected item, for when in single select mode
Fields borrowed from class Alfresco.component.Base:
modules, services, widgets
Method Summary
Method Attributes Method Name and Description
 
addItem(item)
 
Returns if an item can be selected
 
Returns items that have been added to the current value
 
Returns items that have been removed from the current value
 
Returns currently selected items
 
onCancel(e, p_obj)
Picker Cancel button click handler. Clears previous selections.
 
Fired by YUILoaderHelper when required component script files have
 
onFolderUp(e, p_obj)
Folder Up Navigate button click handler
 
onOK(e, p_obj)
Picker OK button click handler. Fires "onDocumentsSelected" event and clears selection.
 
onParentChanged(layer, args)
Parent changed event handler
 
onParentDetails(layer, args)
Parent Details updated event handler
 
Fired by YUI when parent element is available for scripting.
 
onRenderCurrentValue(layer, args)
Renders current value in reponse to an event
 
onSelectedItemAdded(layer, args)
Selected Item Added event handler
 
onSelectedItemRemoved(layer, args)
Selected Item Removed event handler
 
onShowPicker(e, p_obj)
Show picker button click handler
 
onTemplateLoaded(response)
Called when the DocumentPicker html template has been returned from the server.
 
Resets selection so that reload of page doesn't repopulate picker
 
Set messages for this component.
 
Set multiple initialization options at once.
Methods borrowed from class Alfresco.component.Base:
attachLinkClickListeners, bind, createYUIButtons, destroy, fire, invokeAction, msg, onComponentLoaded, onReadyWrapper, refresh
Constructor Detail
Alfresco.module.DocumentPicker(htmlId, (optional))
DocumentPicker constructor.
Parameters:
{String} htmlId
The HTML id of the parent element
{String} (optional)
objectRendererClass Class Reference of ObjectRenderer subclass to use as picker's object renderer
Returns:
{Alfresco.DocumentPicker} The new DocumentPicker instance
Field Detail
{array} columns
Resizable columns
Default Value:
[]

{array} currentValueMeta
The current value of the association including metadata

eventGroup
Decoupled event listeners

{object} options
Object container for initialization options

{object} selectedItems
Selected items. Keeps a list of selected items for correct Add button state.

{string} singleSelectedItem
Single selected item, for when in single select mode
Method Detail
addItem(item)
Parameters:
item

{boolean} canItemBeSelected(id)
Returns if an item can be selected
Parameters:
{string} id
Item id (nodeRef)
Returns:
{boolean}

{array} getAddedItems()
Returns items that have been added to the current value
Returns:
{array}

{array} getRemovedItems()
Returns items that have been removed from the current value
Returns:
{array}

{array} getSelectedItems()
Returns currently selected items
Returns:
{array}

onCancel(e, p_obj)
Picker Cancel button click handler. Clears previous selections.
Parameters:
{object} e
DomEvent
{object} p_obj
Object passed back from addListener method

onComponentsLoaded()
Fired by YUILoaderHelper when required component script files have
been loaded into the browser.

onFolderUp(e, p_obj)
Folder Up Navigate button click handler
Parameters:
{object} e
DomEvent
{object} p_obj
Object passed back from addListener method

onOK(e, p_obj)
Picker OK button click handler. Fires "onDocumentsSelected" event and clears selection.
Parameters:
{object} e
DomEvent
{object} p_obj
Object passed back from addListener method

onParentChanged(layer, args)
Parent changed event handler
Parameters:
{object} layer
Event fired
{array} args
Event parameters (depends on event type)

onParentDetails(layer, args)
Parent Details updated event handler
Parameters:
{object} layer
Event fired
{array} args
Event parameters (depends on event type)

onReady()
Fired by YUI when parent element is available for scripting.
Component initialisation, including instantiation of YUI widgets and event listener binding.

onRenderCurrentValue(layer, args)
Renders current value in reponse to an event
Parameters:
{object} layer
Event fired (unused)
{array} args
Event parameters

onSelectedItemAdded(layer, args)
Selected Item Added event handler
Parameters:
{object} layer
Event fired
{array} args
Event parameters (depends on event type)

onSelectedItemRemoved(layer, args)
Selected Item Removed event handler
Parameters:
{object} layer
Event fired
{array} args
Event parameters (depends on event type)

onShowPicker(e, p_obj)
Show picker button click handler
Parameters:
{object} e
DomEvent
{object} p_obj
Object passed back from addListener method

onTemplateLoaded(response)
Called when the DocumentPicker html template has been returned from the server.
Creates the YUI gui objects such as buttons and a panel and shows it.
Parameters:
{object} response
a Alfresco.util.Ajax.request response object

resetSelection()
Resets selection so that reload of page doesn't repopulate picker

{Alfresco.module.DocumentPicker} setMessages(obj)
Set messages for this component.
Parameters:
{object} obj
Object literal specifying a set of messages
Returns:
{Alfresco.module.DocumentPicker} returns 'this' for method chaining

{Alfresco.module.DocumentPicker} setOptions(obj)
Set multiple initialization options at once.
Parameters:
{object} obj
Object literal specifying a set of options
Returns:
{Alfresco.module.DocumentPicker} returns 'this' for method chaining

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Feb 16 2012 12:24:26 GMT-0000 (GMT)