These are the enhancements to PowerBuilder's DataWindow HTML generation capabilities:
- Additional properties to help you control the display of DataWindow data when displayed in HTML tables
These properties allow you to control cell formatting and borders.
- Style sheets that contain DataWindow formatting
PowerBuilder converts certain DataWindow presentation information into an HTML cascading style sheet. It saves this style sheet in the HTML.StyleSheet property, and syntax within the HTMLTable property includes references to the generated styles. If you call the SaveAs function with the HTMLTable enumeration, PowerBuilder embeds the style sheet in the generated syntax.
- Form generation capability
You can call the GenerateHTMLForm function to create an HTML form from data contained in a DataWindow control or DataStore whose DataWindow object uses the Freeform or Tabular presentation style. You can generate HTML forms for a specified set of rows and columns; PowerBuilder preserves formatting such as radio buttons, checkboxes, and listboxes. It also includes any command buttons defined for the DataWindow.
The HTMLTable.GenerateCSS property controls the downward compatibility of the HTML found in the HTMLTable property. If HTMLTable.GenerateCSS is FALSE, formatting (style sheet references) is not referenced in the HTMLTable property; if it is TRUE, the HTMLTable property includes elements that reference the cascading style sheet saved in HTML.StyleSheet.
The value added in these features is the easy transfer of data from the database to HTML pages. Two typical uses are:
- Code an application that creates HTML pages on a regular basis
- Code a Web.PB application that creates HTML pages on demand
The following HTML page shows an HTML table using PowerBuilder 5.0 functionality:
The following HTML page shows an HTML table using PowerBuilder 6.0 enhancements:
The following HTML page shows a freeform DataWindow converted into a form using syntax generated by the GenerateHTMLForm function:
HTML tables When working with DataWindows to be displayed as HTML tables, you can:
- Create HTML using the HTMLTable property, optionally merging HTMLTable with HTMLTable.StyleSheet
- Create HTML by calling the Save As function with the HTMLTable! enumeration
- Create HTML by saving rows displayed in DataWindow painter Preview
HTML forms When working with DataWindows to be displayed as HTML forms, you can:
- Create freeform and tabular DataWindow objects for use as HTML forms, including command buttons
- Create HTML form syntax by calling the GenerateHTMLForm function
- Build an HTML page by merging the GenerateHTMLForm result with the style sheet and adding other supporting HTML syntax
You can use both the enhanced HTMLTable capabilities and the form creation capability to minimize coding in a Web.PB application.
For more information
HTML generation enhancement detail
New DataWindow object properties
Using HTMLTable enhancements
Displaying DataWindows as HTML forms
integrating DataWindow HTML capabilities with Web.PB