MCFIMSingleButton Class Methods
In this section, the MCFIMSingleButton class methods are presented in alphabetical order.
Syntax
generateHTML(&RS, slide_dir, X_pos, Y_pos, width, height, seq_num)
Description
Use this method to generate the HTML code as a string that is needed to display the single presence IM button on a page.
Parameters
Field or Control |
Definition |
---|---|
&RS |
Specifies the Rowset object that contains the IM user IDs, protocols, domains, and other IM information in the format of the MCF_IMSCRNNAMES record. |
slide_dir |
Specifies the direction of the sliding window as a string. Valid values are: left, right, up, down. |
X_pos |
Specifies the X coordinate (in pixels) of the sliding window's upper left corner as an Integer. |
Y_pos |
Specifies the Y coordinate (in pixels) of the sliding window's upper left corner as an Integer. |
width |
Specifies the minimum width of the sliding window as an Integer (in pixels) |
height |
Specifies the minimum height of the sliding window as an Integer (in pixels) |
seq_num |
Specifies a unique sequence number for this single presence button as an Integer. If there is more than one single presence button per page, each needs to be identified with a unique sequence number. |
Returns
A string representing the HTML code for the single presence button.
Example
Use the page activate event to place the single presence button on a page:
import PT_MCF_IM:*;
Global PT_MCF_IM:MCFIMSingleButton &single;
Local Rowset &RS1;
&single = create PT_MCF_IM:MCFIMSingleButton();
/* Number of milliseconds that we want to show sliding window even after we */
/* remove cursor from single presence button. */
&single.hideDelay = 5325;
&RS1 = CreateRowset(Record.MCF_IMSCRNNAMES);
/* &RS1 have all screen names, right is direction of sliding window. 190 is */
/* X coordinate of top left corner of sliding window, 200 is Y coordinate of */
/* top left corner of sliding window, 350 is height of sliding window, 450 */
/* is width of sliding window, 1 is some unique no of sliding window on that */
/* page. If there are many single presence icons on page, then it would be */
/* useful for uniqness. */
RECORDNAME.MCF_IM_HTMLAREA.Value = &single.generateHTML(&RS1, "right", 190, 200, 350, 450, 1);
RECORDNAME.MCF_XMPPHEADER = &single.generateJavaScript();
Syntax
generateJavaScript()
Description
Use this method to generate JavaScript code that will be used to show single button presence. Call this method only after calling generateHTML.
Parameters
None.
Returns
A string representing the JavaScript code.
Syntax
insertXMPPServerUserData(PS_user_ID, protocol, XMPP_domain, IM_user_ID, IM_pwd)
Description
Use this method to insert a row of user data into the PS_MCF_USER_IM_CFG table.
Parameters
None.
Field or Control |
Definition |
---|---|
PS_user_ID |
Specifies the PeopleSoft user ID as a string. |
protocol |
Specifies the XMPP protocol as a string. The only valid value is: XMPP. |
XMPP_domain |
Specifies the XMPP domain name as a string. |
IM_user_ID |
Specifies the email user ID on the XMPP server as a string. For example, if the email ID is first.last@example.com, then the IM_user_ID parameter must be set to: first.last. |
IM_pwd |
Specifies the password for the email user ID as a string. |
Returns
A Boolean value: True if insert was successful, False otherwise.
Syntax
MCFIMSingleButton()
Description
Use this constructor to instantiate a MCFIMSingleButton object.
Parameters
None.
Returns
A MCFIMSingleButton object.
Syntax
updateXMPPServerUserData(PS_user_ID, protocol, XMPP_domain, IM_user_ID, IM_pwd)
Description
Use this method to update a row of user data in the PS_MCF_USER_IM_CFG table.
Parameters
None.
Field or Control |
Definition |
---|---|
PS_user_ID |
Specifies the PeopleSoft user ID as a string. |
protocol |
Specifies the XMPP protocol as a string. The only valid value is: XMPP. |
XMPP_domain |
Specifies the XMPP domain name as a string. |
IM_user_ID |
Specifies the email user ID on the XMPP server as a string. For example, if the email ID is first.last@example.com, then the IM_user_ID parameter must be set to: first.last. |
IM_pwd |
Specifies the password for the email user ID as a string. |
Returns
A Boolean value: True if update was successful, False otherwise.