RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomInetXPageProducer.Content Method

Returns the HTML document assembled by the InternetExpress page producer.

Pascal
function Content: string; override;
C++
virtual __fastcall AnsiString Content();

Call Content to get the HTML document produced by TCustomInetXPageProducer. This document contains a mixture of HTML, XML, and javascript. It allows Web browsers to view and edit data from an application server.  

The InternetExpress 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>
<#INCLUDES> <#STYLES> <#WARNINGS> <#FORMS> <#SCRIPT>
</BODY>
</HTML>

Although the template can be changed to include any combination of these tags with tags of the following forms

<#COMPONENT Name=WebItemName>
<#DATAPACKET XMLBroker=BrokerName>

which are also translated automatically. The template can replace the default HTML-transparent tags with the tag

<#BODYELEMENTS>

Finally, the template can include any tags translated by the OnHTMLTag event handler. 

The Content method translates the tags listed above as follows: 

<#INCLUDES> generates the statements that include the javascript libraries at the location specified by IncludePathURL

<#STYLES> generates the statements that defines a style sheet from the definitions listed in the Styles or StylesFile property. 

<#WARNINGS> generates nothing at runtime. At design time, it adds warning messages for problems detected while generating the HTML document. You can see these messages in the Web page editor. 

<#FORMS> generates the HTML produced by the components listed in the WebPageItems property. The HTML from each component is listed in the order it appears in WebPageItems. 

<#SCRIPT> generates a block of javascript declarations that are used by the components listed in WebPageItems. 

<#BODYELEMENTS> generates the same HTML as results from the 5 tags in the default template. It is useful when generating a template in an HTML editor when you want to use the default layout but add additional elements (such as style sheets) using the editor. 

<#COMPONENT> is replaced with the content produced by the specified component. Typically, this is a component listed in the WebPageItems property, but it can be any component that supports the IWebContent interface and has the same Owner as the INETX page producer.  

<#DATAPACKET> is replaced with the XML data packet obtained from the specified XML broker.  

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

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!