RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TLoginFormAdapter Class

TLoginFormAdapter contains the adapter fields and adapter actions used to generate a login form.

Pascal
TLoginFormAdapter = class(TCustomLoginFormAdapter);
C++
class TLoginFormAdapter : public TCustomLoginFormAdapter;

Use TLoginFormAdapter to generate a login form. TLoginFormAdapter has default fields for user name, password, and next page. The next page field lets the user select a Web page to see after logging in. TLoginFormAdapter has a single default action for logging in. If the WebSnap application also contains an end user adapter such as TEndUserAdapter or TEndUserSessionAdapter, TLoginFormAdapter calls the end user adapter's LogIn method to log the user in. You can also implement an OnLogin event handler to provide custom login support. 

To build a simple login form 

 

  1. Create a new Web page module that contains a TAdapterPageProducer component.  

  2. Add a TLoginFormAdapter component to that module.  

  3. Right click on the TAdapterPageProducer object and display the Web page editor. 

  4. In the Web page editor, add an adapter form, and to that form add an adapter field group and an adapter command group.  

  5. Select the field group, and set its Adapter property to the TLoginFormAdapter object.  

  6. Select the command group, and set its display component to the adapter field group.  

You can embellish this simple form as you like. When you are done, connect the form to an end user adapter by setting the end user adapter's LoginPage property to the name of the page module. 

To provide complete login support, add TWebUserList, TEndUserSessionAdapter, and TSessionsService components to the web application module to identify user names and passwords and to keep track of end user login state. 

 

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