Binding a server-scriptable control to the property of an EAServer component gives the control access to the data encapsulated by that property. It also automates the process of moving data to and from the component. For components that encapsulate data from a database, binding a property of that component to a control lets you quickly get data and update it.
Before you can bind a control to the value of an EAServer component property, the component value must be available to your page. You can add a component to an existing page by selecting the component on the EAServer page of the Page Properties dialog box or by dragging and dropping it onto the page from the System Tree. The component must have at least one get method for a property that you want to bind to your control. The required get method must not include any arguments.
For more information about accessing a property for an EAServer component, see “Accessing EAServer components”.
For the binding to work at runtime, component stubs must be available to the page server. Component stubs can be generated automatically from PowerBuilder or you can use EAServer Manager to generate the stubs.
Regenerating component stubs EAServer stubs are regenerated only if you select a full rebuild for your target deployment rebuild option. You can make this selection in the Deployment Configuration wizard or in the Deployment Configuration Properties dialog box. By default, the default rebuild option for a deployment configuration is incremental. If the incremental rebuild option is selected, the time it takes to deploy a 4GL target that uses EAServer components can be significantly reduced.
The directory containing the component stubs must be included in the classpath used by the page server. If the page server caches pages it generates, and if you modify a component and regenerate the stubs after loading a page from your Web server, you may need to stop and restart the Web server to see changes on the client side.
To bind an EAServer component property to a control:
Select Insert>Form Field, then select the type of control (such as Single Line Text) you want to bind to a component property.
The Properties dialog box for the control displays.
On the main page of the control properties dialog box, type the name of the control and other information as needed.
On the Bind page, select an EAServer component.
The list includes only EAServer components that have properties available for binding.
Select a component property.
The property name is the property that provides access to the component through a get method defined for it in EAServer. The get method must not take any arguments for it to appear in the Property Name drop-down list.