DhModule Class

DhModule Class

This Package | All Packages

public class DhModule
implements IObjectWithSite, IPersistPropertyBag, DhStringIDs, ISiteable, IPersistHistory

Represents the class from which you should derive to use the wfc.html package. You then author your derivation into your HTML file as an object tag. You never create a DhModule; it is created automatically when you put it on the HTML page as an OBJECT tag.

Methods
Name Description
addOnGotFocus ( DhEventHandler h ) Sets the DhEventHandler event handler method callback that is triggered when the document is ready to unload.
addOnLoad ( DhEventHandler h ) Sets the DhEventHandler event handler method callback that is triggered when the document has finished loading.
addOnLostFocus ( DhEventHandler h ) Sets the DhEventHandler event handler method callback that is triggered when the document has finished loading.
addOnUnload ( DhEventHandler h ) Sets the DhEventHandler event handler method callback that is triggered when the document is ready to unload.
createEvents() Topic under construction.
documentLoad(Object sender, DhEvent event) Called by the module host to inform this module that it should start its execution.
documentUnload(Object sender, DhEvent event) Called by the module host to inform this module to cease its execution.
GetClassID(com.ms.com._Guid pClassID) Implements IPersist.GetClassID().
getCurrentModule() Topic under construction.
getDocument() Retrieves the current DhDocument object associated with this module.
getPeer() Retrieves the underlying HTML peer element for this class.
GetPositionCookie() Implements IPersistHistory.GetPositionCookie().
getRequest() Topic under construction.
getResponse() Topic under construction.
getServerMode() Retrieves the current site for this DhModule.
getSite() Implements ISite.getSite().
GetSite( _Guid g ) Implements IObjectWithSite.GetSite()
InitNew() Implements IPersistPropertyBag.InitNew.
Load(IPropertyBag pPropBag, IUnknown pErrorLog) Implements IPersistPropertyBag.Load().
LoadHistory( com.ms.com.IStream pStream, IUnknown bindCtx) Implements IPersistHistory.LoadHistory().
LoadParameters( DhPropertyBag pb ) This is the first and last time this module has a chance to look at the parameters that were authored into the PARAM tags of the hosting HTML document.
removeOnGotFocus ( DhEventHandler h ) Removes the DhEventHandler event handler method callback that is triggered when the document is ready to unload.
removeOnLoad ( DhEventHandler h ) Removes the DhEventHandler event handler method callback that is triggered when the document has finished loading.
removeOnLostFocus ( DhEventHandler h ) Removes the DhEventHandler event handler method callback that is triggered when the document has finished loading.
removeOnUnload ( DhEventHandler h ) Removes the DhEventHandler event handler method callback that is triggered when the document is ready to unload.
Save(IPropertyBag pPropBag, int fClearDirty, int fSaveAllProperties) Implements IPersistPropertyBag.Save().
SaveHistory( com.ms.com.IStream pStream) Implements IPersistHistory.SaveHistory().
SetPositionCookie(int dwPositioncookie) Implements IPersistHistory.SetPositionCookie().
setSite(ISite site) Implements ISite.setSite().
SetSite(IUnknown punk) Implements IObjectWithSite.SetSite()
setupSite(IOleClientSite ocs, boolean isMainThread) Topic under construction.
write( String strHTML ) Writes the specified HTML string to the current site.
write( DhElement element ) Writes the specified DhElement to the current site.
write( IDataStream inputStream, IUploadNotify iNotify, String flagToken ) Writes the specified data stream to the document stream.
write( IDataStream inputStream, IUploadNotify iNotify ) Writes the specified data stream to the document stream.

Methods

DhModule.addOnGotFocus

Syntax
public void addOnGotFocus ( DhEventHandler h );
Parameters
h
The event handler callback method.
Description

Sets the DhEventHandler event handler method callback that is triggered when the document is ready to unload.

DhModule.addOnLoad

Syntax
public void addOnLoad ( DhEventHandler h );
Parameters
h
The event handler callback method.
Description

Sets the DhEventHandler event handler method callback that is triggered when the document has finished loading.

DhModule.addOnLostFocus

Syntax
public void addOnLostFocus ( DhEventHandler h );
Parameters
h
The event handler callback method.
Description

Sets the DhEventHandler event handler method callback that is triggered when the document has finished loading.

DhModule.addOnUnload

Syntax
public void addOnUnload ( DhEventHandler h );
Parameters
h
The event handler callback method.
Description

Sets the DhEventHandler event handler method callback that is triggered when the document is ready to unload.

DhModule.createEvents

Syntax
protected DhEvents createEvents();
Description

Topic under construction.

DhModule.documentLoad

Syntax
protected synchronized void documentLoad( Object sender, DhEvent event );
Parameters
sender
The object sending this event.
event
The event object.
Description

Called by the module host to inform this module that it should start its execution. It is the first time that is it "safe" to call any object in the main document.

A subclass of DhModule should override this method if it has any operation that it wants to perform each time the module is loaded.

The implementation of this method provided by the DhModule class does nothing.

DhModule.documentUnload

Syntax
protected synchronized void documentUnload( Object sender, DhEvent event );
Parameters
sender
The object sending this event.
event
The event object.
Description

Called by the module host to inform this module to cease its execution. It is the last time that is it "safe" to call any object in the main document.

A subclass of DhModule should override this method if it has any operation that it wants to perform each time the module is unloaded.

The implementation of this method provided by the DhModule class does nothing.

DhModule.GetClassID

