GetLoginView - cWebApp
Returns a handle to the login view
Type: Function
Return Data Type: Handle
Syntax
Function GetLoginView Returns Handle
Call Example
Get GetLoginView to HandleVariable
Description
This function returns the login view's object handle. By default, this is the same as the value stored in the phoLoginView property.
You can augment this function to specify the login view dynamically based on various rules determined by your application.
The login view is determined by setting the phoDefaultView property. phoLoginView is a design time property. Once set it should not be changed. GetLoginView is used to return the handle of the login view. By default, GetLoginView returns the value of phoLoginView. If you wish to dynamically change the login view you can do so by augmenting GetLoginView. For example, you might wish to do this to display different login views for different clients.
All of the framework packages and templates retrieve the login view by calling GetLoginView instead of using phoLoginView. If you need to access this view, you should do the same.
Note
You may use this function in combination with GetDefaultView to load a different dashboard per user (group) or rights. In this case, developers are responsible for adding ALL of the alternative login or default views to the navigation path system with WebRegisterPath.
The Framework itself checks for phoLoginView and phoDefaultView and registers these components with WebRegisterPath and will not know what other views can be returned by the functions GetDefaultView and GetLoginView. Note that setting phoDefaultView or phoLoginView is not needed when using GetDefaultView and GetLoginView.
GetLoginView needs to be aware that for a desktop style application, the login is handled by a cWebModalDialog and for a drill down application by a cWebView. Both login components (by default, LoginDialog.wo and Login.wo) have the pbLoginModeEnforced set to false, otherwise one cannot login at all.
Return Value
View handle