XULTemplateBuilder
This object is available to unprivileged JavaScript. It implements the following interfaces:
Properties
readonly nsIRDFCompositeDataSource database
The composite datasource that the template builder observes and uses to create content
readonly Element root
The ``root'' node in the DOM to which this builder is attached
Methods
void addListener ( nsIXULBuilderListener listener )
[noscript] void createContents ( nsIContent_ptr element )
[noscript] void init ( nsIContent_ptr element )
void onAssert ( nsIRDFDataSource dataSource , nsIRDFResource source , nsIRDFResource property , nsIRDFNode target )
void onBeginUpdateBatch ( nsIRDFDataSource dataSource )
void onChange ( nsIRDFDataSource dataSource , nsIRDFResource source , nsIRDFResource property , nsIRDFNode oldTarget , nsIRDFNode newTarget )
void onEndUpdateBatch ( nsIRDFDataSource dataSource )
void onMove ( nsIRDFDataSource dataSource , nsIRDFResource oldSource , nsIRDFResource newSource , nsIRDFResource property , nsIRDFNode target )
void onUnassert ( nsIRDFDataSource dataSource , nsIRDFResource source , nsIRDFResource property , nsIRDFNode target )
void rebuild ( )
void refresh ( )
void removeListener ( nsIXULBuilderListener listener )
void addListener ( nsIXULBuilderListener listener )
Add a listener to this template builder. The template builder holds a strong reference to the listener.
- Arguments:
- listener
void createContents ( nsIContent_ptr element )
Invoked lazily by a XUL element that needs its child content built.
- Arguments:
- element
void init ( nsIContent_ptr element )
Called to initialize a XUL content builder on a particular root element. This element presumably has a ``datasources'' attribute, which the builder will parse to set up the template builder's datasources.
- Arguments:
- element
void onAssert ( nsIRDFDataSource dataSource , nsIRDFResource source , nsIRDFResource property , nsIRDFNode target )
This method is called whenever a new assertion is made in the data source
- Arguments:
- dataSource: the datasource that is issuing the notification.
- source: the subject of the assertion
- property: the predicate of the assertion
- target: the object of the assertion
void onBeginUpdateBatch ( nsIRDFDataSource dataSource )
This method is called when a datasource is about to send several notifications at once. The observer can use this as a cue to optimize its behavior. The observer can expect the datasource to call endUpdateBatch() when the group of notifications has completed.
- Arguments:
- dataSource: the datasource that is going to be issuing the notifications.
void onChange ( nsIRDFDataSource dataSource , nsIRDFResource source , nsIRDFResource property , nsIRDFNode oldTarget , nsIRDFNode newTarget )
This method is called when the object of an assertion changes from one value to another.
- Arguments:
- dataSource: the datasource that is issuing the notification.
- source: the subject of the assertion
- property: the predicate of the assertion
- oldTarget: the old object of the assertion
- newTarget: the new object of the assertion
void onEndUpdateBatch ( nsIRDFDataSource dataSource )
This method is called when a datasource has completed issuing a notification group.
- Arguments:
- dataSource: the datasource that has finished issuing a group of notifications
void onMove ( nsIRDFDataSource dataSource , nsIRDFResource oldSource , nsIRDFResource newSource , nsIRDFResource property , nsIRDFNode target )
This method is called when the subject of an assertion changes from one value to another.
- Arguments:
- dataSource: the datasource that is issuing the notification.
- oldSource: the old subject of the assertion
- newSource: the new subject of the assertion
- property: the predicate of the assertion
- target: the object of the assertion
void onUnassert ( nsIRDFDataSource dataSource , nsIRDFResource source , nsIRDFResource property , nsIRDFNode target )
This method is called whenever an assertion is removed from the data source
- Arguments:
- dataSource: the datasource that is issuing the notification.
- source: the subject of the assertion
- property: the predicate of the assertion
- target: the object of the assertion
void removeListener ( nsIXULBuilderListener listener )
Remove a listener from this template builder.
- Arguments:
- listener
Reference documentation is generated from Mozilla's source.
