Web.HTTPApp.TWebActionItem.Producer

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Producer: TCustomContentProducer read FProducer write SetProducer;

C++

__property TCustomContentProducer* Producer = {read=FProducer, write=SetProducer};

Properties

Type Visibility Source Unit Parent
property published
Web.HTTPApp.pas
Web.HTTPApp.hpp
Web.HTTPApp TWebActionItem

Description

Specifies a content producer that generates the content of response messages when the action item executes.

Set Producer to associate the action item with a content producer of the type TCustomContentProducer. (If a content producer of type IProduceContent is used instead of TCustomContentProducer, then the property ProducerContent should be set instead.) If Producer is not nil (Delphi) or NULL (C++), then when the web dispatcher passes a request message to the action item, the action item sets the Content property of the response message to the value returned by the producer's Content method. After the content producer has assigned the response's Content property, the action item receives an OnAction event, where it can optionally set other response properties or send the response message.

If Producer is nil (Delphi) or NULL (C++), the action item must use the OnAction event handler to influence the response message.

The properties Producer and ProducerContent are mutually exclusive. If one is set, the other must not be.

Note: Each content producer can be associated with only one action item at a time. Setting the Producer property of one action item causes the Web dispatcher that manages that item to check whether any other action item has its Producer property set to the same component. If another action item was associated with the same producer, its Producer property is changed to nil (Delphi) or NULL (C++).

See Also