|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public iContext
This interface defines methods that the iWidget can use to interact with the iContext. An iContext instance is created specifically for each iWidget instance and a reference will be set in iWidget encapsulation object. Thus within iWidget encapsulation class, iContext should be referred to by using "this.iContext"
var root = this.iContext.getRootElement();
Field Summary | |
---|---|
Object |
constants
Defines constants available in iContext. |
io |
io
This object provides access to io service. io service is accessible by using "this.iContext.io". |
iEvents |
iEvents
This object provides access to events service. event service is accessible by using "this.iContext.iEvents". |
Method Summary | |
---|---|
String |
getWidgetId()
This method returns the unique identifier for this instance of the iWidget in the current evironment (usually a web page). |
DOMElement |
getRootElement()
Returns the iContext supplied element containing the content for the current mode of the iwidget such that the iWidget can easily do things such as search its own markup. |
DOMElement |
getElementById(String id,
DOMElement root)
This method provides the same semantics as the DOM method with the same name, but restricts the search to the iWidget's markup rather than the entire page |
ManagedItemSet |
getiWidgetAttributes()
This method returns the ManagedItemSet that provides access to the iWidget's customization attributes. |
ItemSet |
getItemSet(String name,
Boolean isPrivate)
This method returns an ItemSet corresponding to the requested name. |
ShareableItemSet |
getShareableItemSet(String name)
This method returns an ShareableItemSet corresponding to the requested name. |
void |
requires(String globalid,
String version,
String uri,
Object cb,
String mimeType)
Provides means for iWidget to declare dependency on set of shared resource support dynamic loads in asynchronous manner. |
Object |
iScope()
This method returns an instance of type Object which was initialized prior to the loading of the iWidget (either as a generic Object or an instance of the encapsulation Object ) . |
String |
processMarkup(String markup)
This method requests the iContext to process the markup such that it can be inserted into the iWidget's markup and properly interact with the page. |
void |
processiWidgets(DOMNode root)
This method requests the iContext to process the subtree under the supplied node for the purpose of resolving and instantiating any referenced iWidgets. |
DOMElement[] |
getElementByClass(String classname,
DOMElement root)
This method returns an array of Elements within the iWidget's markup which have the supplied value as one of those specified by the Element's "class" attribute. |
ManagedItemSet |
getUserProfile()
This method returns the ManagedItemSet that provides access to the user's profile data. |
ManagedItemSet |
getiDescriptor()
This method returns the ManagedItemSet that provides access to iWidget's descriptive items. |
Field Detail |
---|
Object constants
this.iContext.constants.mode.VIEW
this.iContext.constants.mode.EDIT
this.iContext.constants.mode.PERSONALIZE
this.iContext.constants.mode.HELP
this.iContext.constants.ATTRIBUTES
this.iContext.constants.IDESCRIPTOR
this.iContext.constants.USERPROFILE
io io
iEvents iEvents
Method Detail |
---|
String getWidgetId()
null
if element is not available.DOMElement getRootElement()
null
if element is not available.DOMElement getElementById(String id, DOMElement root)
id
-
element id. Must not be null
.root
-
optional DOMElement to define a search scope, it will search in the scope of current active mode if root is not provided.
null
if element is not found.ManagedItemSet getiWidgetAttributes()
ItemSet getItemSet(String name, Boolean isPrivate)
name
-
name of ItemSet. Must not be null
.isPrivate
-
deprecated,please use getShareableItemSet()if it's a ShareableItemSet.
null
if access is denied.ShareableItemSet getShareableItemSet(String name)
name
-
name of ItemSet. Must not be null
.
null
if access is denied.void requires(String globalid, String version, String uri, Object cb, String mimeType)
globalid
-
globalid of the Item that needs to be loaded. Must not be null
.version
-
optionaluri
-
uri of the resource. Must not be null
.cb
-
optionalmimeType
-
optionalObject iScope()
String processMarkup(String markup)
markup
-
markupString that needs to be processed. Must not be null
.
void processiWidgets(DOMNode root)
root
-
root element of the subtree. Must not be null
.DOMElement[] getElementByClass(String classname, DOMElement root)
classname
-
name of class attribute. Must not be null
.root
-
root element of the subtree. Must not be null
ManagedItemSet getUserProfile()
ManagedItemSet getiDescriptor()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |