The Web DataWindow Container project wizard

In PowerBuilder, you can use the Web DataWindow Container project wizard to create a project that deploys a custom version of the Web DataWindow server component (HTMLGenerator125) to EAServer with all the DataWindow objects in your library list built into the deployed PBD.

Because you are using a custom component instead of the preinstalled HTMLGenerator125 component, you can set properties for your component in EAServer Manager. Setting properties reduces the number of method calls required to configure the component and can result in improved performance, maintainability, and scalability.

Using the wizard

When you have defined the DataWindow objects you need, start the Web DataWindow Container wizard from the Project page of the New dialog box and follow the instructions in the wizard.

The choices you make in the wizard are similar to those you make for other EAServer components, such as whether to support instance pooling or live editing. The package and component can have any names you want, with the exception that you cannot name the package DataWindow (the name of the package that contains the preinstalled HTMLGenerator125 component). You cannot set component type or transaction support properties.

Building the Web DataWindow Container project presets some of the properties of the component that you would otherwise need to set in scripts or in EAServer Manager. You can specify a database profile in the wizard or Project painter to set the com.sybase.datawindow.trans.dbms and other database transaction properties. If you want calls to component methods to be written to the server log, select Enable Trace to set the com.sybase.datawindow.trace property.

NoteConnection or data source cache Specifying a profile sets database transaction properties for the component, but you still need to create a connection cache (EAServer 5.x) or data source cache (EAServer 6.x) in EAServer Manager for the database that the component will access.

Service classes

You can add a custom class user object to your project to perform any special processing you require. This object acts as a service class. The custom class user object must be in the same library as the DataWindow objects or on the target’s library list. When you build the Web DataWindow Container project, select the class in the Select Objects dialog box in the Project painter. For more information, see “Using service classes”.

Instantiating the container component

When you create an instance of the container component, you must either provide a Java proxy for the component or pass DataWindow/HTMLGenerator125 as the last argument to the CreateComponent method. This specifies that the component uses the proxy provided for the generic component. For example:

dwObj = java.CreateComponent
		("ContainerPkg/ContComponent",
		"iiop://testMachine:2000", "Jagadmin", "mypass",
		"DataWindow/HTMLGenerator125" );

This is the same way you instantiate custom components. For more information on custom components, see “Instantiating the custom component”.

Selecting a DataWindow from the container component

To select a DataWindow from the container component, you must use the SetDWObjectEx method rather than the SetDWObject method:

//Only the DW is needed, as package already specified //above when connecting
retVal = dwObj.SetDWObjectEx("d_mydw"); document.write("SetDwObject = " + retVal);

For more information on the SetDWObject method, see “Loading the DataWindow object” and the DataWindow Reference.