HTMLGen.property (obsolete)
Description
Settings that control the level of features incorporated into HTML
generated for the DataWindow.
Obsolete property
HTMLGen.property is obsolete and should not be used, because the
Web DataWindow technology is obsolete.
The Web Generation tab and JavaScript Generation tab are
preserved for the backward compatibility only.
Applies to
DataWindow objects
Syntax
PowerBuilder dot notation:
|
1 |
dw_control.Object.DataWindow.HTMLGen.property |
Describe and Modify argument:
|
1 |
"DataWindow.HTMLGen.property { = ' value ' }" |
|
Parameter |
Description |
|---|---|
|
property |
A property that controls how HTML is generated for |
|
value |
The value to be assigned to the property. Value can |
|
Property for HTMLGen |
Value |
||
|---|---|---|---|
|
Browser |
(exp) A string identifying the browser in which you Recognized |
||
|
ClientComputedFields |
(exp) Whether computed fields that reference column Values are:
Regardless of this setting, if the |
||
|
ClientEvents |
(exp) Whether JavaScript code to trigger events is Values
|
||
|
ClientFormatting |
(exp) Whether display formats are applied to data Values
|
||
|
ClientScriptable |
(exp) Whether client-side JavaScript can interact Values are:
This option adds approximately 20K to the |
||
|
ClientValidation |
(exp) Whether JavaScript code to perform validation Values
|
||
|
CommonJSFile |
(exp) Cache file name for common JavaScript |
||
|
DateJSFile |
(exp) Cache file name for common Web DataWindow |
||
|
EncodeSelfLinkArgs |
(exp) A switch to disable HTML 4 encoding of the Values are:
|
||
|
GenerateDDDWFrames |
(exp) Specifies whether drop-down DataWindows are Values are:
The use of the GenerateDDDWFrames option |
||
|
GenerateJavaScript |
(exp) Specifies whether to generate JavaScript if Values are:
|
||
|
HTMLVersion |
(exp) The version of HTML to Values are:
If the browser is recognized, this |
||
|
NetscapeLayers |
(exp) Formats the Web DataWindow for Netscape 4.0 |
||
|
NumberJSFile |
(exp) Cache file name for common Web DataWindow |
||
|
ObjectName |
(exp) A string specifying a name used in generated You must specify a unique object |
||
|
PageSize |
(exp) The number of rows of data to include in a If the HTMLDW property is If it is set to No, |
||
|
PagingMethod |
A value of the WebPagingMethod enumerated variable Values PostBack! (0) — (default) The control posts Callback! (1) — The control calls a XMLClientSide! (2) — The control See PagingMethod. |
||
|
ResourceBase |
(exp) The URL for included JavaScript files. If you |
||
|
SelfLink |
(exp) A string specifying the URL for the current SelfLink is used to generate URLs for |
||
|
SelfLinkArgs |
A string in the form:
Argname Exp The evaluated SelfLinkArgs expressions are |
||
|
StringJSFile |
(exp) Cache file name for common Web DataWindow |
||
|
TabIndexBase |
(exp) Sets the starting tab order number for a Web |
||
|
UserJSFile |
(exp) Cache file name for user-defined Web |
Usage
Most of these properties are considered only when the HTMLDW
property is set to Yes.
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, no |
|
|
Mozilla/2.x ( Mozilla/3.x |
JavaScript. No style sheets, no |
|
|
Mozilla/4.x (
|
Style sheets, JavaScript, regular No absolute positioning. |
|
Microsoft Internet Explorer |
Mozilla/1.22 (compatible; MSIE 2.x; |
No style sheets, no absolute positioning, no tab |
|
|
Mozilla/2.0 (compatible; MSIE 3.x; |
Style sheets, tab order, JavaScript. No |
|
|
Mozilla/4.0 (compatible; MSIE 4.x, Mozilla/4.0 |
Style sheets, absolute positioning, tab order, |
|
Opera |
Mozilla/3.0 (compatible; Opera 3.x; |
JavaScript, regular expressions. No |
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 2 3 4 5 |
dw1.Object.DataWindow.HTMLGen.HTMLVersion = "4.0" setting = dw1.Describe ("DataWindow.HTMLGen.Browser") dw1.Modify("DataWindow.HTMLGen.ClientValidation = 'no'") dw1.Modify("DataWindow.HTMLGen.PublishPath = 'C:InetpubwwwrootMyWebAppgeneratedfiles'") dw1.Modify("DataWindow.HTMLGen.ResourceBase = '/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 |