Instantiating the custom component – PB Docs 126

Instantiating the custom component

To use the custom component in your server-side scripts, you
specify your package and component name in the form YourPackage/YourComponent.
If you are using methods of the generic component installed with EAServer, you must use the narrow
method on the generic component helper class to reference the DataWindow/HTMLGenerator126
interface.

The following code instantiates a custom component called
EmpListDW that uses the generic HTMLGenerator126 component interface.
EmpListDW is deployed in the EmpListPkg package. You substitute
this code for the line that instantiates the generic component in
the example for “Instantiating the component”, but you do not change the narrow
method called on the generic component’s helper class:

Using OneTrip to set up the component and get
the generated HTML

“Instantiating and configuring
the server component”
described several
items your server script should include to set up the Web DataWindow correctly.
Instead of coding all these things separately, you can do all the
setup and get the generated HTML with a single method when the EAServer component has been configured
with a DataWindow definition and transaction information. This technique is especially
useful for improving performance without requiring the server component
to maintain state.

Using OneTripEx for retrieval arguments

If your DataWindow requires retrieval arguments, use OneTripEx
instead of OneTrip. The code checks for a page parameter that has
the retrieval argument value. It also makes sure the value will
still be available in a reloaded page by providing a selflinkargs expression:


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x