SetWeight (obsolete)
Description
Specifies the types of JavaScript code that will be included in the
generated HTML or XHTML.
Obsolete method
SetWeight 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
|
1 |
integer dwcomponent.SetWeight ( boolean allowupdate, boolean validation, boolean events, boolean clientscriptable, boolean clientformatting ) |
|
Argument |
Description |
|---|---|
|
dwcomponent |
A reference to a Web DataWindow server |
|
allowupdate |
Specifies whether the generated HTML will be a form
When allowupdate is false, validation and |
|
validation |
Specifies whether the generated HTML will include
Sets the value of the |
|
events |
Specifies whether the generated HTML will include
Sets the value of the HTMLGen.ClientEvents The available events are listed in the |
|
clientscriptable |
Specifies whether the generated HTML allows
This option adds approximately 100K to the Sets the value of the |
|
clientformatting |
Specifies whether the generated HTML will include
Sets the value of the |
Return value
Returns an empty string if successful and the syntax error message
from the Modify method if it fails.
Usage
When code for more features is included, the Web DataWindow becomes
a more robust tool for data entry and manipulation, allowing data
validation, formatting, and client-side scripts that react to user
actions. However, if your application does not use some of these features,
you can decrease the size of the generated code by setting the appropriate
options to false.
This method calls the Modify method of the server component’s
DataStore to set the properties.
These properties can also be set in the DataWindow painter so that
the settings are part of the DataWindow object definition.
Examples
This example specifies updating of data is not supported in the
server component webDW, but events are supported so client-side scripts
can respond to user actions:
|
1 |
webDW.SetWeight( false, false, true, true, false ); |
This example specifies that all features are supported except
client-side scripting. Scripts in the Web page will not be able to call
Web DataWindow client methods:
|
1 |
webDW.SetWeight( true, true, true, false, true ); |
This example specifies that all features are supported:
|
1 |
webDW.SetWeight( true, true, true, true, true ); |
See also