RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomAdapterPageProducer.WebContent Method

Returns the HTML document assembled by the Adapter page producer.

Pascal
function WebContent(Options: TWebContentOptions; Layout: TLayout): string;
C++
__fastcall AnsiString WebContent(TWebContentOptions Options, TLayout Layout);

Call WebContent to get the HTML document produced by TCustomAdapterPageProducer. TCustomAdapterPageProducer uses WebContent to implement the Content method of its IWebContent interface. 

Options contains a set of flags that limit what can be included in the generated HTML. 

Layout is ignored by the WebContent method. It is included as a parameter for compatibility with other content producers that use a helper object to coordinate the layout of content produced by multiple Web items. 

The Adapter page producer creates its content by replacing HTML-transparent tags in the template specified by HTMLDoc or HTMLFile

By default, this template has the form

<HTML>
<HEAD>
</HEAD>
<BODY>
<#STYLES> <#WARNINGS> <#SERVERSCRIPT>
</BODY>
</HTML>

Although the template can be changed to include any combination of these tags with custom HTML or tags that the application translates in an OnHTMLTag event handler. 

The WebContent method translates the tags listed above as follows: 

<#STYLES> - This tag is replaced by the stylesheet defined by the Styles or StylesFile property. 

<#WARNINGS> - This tag is replaced with design time warnings that indicate possible problems with the hierarchy of web items specified by the WebPageItems property. 

<#SERVERSCRIPT> - This tag is replaced with generated HTML/JavaScript based on the hierarchy of Web items. TCustomAdapterPageProducer will not generate any content if this tag is missing. 

The string returned by WebContent can be used as the Content property of the response to an HTTP request message. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!