Appeon Client Functions

Appeon client functions are PowerBuilder global functions which perform identical functionalities to the function of AppeonExtFuncs object. However, heavy use of global functions are not recommended due to their poor extensibility and performance compared to object functions, therefore, whenever it is feasible, Appeon client function should be replaced with the equivalent function of AppeonExtFuncs object.

AppeonGetAppeonUserName function

Description

Gets the user name that you type into the Appeon Login dialog box.

Syntax

AppeonGetAppeonUserName ( )

Return value

String.

Usage

This function takes effect in the deployed Appeon application, not in the PowerBuilder application.

AppeonGetBrowserVersion function

Description

Gets the Internet Explorer version of the Web client.

Supported on the Web client only.

Syntax

AppeonGetBrowserVersion ( )

Return value

String.

Usage

This function takes effect in the deployed Appeon application, not in the PowerBuilder application.

AppeonGetCacheDir function

Description

Gets the cache directory that is used by the current application.

For the Web application, the cache directory can be customized in AEM. For details, refer to the section called “Client Storage Location” in Appeon Server Configuration Guide for .NET in Appeon Server Configuration Guide for J2EE.

For the iOS mobile application, the cache directory is /$Appeon_Mobile_folder$/Documents/$your_application_folder$, for example, /var/mobile/Applications/144F5F33-A33F-480D-A3D9-01BBA5410EB2/Documents/4c001b05.

For the Android mobile application, the cache directory is /data/data/$Appeon_Mobile_folder$/files/$your_application_folder$, for example, /data/data/com.appeon.mobile/files/21746870.

Syntax

AppeonGetCacheDir ( )

Return value

String.

Usage

This function takes effect in the deployed Appeon application, not in the PowerBuilder application.

AppeonGetClientID function

Description

Gets the unique session identifier for the Web or mobile client.

Syntax

AppeonGetClientID ( )

Return value

String.

AppeonGetClientIP function

Description

Gets the IP address of the Web or mobile client.

Syntax

AppeonGetClientIP ( )

Return value

String.

Usage

This function takes effect in the deployed Appeon application, not in the PowerBuilder application.

AppeonGetClientType function

Description

Gets the type of an application.

Syntax

AppeonGetClientType ( )

Return value

String

Returns "WEB" if the application runs on the Web.

Returns "PB" if the application runs in PowerBuilder.

Returns "MOBILE" if the application runs on a mobile device.

AppeonGetHttpInfo function

Description

Gets the HTTP header information from a particular request.

Syntax

AppeonGetHttpInfo ( string attribute )

Argument

Description

attribute

The required HTTP information. For example, "Host", "Cookie", etc.

Return value

String

AppeonGetIEHandle function

Description

Gets the Internet Explorer handle for the Web application.

Supported on the Web client only.

Syntax

AppeonGetIEHandle ( )

Return value

Long.

Usage

This function takes effect in the deployed Appeon application, not in the PowerBuilder application.

AppeonGetIEURL function

Description

Gets the URL of the Web application.

For the mobile application, use of_getappinfo to get the URL of the mobile application.

Syntax

AppeonGetIEURL ( )

Return value

String.

Usage

This function takes effect in the deployed Appeon application, not in the PowerBuilder application.

AppeonGetOSType function

Description

Gets the type of OS that runs your application (the Appeon Web application, the Appeon mobile application, or the PowerBuilder client application).

Syntax

AppeonGetOSType ( )

Return value

String.

Returns the type of OS that runs the Appeon Web application, the Appeon mobile application, or the PowerBuilder client application.

AppeonGetRemainingdays function

Description

Gets the remaining day(s) of license or technical support.

Syntax

AppeonGetRemainingdays ( String as_type, ref string as_error )

Argument

Description

as_type

License or technical support that you want to get the remaining day(s). "license" indicates to get remaining day(s) of license. "support" indicates to get remaining day(s) of technical support.

as_error

An empty string or error messages.

Return value

Long.

Returns a number >0 if the license or technical support has remaining day(s).

Returns 0 if there is no expiration date.

Returns -1 if license or technical support has expired, Appeon Server has an exception, or parameter is invalid.

AppeonGetServerType function

Description

Gets the Appeon Server type where the application runs.

Syntax

AppeonGetServerType ( )

Return value

Integer.

Returns 1 if the application runs on an Appeon Server that is installed to a Java Server (such as EAServer).

Returns 2 if the application runs on an Appeon Server that is installed to a .NET IIS server.

Usage

This function takes effect in the deployed Appeon application, not in the PowerBuilder application.

AppeonGetSessionCount function

This function is obsolete since Appeon for PowerBuilder 2013. Replace it with the getSessionCount function in Appeon Server open interfaces.

appeonisin64browser function

Description

Detects if the IE browser where the application runs is 64-bit.

Syntax

appeonisin64browser ( )

Return value

Boolean.

Returns "true" if the application runs on a 64-bit IE browser.

Returns "false" if the application runs on a 32-bit IE browser.

Usage

This function takes effect in the deployed Appeon application, not in the PowerBuilder application.

AppeonLDAPLogon function

Description

Logs in to the LDAP server with the specified user name and password.

Syntax

AppeonLDAPLogon ( string as_username, string as_password )

Argument

Description

as_username

User name for logging into the LDAP server.

as_password

Password for logging into the LDAP server.

Return value

String.

Usage

This function takes effect in the deployed Appeon application, not in the PowerBuilder application. To make this function work in the deployed application, you should set the System Security to ON in AEM, and make sure the LDAP server is correctly set up. For detailed instructions, refer to the section called “System Security” in Appeon Server Configuration Guide for .NET or Appeon Server Configuration Guide for J2EE.

