OneTrip (obsolete) – PB Docs 2021

OneTrip (obsolete)

Description

Generates HTML syntax for the Web DataWindow after setting values
that refresh the state of the server component so that it is in sync with
user actions.

Obsolete method

OneTrip is obsolete and should not be used, because the Web
DataWindow technology is obsolete.

Applies to

DataWindow type

Method applies to

Web

Server component

Syntax

Web DataWindow server
component

Argument

Description

dwcomponent

A reference to a Web DataWindow server
component

htmlobjectname

A string specifying a name used in generated code for
the Web DataWindow client control, page parameters, and client
side events. You must specify a unique object name when there is
more than one Web DataWindow on a Web page.

retrievalargs

A string that contains the values of the retrieval
arguments expected by the DataWindow object associated with the
server component (see Usage note).

browser

A string identifying the browser and version. The
value should match the browser information passed to the Web
server in the HTTP header. The corresponding server variable is
HTTP_USER_AGENT.

Sets the value of the HTMLGen.Browser
property for the DataWindow object associated with the server
component.

For information on recognized browsers, see
HTMLGen.property.

selflink

The URL for the current page. It cannot include
parameters. Parameters from selflinkargs may be added when HTML is
generated.

The server component uses SelfLink to
generate URLs for navigation buttons that obtain additional rows
from the result set.

Sets the value of the
HTMLGen.SelfLink property for the DataWindow object associated
with the server component.

selflinkargs

A string in the form:

Argname
is an argument passed to the server.

Exp is a
DataWindow expression whose value is a string. The DataWindow in
the server component evaluates it, converts it using URL encoding,
and includes in the selflinkargs string.

Sets the
value of the HTMLGen.SelfLinkArgs property for the DataWindow
object associated with the server component.

action

A string describing an action associated with a
button click or method call in a Web DataWindow client control on
a Web page. The value of action is stored in a page parameter
called htmlobjectname_action.

context

A string describing the context of action in the Web
DataWindow client control. The string is generated by a Web
DataWindow script and the value is stored in a page parameter
called htmlobjectname_context.

The format is not
documented and subject to change.

Return value

Returns the generated HTML if it succeeds and an error message if
any of the requested settings fails.

Usage

OneTrip and OneTripEx perform the tasks of SetSelfLink, SetBrowser,
Retrieve, SetAction, and Generate in a single method. They are meant to be
used with a server component that has been previously configured with a
DataWindow definition and transaction information. Using OneTrip produces
maximum performance for the Web DataWindow client while allowing the
server component to remain stateless.

Use OneTripEx instead of OneTrip if you need to specify retrieval
arguments. The retrievalargs string in the OneTripEx syntax has the
format:

The values of the retrieval arguments must be separated by newline
characters (
) and individual values cannot contain newline characters as
part of the value. The Web DataWindow supports up to 16 retrieval
arguments.dd

You can specify an array for the value of a retrieval argument by
separating the array values with a tab character ( ). For example, if the
DataWindow expected an array for the second retrieval argument, the syntax
would be:

If the script gets the values for the retrieval arguments from page
parameters, you must also specify the retrieval arguments as selflinkargs
expressions, so that the values will be available as page parameters when
the page is reloaded.

The evaluated selflinkargs expressions are included in the generated
HTML as hidden fields and are available to server-side scripts as page
parameters. You can use the arguments to supply information that the
server component needs to render additional pages of the result set, such
as retrieval arguments. Selflinkargs can also be used to keep login
information or other data available that was passed in the original call
to the page.

For information on quotation marks and other formatting for the
expression, see the SetSelfLink
method.

Examples

This Web Target server-side script uses OneTripEx to get generated
HTML. The DataWindow object expects two retrieval arguments, an employee
ID and a salary:

See also

Generate

Retrieve

SetAction

SetBrowser

SetSelfLink


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