Saturday, 17 September 2011

Component of Widget

The iContext is the view of the iWidget instance context supplied at runtime.

At runtime, the iContext supplied to the iScope by the runtime environment provides the means for the iWidget instance to interact with its
surroundings such as
a localised getElementById() method for accessing UI elements.
accessors for attributes defined for the specific iWidget instance.

In model-view-controller terms you can think of the iScope JavaScript class as the controller for the iWidget.

The iScope orchestrates how the iWidget responds to events, retrieves its data and manipulates the UI.

IContext Methods:

Method Name
returns ManagedItemSet to provide access to the widget’s customization attributes.
returns an ItemSet corresponding to the requested name or creates a new one. Lotus Mashups forces the policy that all the ItemSet values are private ItemSet.
returns the instance object that encapsulates all the widget script variables
returns a dom element of the widget.
returns the root element of the widget.
returns an array of elements in the widget markup that have the supplied value as one of those specified by the element's class attribute
processes the markup so that it can be inserted into the widget’s markup.
requests that the iContext object process the subtree under the supplied node in order to resolve and instantiate any referenced widgets.
returns ManagedItemSet to provides access to the user's profile data.
returns ManagedItemSet to provide access to attributes that both the iContext object and the widget require.
This method returns the unique identifier for this instance of the iWidget in the current evironment
(usually a web page).
This method provides the means for an iWidget to dynamically declare a dependency on a resource,
including optional iContext functionality, such as: Io,xml

No comments:

Post a Comment