Syntax
final public void GetClassID( com.ms.com._Guid pClassID );
Description

Implements IPersist.GetClassID().

DhModule.getCurrentModule

Syntax
static public synchronized DhModule getCurrentModule();
Description

Topic under construction.

DhModule.getDocument

Syntax
public synchronized DhDocument getDocument();
Return Value

Returns the current DhDocument, or returns null if the page has not finished loading.

Description

Retrieves the current DhDocument object associated with this module.

DhModule.getPeer

Syntax
public IUnknown getPeer();
Return Value

Returns the element peer underlying the HTML peer for this class.

Description

Retrieves the underlying HTML peer element for this class. This method may return null if the document is not bound to this class. Java code that is running in a trusted environment can freely cast the resulting reference to a specific element peer type (for example, wfc.html.om.IHTMLWindow2). This method will always return null if the code is running in a Web server environment.

Note that calling this method represents an advanced usage scenario. Typically, you would never use this method.

DhModule.GetPositionCookie

Syntax
final public int GetPositionCookie();
Description

Implements IPersistHistory.GetPositionCookie().

DhModule.getRequest

Syntax
public IRequest getRequest();
Description

Topic under construction.

DhModule.getResponse

Syntax
public IResponse getResponse();
Description

Topic under construction.

DhModule.getServerMode

Syntax
public boolean getServerMode();
Return Value

Returns true if DhModule is sited on a web server, or returns false if it is sited on a client or other container.

Description

Retrieves the current site for this DhModule.

DhModule.getSite

Syntax
final public synchronized ISite getSite();
Description

Implements ISite.getSite().

DhModule.GetSite

Syntax
final synchronized public IUnknown GetSite( _Guid g );
Description

Implements IObjectWithSite.GetSite()

DhModule.InitNew

Syntax
final public void InitNew();
Description

Implements IPersistPropertyBag.InitNew.

DhModule.Load

Syntax
final public void Load( IPropertyBag pPropBag, IUnknown pErrorLog );
Description

Implements IPersistPropertyBag.Load().

DhModule.LoadHistory

Syntax
final synchronized public void LoadHistory( com.ms.com.IStream pStream, IUnknown bindCtx );
Description

Implements IPersistHistory.LoadHistory().

DhModule.LoadParameters

Syntax
public void LoadParameters( DhPropertyBag pb );
Parameters
pb
The collection of PARAM tags.
Description

This is the first and last time this module has a chance to look at the parameters that were authored into the PARAM tags of the hosting HTML document.

DhModule.removeOnGotFocus

Syntax
public void removeOnGotFocus ( DhEventHandler h );
Parameters
h
The event handler callback method.
Description

Removes the DhEventHandler event handler method callback that is triggered when the document is ready to unload.

DhModule.removeOnLoad

Syntax
public void removeOnLoad ( DhEventHandler h );
Parameters
h
The event handler callback method.
Description

Removes the DhEventHandler event handler method callback that is triggered when the document has finished loading.

DhModule.removeOnLostFocus

Syntax
public void removeOnLostFocus ( DhEventHandler h );
Parameters
h
The event handler callback method.
Description

Removes the DhEventHandler event handler method callback that is triggered when the document has finished loading.

DhModule.removeOnUnload

Syntax
public void removeOnUnload ( DhEventHandler h );
Parameters
h
The event handler callback method.
Description

Removes the DhEventHandler event handler method callback that is triggered when the document is ready to unload.

DhModule.Save

Syntax
final public void Save( IPropertyBag pPropBag, int fClearDirty, int fSaveAllProperties );
Description

Implements IPersistPropertyBag.Save().

DhModule.SaveHistory

Syntax
final synchronized public void SaveHistory( com.ms.com.IStream pStream );
Description

Implements IPersistHistory.SaveHistory().

DhModule.SetPositionCookie

Syntax
final public void SetPositionCookie( int dwPositioncookie );
Description

Implements IPersistHistory.SetPositionCookie().

DhModule.setSite

Syntax
final public void setSite( ISite site );
Description

Implements ISite.setSite().

Note This method is obsolete.

DhModule.SetSite

Syntax
final public void SetSite( IUnknown punk );
Description

Implements IObjectWithSite.SetSite()

DhModule.setupSite

Syntax
protected void setupSite( IOleClientSite ocs, boolean isMainThread );
Description

Topic under construction.

DhModule.write

Syntax 1
public void write( String strHTML );
Parameters
strHTML
The HTML string to write.
Description

Writes the specified HTML string to the current site. If running in server mode, the string is written to the output stream; otherwise, it is added to the end of the current document body.



Syntax 2
public void write( DhElement element );
Parameters
element
The element to write.
Description

Writes the specified DhElement to the current site. If running in server mode, the element's HTML code is generated and sent to the output stream. Otherwise, the element is added to the end of the current document body.



Syntax 3
public void write( IDataStream inputStream, IUploadNotify iNotify, String flagToken );
Parameters
inputStream
An IDataStream input stream.
iNotify
The user supplied IUploadNotify inteface.
flagToken
The token attribute to flag items for notification.
Description

Writes the specified data stream to the document stream. Elements with the flagToken attribute are passed to the user-supplied IUploadNotify interface.



Syntax 4
public void write( IDataStream inputStream, IUploadNotify iNotify );
Parameters
inputStream
An IDataStream input stream.
iNotify
The user-supplied IUploadNotify interface.
Description

Writes the specified data stream to the document stream. Elements with the "__NOTIFY" attribute are passed to the user-supplied IUploadNotify interface.