RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TWebContext.FindPage Method

Retrieves a Web page module given its name.

Pascal
function FindPage(const APage: string; AOptions: TFindPageOptions; out AComponent: TObject): Boolean; override;
C++
virtual __fastcall Boolean FindPage(const AnsiString APage, TFindPageOptions AOptions, TObject * AComponent);

Call FindPage to obtain an instance of a registered Web page module given its name. If an instance of the specified Web page module already exists, FindPage returns that instance. Otherwise, if the named Web page module is registered, FindPage creates an instance of the module and returns the new instance. 

APage is the name of the desired Web page module. The name is specified using the Web page module wizard, and forms the basis of the Web page module's class name. Thus, a Web page module with a name MyPage has the class name TMyPage. 

AOptions is a set of options that can limit the page modules that FindPage considers. For any option included in this set, FindPage only considers Web page modules that have the corresponding attribute. 

AComponent returns the instance of the specified Web page module. 

FindPage returns true if it can find or create an instance of the specified Web page module, false otherwise. 

 

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