HTMLGen.property DataWindow object property
Description
Settings that control the level of features incorporated into
HTML generated for the DataWindow.
Controls
DataWindow objects
Syntax
PowerBuilder dot notation:
|
1 |
<span>dw_control</span>.Object.DataWindow.HTMLGen.<span>property</span> |
Describe and Modify argument:
|
1 |
"<span></span>DataWindow.HTMLGen.<span>property</span> { = '<span> value </span>' }" |
|
Parameter |
Description |
|---|---|
|
property |
A property that controls how HTML is |
|
value |
The value to be assigned to the property. Value can |
|
Property for HTMLGen |
Value |
||
|---|---|---|---|
|
Browser |
(exp) A string identifying Recognized strings are listed in “Browser recognition”. |
||
|
ClientComputedFields |
(exp) Whether computed Values are:
Regardless of this setting, if the computed field includes |
||
|
ClientEvents |
(exp) Whether JavaScript Values are:
|
||
|
ClientFormatting |
(exp) Whether display Values are:
|
||
|
ClientScriptable |
(exp) Whether client-side Values are:
This option adds approximately 20K to the size of the generated |
||
|
ClientValidation |
(exp) Whether JavaScript Values are:
|
||
|
CommonJSFile |
(exp) Cache file |
||
|
DateJSFile |
(exp) Cache file |
||
|
EncodeSelfLinkArgs |
(exp) A switch to Values are:
|
||
|
GenerateDDDWFrames |
(exp) Specifies Values are:
The use of the GenerateDDDWFrames option for drop–down |
||
|
GenerateJavaScript |
(exp) Specifies Values are:
|
||
|
HTMLVersion |
(exp) The version Values are:
If the browser is recognized, this property is ignored and |
||
|
NetscapeLayers |
(exp) Formats the |
||
|
NumberJSFile |
(exp) Cache file |
||
|
ObjectName |
(exp) A string specifying You must specify a unique object name when there will be more |
||
|
PageSize |
(exp) The number If the HTMLDW property is set to Yes, PageSize is used. If it is set to No, PageSize is ignored and all rows in the |
||
|
PagingMethod |
A value of the WebPagingMethod enumerated Values are:
See “PagingMethod”. |
||
|
ResourceBase |
(exp) The URL for |
||
|
SelfLink |
(exp) A string specifying SelfLink is used to generate URLs for navigation buttons that |
||
|
SelfLinkArgs |
A string in the form:
Argname is a page parameter to be passed Exp is a DataWindow expression whose The evaluated SelfLinkArgs expressions are included in the |
||
|
StringJSFile |
(exp) Cache file |
||
|
TabIndexBase |
(exp) Sets the starting |
||
|
UserJSFile |
(exp) Cache file |
Usage
Most of these properties are considered only when the HTMLDW
property is set to Yes.
HTMLDW set to Yes
The HTMLDW property is set to Yes automatically when you create
an instance of the generic Web DataWindow server component (DataWindow/HTMLGenerator125
for EAServer. In this case,
you do not need to set this property in the DataWindow painter or
in a script.
Browser recognition
The Browser and HTMLVersion properties are always considered
when HTML is generated, regardless of the HTMLDW setting.
Browser identification strings are sent by the client to the
server in the HTTP header. The server component can assign the HTTP_USER_AGENT
value from the HTTP header to the Browser property. If the string
specifies a browser that the DataWindow engine supports, the DataWindow
will generate HTML optimized for that browser. Browser-specific
HTML is generated only for Microsoft Internet Explorer and Netscape
browsers.
If the browser is not recognized or not specified, then the
generated HTML will use the HTMLVersion and GenerateJavaScript properties
to decide what features to include. DataWindow HTML generation recognizes
these browsers:
|
Browser |
HTTP header string |
HTML features used |
|---|---|---|
|
Netscape |
Mozilla/1.x ( |
No style sheets, no absolute positioning, |
|
Mozilla/2.x ( |
JavaScript. No style sheets, no absolute positioning, no regular expressions. |
|
|
Mozilla/4.x ( |
Style sheets, JavaScript, regular expressions. No absolute positioning. |
|
|
Microsoft Internet Explorer |
Mozilla/1.22 (compatible; MSIE 2.x; |
No style sheets, no absolute positioning, |
|
Mozilla/2.0 (compatible; MSIE |
Style sheets, tab order, JavaScript. No absolute positioning, no regular expressions. |
|
|
Mozilla/4.0 (compatible; MSIE |
Style sheets, absolute positioning, tab |
|
|
Opera |
Mozilla/3.0 (compatible; Opera |
JavaScript, regular expressions. No style sheets, no absolute positioning. |
Columns with RichText edit style
To save rich text formatting in columns with the RichText
edit style, the HTMLGen.Browser property must be set to “Microsoft
Internet Explorer” and the HTMLGen.HTMLVersion property to “4.0”.
Client properties
The ClientEvents, ClientFormatting, ClientValidation, ClientComputedFields,
and ClientScriptable properties control the amount of JavaScript
that is generated for the Web DataWindow, which impacts the size of
the page that is downloaded to the browser. You can reduce the size
of the generated HTML by setting one or more of the properties to
No.
JavaScript caching
You can also reduce the size of the generated HTML by setting
up cache files for common Web DataWindow client-side methods. You can
generate these files using the JavaScript Generation wizard that
you launch from a button on the JavaScript Generation tab of the
Properties view in the DataWindow painter.
Once you generate these files, you can set the file names
as values for the CommonJSFile, DateJSFile, NumberJSFile, and/or
StringJSFile properties. When you set these properties, the methods
defined in the referenced files will not be generated with the HTML
in any Web DataWindow pages that are sent to the page server and
client browser.With JavaScript caching, you improve performance
after the first Web DataWindow page is generated—as long
as the browser on the client computer is configured to use cached
files. With caching enabled, the browser loads the JS files from
the Web server into its cache, and these become available for all the
Web DataWindow pages in your application. There is no performance
gain if the browser does not find the JS files in its cache since,
in this case, it reloads the files from the Web server.
PagingMethod
The PagingMethod property determines whether the control uses
the client–side script callback mechanism introduced in
the .NET Framework 2.0 to execute server-side code without posting
and refreshing the current page.
The default is to post back to the server (PostBack!).
The Callback! option uses script callbacks to retrieve the
next page of XML data. It corresponds to the Microsoft GridView
control’s EnableSortingAndPagingCallback property, but
applies only to paging. Client–side sorting is handled
by another mechanism.
For the XML rendering format, the design of the Callback!
option requires that a reusable XSLT stylesheet be generated so
that the browser can cache it. The benefit from this requirement
is that only the XML data for the next requested page need be returned
by the callback. This XML data is always trivial in size (about
a 1 to 20 ratio), resulting in significant bandwidth savings. This
is unlike other implementations, where the entire presentation is
always regenerated and downloaded again from every callback.
The generated XSLT stylesheet is not reusable, and therefore
cannot be cached by the browser, if the DataWindow layout is inconsistent
page-to-page, or it does not contain a complete first page of data.
In these scenarios, the Callback! option defers to PostBack! until
a stylesheet can be generated that is reusable, and can therefore
be cached in the browser.
The XMLClientSide! option is only available with the XML rendering
format. It retrieves the entire XML result set and uses XSLT re-transformation
of the cached stylesheet to perform paging on the client. This option
can currently be used only if the presentation style is uniform
from page to page. For example, it cannot handle a summary band
on the last page.
When PagingMethod is set to XMLClientSide!, InsertRow, AppendRow,
and DeleteRow actions do not require a postback
or callback to the server. However, computed fields in the DataWindow
that are dependent on the RowCount method are
not refreshed until an action such as Update or Retrieve forces
a postback to the server.
NetscapeLayers property
Even if you set the NetscapeLayers property to true,
certain functionality in a Netscape browser using absolute positioning might
not be identical to the functionality available with Internet Explorer.
For example, you cannot tab between DataWindow columns using a Netscape browser
on an NT machine (although you can do this using a Netscape browser on
a Solaris machine).
TabIndexBase property
If you add Web DataWindows to a page that already has a Web
DataWindow on it, you can set the TabIndexBase property for each Web
DataWindow you add.
For a page with two Web DataWindows, setting the tab index
base for the second DataWindow to a number greater than the tab
index for the last column of the first DataWindow allows the user
(using an Internet Explorer browser) to tab through all the columns
of the first DataWindow before tabbing to the second DataWindow.
Otherwise, pressing the Tab key could cause the cursor and focus
to jump from one DataWindow to another instead of tabbing to the next
column in the DataWindow that initially had focus.
In the painter
Select the DataWindow object by deselecting all controls;
then set the values in the Properties view, Web Generation tab or
JavaScript Generation tab. Select HTML/XHTML from the Format
to Configure list to display the properties.
Examples
|
1 |
dw1.Object.DataWindow.HTMLGen.HTMLVersion = "4.0" |
|
1 |
setting = dw1.Describe<br> ("DataWindow.HTMLGen.Browser") |
|
1 |
dw1.Modify("DataWindow.HTMLGen.ClientValidation = 'no'") |
|
1 |
dw1.Modify("DataWindow.HTMLGen.PublishPath=<br>   'C:InetpubwwwrootMyWebAppgeneratedfiles'")<br>dw1.Modify("DataWindow.HTMLGen.ResourceBase=<br>   '/MyWebApp/generatedfiles'") |
This statement sets the XMLGen.Paging property so
that the complete result set is downloaded to the client and paging
takes place on the client:
|
1 |
dw1.Modify("DataWindow.HTMLGen.PagingMethod=XMLClientSide!") |
This statement sets the HTMLGen.PagingMethod property
to use script callbacks:
|
1 |
dw1.Object.DataWindow.HTMLGen.PagingMethod=1 |