GenerateXHTML
method (DataWindows)
Description
Generates the inline content of the Web DataWindow in XHTML.
Obsolete method
GenerateXHTML 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 |
string dwcontrol.GenerateXHTML ({page[ ] variables}) |
|
Argument |
Description |
|---|---|
|
dwcontrol |
The name of the server-side DataWindow control you |
|
page |
An array for passing page variables. The page |
Return value
Integer. 1 indicates success, and -1 indicates failure.
Usage
At runtime, GenerateXHTML performs the tasks required to generate
the dynamic XHTML, including retrieving the action context and generating
the XHTML inline. Connection errors, including database error messages,
are also generated inline.
For information about the advantages and limitations of each
rendering format, see DataWindow Programmers Guide.
The GenerateXHTML method delivers the DataWindow in XHTML to the
client browser and it generates a CSS style sheet and JS files that are
cached on the client side and referenced in the XHTML source.
Examples
The following JSP example specifies subdirectories of the current
application directory to publish the CSS and JS components of the Web
DataWindow and generates the DataWindow in XHTML:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
String resourceBase = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath(); String publishPath = application.getRealPath("/"); dwGen.Modify("DataWindow.CSSGen.ResourceBase = '" + resourceBase + "/css'"); dwGen.Modify("DataWindow.CSSGen.PublishPath = '" + publishPath + "css'"); dwGen.Modify("DataWindow.JSGen.ResourceBase = '" + resourceBase + "/js'"); dwGen.Modify("DataWindow.JSGen.PublishPath = '" + publishPath + "js'"); String dwXHTML = dwGen.GenerateXHTML(); out.print (dwXHTML); |
See also