AppeonPopMenu function

Description

Pops up Appeon DataWindow menu at a specified position in a specified DataWindow control.

Appeon DataWindow Menu is available in Appeon Web only. For more information about the menu items, refer to the section called “Appeon DataWindow menu” in Appeon Developer User Guide.

Supported on the Web client only.

Syntax

AppeonPopMenu ( datawindow adw_dw , Integer nx , Integer ny )

Argument

Description

adw_dw

The DataWindow control on which you want to pop up the Appeon DataWindow menu.

nx

The instance from the left edge of the popup menu.

ny

The instance from the top edge of the popup menu.

Return value

None.

Usage

  1. The user customized RMB menu has a higher priority than the Appeon customized menu.

  2. The AppeonPopMenu function has a higher priority than the AppeonPopMenuOn function.

  3. Defining your RMB menu in RButtonDown event is not recommended because this will cause confusion in the system. To work around this, define your RMB menu in the RButtonUp event.

AppeonPopMenuOn function

Description

Pops up Appeon DataWindow menu in a specified window when you right click the mouse button.

Appeon DataWindow Menu is available in Appeon Web only. For more information about the menu items, refer to the section called “Appeon DataWindow menu” in Appeon Developer User Guide.

Supported on the Web client only.

Syntax

AppeonPopMenuOn ( datawindow adw_dw, Boolean ab_show )

Argument

Description

adw_dw

The DataWindow control on which you want to show the Appeon DataWindow menu.

ab_show

Gives an option whether to display or not display the Appeon DataWindow menu.

True - Enables the display of the Appeon DataWindow menu.

False - Disables the display of the Appeon DataWindow menu.

Return value

None.

Usage

  1. The user customized RMB menu has a higher priority than the Appeon customized menu.

  2. The AppeonPopMenu function has a higher priority than the AppeonPopMenuOn function.

  3. Defining your RMB menu in RButtonDown event is not recommended because this will cause the confusion of the system. To work around this, define your RMB menu in the RButtonUp event.

AppeonPrint2File function

Description

Saves the specified DataWindow as image files of BMP, JPG or GIF format.

Supported on the Web client only.

Syntax

AppeonPrint2File ( datawindow adw, string asoutpath, string asoutname, long alouttype )

Argument

Description

adw

The DataWindow object to be saved as image files

asoutpath

The path of image files

asoutname

The specified name of image files

alouttype

The format type of files: 1-BMP; 2-JPG; 3-GIF

Return value

Integer.

Returns 1 if it succeeds in saving the specified DataWindow as image files.

Returns -1 if an unknown error occurs.

Returns -2 if alouttype is an unsupported image format.

Returns -3 if adw is an invalid DataWindow object, DataStore object or DataWindowChild object.

Returns -4 if it fails in creating a file, e.g., the specified path does not exist or without access rights.

Returns -5 if it fails in creating device context, e.g., user sets a large size when customizing page property.

Returns -6~-12 if an internal error occurs.

Usage

  1. This function is used to execute saving DataWindow as image files.

  2. If the page size is large enough, a DataWindow is saved as one file; if the size of a DataWindow surpasses the page size, the DataWindow is saved as several files.

  3. The asoutname is the file name specified by user, for example, the function is appeonprint2file(adw, "c:\", "appeon", 1), if a DataWindow is saved as one file, the file is like C:\appeon.bmp; if a DataWindow is saved as several files, the files are like C:\appeon1.bmp, C:\appeon2.bmp, ..., C:\appeonN.bmp. Another example, the function is appeonprint2file(adw, "c:\", "test.bmp", 1), if a DataWindow is saved as one file, the file is like C:\ test.bmp.bmp; if a DataWindow is saved as several files, the files are like C:\test.bmp1.bmp, C:\test.bmp2.bmp, ..., C:\test.bmpN.bmp.

  4. The upper limit of page size is restrained by the type of operating system. For instance, in Windows Vista, the upper limit of customized page size is 5500*5500 around. However, the page size can also be 1024*10000 by reducing page width and increasing page height.

AppeonPrint2PDF function (Obsolete)

Obsolete function

AppeonPrint2PDF is an obsolete function and will be discontinued in a future release. Please replace it with the SaveAs function of the DataWindow or Child DataWindow and set the saveas file type to PDF format. For details, refer to the section called “Functions of DataWindow control” in Supported PB Features for Appeon Web (Web only) or Supported PB Features for Appeon Mobile.

Supported on the Web client only.

AppeonSetHintText function

Description

Sets the HintText property of the SingleLineEdit control. The HintText property is not available in PowerBuilder SingleLineEdit control. It is specially designed for the Appeon Mobile application.

Syntax

appeonsethinttext ( singlelineedit sle_target, string as_hinttext )

Argument

Description

sle_target

The SingleLineEdit control.

as_hinttext

The text that will be displayed as hint text in the SingleLineEdit control.

Return value

Integer.

1 - Success.

-1 - It is called in PowerBuilder or Appeon Web, or there is an error.

-2 - The sle_target argument is invalid.

-3 - The as_hinttext argument is null.

AppeonSwitchRealTimeCalc function

Description

Performs the DataWindow real-time expression calculation in time or performs the calculation for only 1 time in the whole life-cycle.

Syntax

AppeonSwitchRealTimeCalc ( powerobject adw, integer para )

Argument

Description

adw

The DataWindow/DataStore/DataWindowChild object.

para

0 - Default value, performs the real-time calculation;

1 - No need to perform the real-time calculation, and performs the calculation for only one time in the whole life-cycle.

Return value

Integer.

0 - Success.

-1 - Failure.