Module: alfresco/core/Page

alfresco/core/Page

This is used as the default root object when instantiating a page. There should be no need to ever instantiate this widget directly.
Author:
  • Dave Draper
  • Martin Doyle
License:
Source:

Members

_processedServiceCountdown :number

This is used to countdown the services that are still waiting to be created. It is initialised to the size of the services array supplied to the processServices function.
Type:
  • number
Default Value:
  • null
Source:

_processedServices :Array

Used to keep track of all the services created as a result of a call to the processWidgets function
Type:
  • Array
Default Value:
  • null
Source:

baseClass :string

This is the base class for the page
Type:
  • string
Default Value:
  • "alfresco-core-Page"
Source:

serviceProcessingComplete :boolean

This is set from false to true after the allServicesProcessed extension point function is called. It can be used to check whether or not service processing is complete. This is to allow for checks that service processing has been completed BEFORE attaching a listener to the allServicesProcessed function.
Type:
  • boolean
Default Value:
  • false
Source:

Methods

_registerProcessedService(service, index)

This function registers the creation of a service. It decrements the _processedServiceCountdown attribute and calls the [allServicesProcessed]{@link module:alfresco/core/Core#allServicesProcessed} function when it reaches zero.
Parameters:
Name Type Description
service object The service that has just been processed.
index number The target index of the service
Source:

_showPage()

Un-hide the body of the page
Since:
  • 1.0.59
Source:

allServicesProcessed(services)

This is an extension point for handling the completion of calls to processWidgets
Parameters:
Name Type Description
services Array An array of all the services that have been processed
Source:

allWidgetsProcessed()

Source:

createService(config, domNode, callback, callbackScope, index)

This method will instantiate a new service having requested that its JavaScript resource and dependent resources be downloaded. In principle all of the required resources should be available if the service is being processed in the context of the Surf framework and dependency analysis of the page has been completed. However, if this is being performed as an asynchronous event it may be necessary for Dojo to request additional modules. This is why the callback function is required to ensure that successfully instantiated modules can be kept track of.
Parameters:
Name Type Description
config object The configuration for the service
domNode element The DOM node to attach the service to
callback function A function to call once the service has been instantiated
callbackScope object The scope with which to call the callback
index number The index of the service to create (this will effect it's location in the _processedServices array)
Source:

onError(error)

This is the callback handler for any require based errors that may occur during page load.
Parameters:
Name Type Description
error object Details of the error that has occurred
Source:

onReadyPublish()

Source:

postCreate()

Overrides the superclass implementation to call processServices and [processWidgets]{@link module:alfresco/core/Core#processWidgets} as applicable.
Source:

processServices(services, callback, callbackScope, index)

Handles the dependency management and instantiation of services required.
Parameters:
Name Type Description
services Array An array of the services to be instantiated.
callback function A function to call once the service has been instantiated
callbackScope object The scope with which to call the callback
index number The index of the service to create
Source: