Go to primary content
Siebel CRM Configuring Siebel Open UI
Siebel Innovation Pack 2016, Rev. A
E52417-01
  Go to Documentation Home
Home
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
 
Next
Next
    View PDF

Methods for Pop-Up Objects, Google Maps, and Property Sets

This topic describes the methods that Siebel Open UI uses with pop-up objects, Google maps, and property sets. It includes the following information:

Pop-Up Presentation Models and Physical Renderers

The PopupPModel presentation model specifies how to model pop-up objects. It uses the following syntax:

SiebelApp.PopupPModel

The PopupRenderer physical renderer specifies how to render pop-up objects. It uses the following syntax:

SiebelAppFacade.PopupRenderer

If the status of a reply from the Siebel Server is NewPopup, then Siebel Open UI starts processing this new pop-up object in the client. Siebel Open UI supports modal and nonmodal pop-up objects.

The Popup method specifies how to render pop-up objects. Siebel Open UI typically renders a pop-up object as a dialog box.

Modal Pop-Up Objects

A modal pop-up object is a type of pop-up object where the metadata for this object contains all of the following qualities:

  • The URL property specifies a Siebel URL.

  • The SWE_FULL_POPUP_WINDOW_STR property is false.

  • The SWE_FREE_POPUP_STR property is false.

Siebel Open UI can create a modal pop-up in one of the following ways:

  • On the Siebel Server. URL driven. A multivalue group or pick applet are each an example of a modal pop-up object that Siebel Open UI creates on the Siebel Server. Siebel Open UI sets the value of the URL property to the following HTML attribute of the popup div element:

    src
    

    Siebel Open UI does the following work to create a modal pop-up on the server:

    1. Calls the loadcontent method to get, and then load the layout from Siebel Server.

    2. Initializes and renders the pop-up applet.

  • On the client. Content driven. The Currency pop-up object is an example of a modal pop-up object that Siebel Open UI creates on the client. Siebel Open UI does the following work to create a modal pop-up on client:

    1. Gets the layout and data for the pop-up object.

    2. Loads the pop-up object into the pop-up dialog box when the user opens this dialog box.

Nonmodal Pop-Up Object

A nonmodal pop-up object is a type of pop-up object where the metadata for this object contains any of the following qualities:

  • The URL property does not specify a Siebel URL.

  • The SWE_FULL_POPUP_WINDOW_STR property is true.

  • The SWE_FREE_POPUP_STR property is true.

Siebel Open UI uses a nonmodal pop-up object to open an external URL that it stores as data in a Siebel applet.

Properties of the Pop-Up Presentation Model

Table A-10 describes the properties of the PopupPM presentation model. The state, url, and content properties render and maintain the state of the pop-up object. It is recommended that you not set the content and the url properties for the same pop-up object.

Table A-10 Properties of the Pop-Up Presentation Model

Property Description

canProcessLayout

Not applicable.

closeByXDisabled

Controls the X control of the pop-up object. You can set this property to one of the following values:

  • true. Siebel Open UI disables the X control.

  • false. Siebel Open UI enables the X control.

content

Contains the HTML source code for the pop-up object. Setting this property configures Siebel Open UI to load the HTML source code into the target, and then to call the Initialize method on the pop-up proxy to update the data.

currPopups

Maintains an array of currency pop-ups.

height

Specifies the height of the pop-up object, in pixels.

isCancelQryPopupOpen

Includes one of the following return values:

  • true. A cancel query object is open.

  • false. No cancel query objects are open.

isCurrencyOpen

Includes one of the following return values:

  • true. A currency pop-up object is open.

  • false. No currency pop-up objects are open.

isPopupClosedByX

Includes one of the following return values:

  • true. The user used the X control to close the pop-up object.

  • false. The user did not use the X control to close the pop-up object.

isPrevPopupVisible

  • Sets the visibility of the parent pop-up object when Siebel Open UI displays a child pop-up object inside the parent. You can set this property to one of the following values:

  • true. Siebel Open UI displays the parent.

  • false. Siebel Open UI hides the parent.

noHide

Determines whether or not Siebel Open UI can hide the pop-up object. You can set this property to one of the following values:

  • true. Siebel Open UI can hide the object.

  • false. Siebel Open UI cannot hide the object.

source

Contains the source that Siebel Open UI uses to open the pop-up object. You can set this property to a URL. Siebel Open UI uses this source property to set the url and content properties of this pop-up object.

state

Opens or closes the pop-up object. You can set this property to one of the following values

  • open. Siebel Open UI opens an empty dialog box.

  • close. Siebel Open UI closes an open dialog box.

url

Specifies the URL that Siebel Open UI uses to open the pop-up object according to the following mode that the pop-up object uses:

  • Modal. Specifies the source URL that contains the content that Siebel Open UI displays in the pop-up object.

  • Nonmodal. Specifies the URL that Siebel Open UI uses to load content into the target HTML element of the pop-up object.

Setting this property configures Siebel Open UI to get the layout for this pop-up from the Siebel Server, render this layout, and then to call the Initialize method on the pop-up proxy to load the data.

width

Specifies the width of the pop-up object, in pixels.


Methods of the Popup Presentation Model

Table A-11 describes the methods of the PopupPM presentation model. The parentheses that this table includes after each method name lists the arguments that each method supports. An empty set of parentheses indicates that the method supports no arguments.

Table A-11 Methods of the Pop-Up Presentation Model

Method Name Description

ClearPopup()

Sets the pop-up visibility to false and resets various properties and method values after Siebel Open UI closes the pop-up object.

OnLoadPopupContent()

Loads the HTML for the pop-up object, initializes pop-up applets, and then calls the show method on the pop-up proxy.

OpenPopup(source, height, width, full, free, bContent)

Opens the pop-up object according to the arguments that the ProcessNewPopup method determines. It uses these arguments to set the properties of the pop-up object. Some of these arguments call other methods in the PopupPR physical renderer that load the content in the pop-up object.

ProcessClearPopup(propSet)

Calls the ClearPopup method.

ProcessNewPopup(propset)

Processes the property set that Siebel Open UI sends to this method as an argument, and then determines the following items:

  • The mode that the pop-up object uses

  • Various pop-up window features

  • The width and height of the pop-up object, in pixels.

Siebel Open UI calls the OpenPopup method to open a modal pop-up object. It does not call OpenPopup to open a nonmodal pop-up object. Instead, it creates a nonmodal pop-up object from this ProcessNewPopup method.

SetPopupVisible(bVisible)

Modifies the state property of the pop-up object depending on whether the bVisible argument is true or false.


Methods of the Popup Physical Renderer

Table A-12 describes the methods of the PopupRenderer physical renderer.

Table A-12 Methods of the Pop-Up Physical Renderer

Method Name Description

BindEvents

Binds all events for the pop-up object. For more information, see "Siebel CRM Events That You Can Use to Customize Siebel Open UI".

EnhanceDialog

Resizes the pop-up object according to the width property of the pop-up object and according to the default width that the client specifies.

Siebel Open UI calls the EnhanceDialog method when it calls the OnLoadPopupContent method from the PopupPM presentation model.

LoadContent

If Siebel Open UI modifies the content property of the PopupPM presentation model, then this LoadContent method loads the HTML source code that contains the content that the pop-up object displays.

LoadURL

If Siebel Open UI modifies the url property of the PopupPM presentation model, then this LoadURL method sets the div element of the src attribute of the pop-up object to the value that the url property specifies.

SetTitle

Sets the title for the pop-up object. Siebel Open UI calls the SetTitle method when it calls the OnLoadPopupContent method from the PopupPM presentation model.

SetVisibility

Displays or hides the pop-up object according to state property of the PopupPM presentation model. If the state property is:

  • open. The SetVisibility method displays the pop-up object.

  • close. The SetVisibility method hides the pop-up object.

ShowUI

Displays an empty pop-up object.


Method That Integrates Google Maps

This topic describes the method that Siebel Open UI uses to integrate with Google Maps. It includes the following topics:

The Integration with Maps and Location service

allows the user to view CRM data on a map and get driving directions and other information. If the user taps the postal code of the contact or account address, then Siebel Open UI displays a Google map that includes the address and step-by-step information that describes how to navigate from the current location to the location that the postal code identifies.

This service can get a list of accounts, contacts, or opportunity addresses from the record set that the list applet contains, and then display these addresses in a map. The list view displays distance information from the current location. The map view includes pins on the map that indicate the current location and location of all objects that fall within a radius from the geographic location where the user is currently situated. If the user clicks a pin, then Siebel Open UI does something depending on the following type of information that the pin represents:

  • Opportunity or account. Navigates the user to details of the record.

  • Contact. Allows the user to make a telephone call, send an email, or view contact details.

Siebel Open UI uses the google-ui-map plug-in. It includes the following methods in the JQMMapCtrl class:

  • GetInlineRoute

  • ShowMapLocations

  • Integration with Maps and Location

GetInlineRoute Method

The GetInlineRoute method does the following work:

  • Dynamically loads the Google map method.

  • Gets the current location of the device or browser.

  • Draws the route. It uses the current location as the starting point and the account location as the destination.

It includes the DestValue argument. This argument identifies the postal code or address of an account, contact, or opportunity.

Siebel Open UI calls the predefined GetInlineRoute method from a form applet, but you can customize it to use a list applet. The Integration with Maps and Location service creates a link that includes an image and a bind click event that references the control link that calls the GetInlineRoute method. It gets the postal code value from the record that the user chooses in the form applet, and then sends the value when it calls the GetInlineRoute method in the JQMMapCtrl class. Siebel Open UI must load the Google method before it calls the GetInlineRoute method. It includes the URL for the Google method when it loads the JQMMapCtrl class.

Flow That the GetInlineRoute Method Uses

The GetInlineRoute method uses the following flow:

  1. Makes sure the Web template file includes a map div element.

  2. Calls the LoadAPI method.

  3. Dynamically loads the Google map method. The Google map method is not downloadable so it dynamically loads the map method when it initializes the JQMMapCtrl class.

  4. Calls the LoadMap method.

  5. Removes all markers, overlays, and services from the map div element.

  6. Creates a Google map in the div element. It uses the div element that it created in the web template. It uses the google-ui-map plug-in to create this element in 4.

  7. It sends the name of the jqmMapCtrl div element to the plug-in to draw the map.

  8. Uses the getCurrentPosition method to get the current geocode of the client device. This method is available through the navigator.geolocation object. A geocode is an object

    that stores the geographic coordinates of a location expressed as latitude and longitude.

  9. Displays the GPS geocode of the current position. It does this only if the browser supports GPS (Global Positioning System). If the browser does not support GPS, or if GPS is not available, then Siebel Open UI sets the current location to Oracle headquarters at 500 Oracle Parkway, Redwood Shores, CA 94065. The following browsers support GPS:

    • Internet Explorer version 9.0

    • Firefox version 3.5

    • Chrome version 5.0

    • Safari version 5.0

    • Opera version 10.60

  10. Calls the GetAcctDirections method. It uses the following arguments of the GetAcctDirections method during this call:

    • mapCanvas. Identifies the div element where Siebel Open UI draws the map.

    • currentLocation. Identifies the device GPS location. If the browser does not support GPS or if GPS is not available, then it uses the Oracle headquarters address.

    • acctDestination. Identifies the postal code or address from the account, contact or opportunity record.

  11. Draws the route from the currentLocation to acctDestination. For example:

Surrounding text describes maproute.png.

ShowMapLocations Method

The ShowMapLocations method loads the Google map method, initializes the geocoder service to get the geocode of the address, and creates a marker for each location that the array contains.

It uses the AcctArray method. This method gets the address or postal code of all account, contact, or opportunity addresses from the record set that the list applet displays.

Siebel Open UI can call the ShowMapLocations method from a list applet. You can create a button or link control, and then bind a click event with the control so that this event calls the method. The ShowMapLocations method uses jqmListRenderert to do the following work:

  • Loop through the record set that the list applet contains

  • Determine the columns that are available

  • Add the nonnull value of each address field in the record to create the full address.

  • Add the address to the array.

You can bind the ShowMap button control in the web template with the click event in jqmListRenderer, and then configure Siebel Open UI to use the account array to call the ShowMapLocations method in the JQMMapCtrl class.

Flow That the ShowMapLocations Method Uses

The ShowMapLocations method uses the following flow:

  1. Calls the LoadAPI method that loads the Google map method. The Google map method is not downloadable, so Siebel Open UI loads it when it initializes the JQMMapCtrl class and provides the LoadMap.

  2. Calls the LoadAcctsMap method, which does the following work:

    1. Gets the current geocode of the client device.

    2. Gets the address of the location so that it can display this address in the Info Window.

    3. Creates the Google map in the div element. It uses the div element that it created in the web template. It used the google-ui-map plug-in to create this element.

    4. Starts an instance of the Geocoder service.

    5. Does the following work for each address that the AcctArray method includes:

      • Gets the geocode of the address.

      • Sets the marker Position according to the geocode.

      • Calls the addMarker method to map all markers that the map div element contains.

Calling Methods That the Integration with Maps and Location Method Uses

You can call methods that the Integration with Maps and Location method uses from a form applet or list applet in the following way:

  1. Initialize the JQMMapCtrl class.

  2. Configure Siebel Open UI so that it sends a single account address or postal code and then binds it to an event that calls the GetInlineRoute method.

    Siebel Open UI comes predefined to bind the anchor control for the postal code field to a click event. Siebel Open UI displays the postal code field as an icon next to the control. It uses this configuration only for form applets.

    To configure a list applet, you must also do the following work:

    1. Prepare the account array that stores the addresses or postal codes and bind it to an event that Siebel Open UI can call from a ShowMapLocations method. Siebel Open UI comes predefined to concatenate the values of Street Address, City and State fields, and then set the nonnull values that the array contains. It does this so that it can send the array to the method.

    2. Create a link or button that calls the method.

Siebel Open UI uses the Google-ui-map plug-in to render the Google map. This plug-in requires a div id to display the map. This div element can reside in any container. The CCViewDetailMap_Mobile.swt file supports list and map rendering. It contains the following code. It uses the jqmMapCtrl div id to render the Google map:

<swe:if condition="Web Engine State Properties, IsMobileApplicationMode">
<div id="SiebelMapContainer" name="SiebelMapContainer"
style="display:none;">
<div id="jqmMapCtrl" name="jqmMapCtrl"></div>
</div>
</swe:if>

Methods That Manipulate Property Sets

This topic describes the methods you can use that manipulate property sets. It includes the following information:

Structure of the Property Set

Table A-13 describes the structure of the property set that Siebel Open UI uses in the client.

Table A-13 Structure of the Property Set

Property Description

childArray

Array of all child property sets that the parent property set contains.

childEnum

Counter that contains the number of children enumerated in the property set.

propArray

Object that contains the values for all properties that the property set contains.

propArrayLen

Length of the propArray property.

type

Type of the property set.

value

Value of the property set.


AddChild Method

The AddChild method creates a new child property in the property set. It returns one of the following values:

  • true. Siebel Open UI created a child property.

  • false. Siebel Open UI did not create a child property.

It uses the following format:

AddChild (child)

For example:

outputPS.AddChild (inputPS);

where:

  • inputPS is an argument that identifies the input property set that Siebel Open UI adds to the childArray of the called on property set object outputPS.

Clone Method

The Clone method creates a new property set and does a full copy of the following property set:

this

It returns a new property set object.

It uses the following format:

Clone()

For example:

outputPS = inputPS.Clone();

It includes no arguments.

Copy Method

The Copy method copies the following property set:

this

It returns one of the following values:

  • true. Siebel Open UI made a copy of the property set.

  • false. Siebel Open UI did not make a copy of the property set.

It adds every child and subchild in the childArray of the input property set to the childArray of the following property set:

this

It uses the following format:

Copy(old)

For example:

outputPS.Copy(inputPS);

It uses the following arguments:

  • inputPS. Identifies the input property set that Siebel Open UI copies.

DeepCopy Method

The DeepCopy method makes a full copy of the inputPS property set, and then parses this copy into the following property set:

this

It returns one of the following values:

  • true. Siebel Open UI made a full copy of the inputPS property set, and then parsed it.

  • false. Siebel Open UI did not make a full copy of the inputPS property set, and then parse it.

It uses the following format:

DeepCopy(inputPS)

For example:

outputPS.DeepCopy (inputPS)

It uses the following arguments:

  • inputPS. An input property set that contains the values that Siebel Open UI copies to the outputPS property set.

GetChild Method

The GetChild method returns a child of the property set that resides at an index location that you specify. It returns a property set object.

It uses the following format:

GetChild (index)

For example:

childPS = inputPS.GetChild (index);

It uses the following arguments:

  • index. Specifies the index of the child that Siebel Open UI gets from the inputPS property set.

GetChildByType Method

The GetChildByType method returns a child of the property set according to the type that you specify. It returns a property set object. It uses the following format:

GetChildByType (type)

For example:

childPS = inputPS.GetChildByType("vi")

It uses the following arguments:

  • type. Specifies the type of the property set that Siebel Open UI gets from the childArray of the inputPS property set.

InsertChildAt Method

The InsertChildAt method inserts a new property set in the child array at the location that the index specifies. It returns one of the following values:

  • true. Siebel Open UI inserted a new property set.

  • false. Siebel Open UI did not insert a new property set.

It uses the following format:

InsertChildAt (child, index)

For example:

outputPS.InsertChildAt(inputPS, 2);

It uses the following arguments:

  • inputPS. Specifies the input property set that Siebel Open UI adds in the childArray of the outputPS property set.

  • index. Specifies the index where Siebel Open UI adds the inputPS property set to childArray.

RemoveChild Method

The RemoveChild method removes a child from the child array of the property set at the location that the index specifies. It returns one of the following values:

  • true. Siebel Open UI removed a child from the child array.

  • false. Siebel Open UI did not remove a child from the child array.

It uses the following format:

RemoveChild (index)

where:

  • index specifies the index of the child property set that Siebel Open UI removes from the childArray of the outputPS property set.

For example:

outputPS.RemoveChild(2);

RemoveProperty Method

The RemoveProperty method removes a property from the propArray of the property set. It returns one of the following values:

  • true. Siebel Open UI removed a property from the propArray.

  • false. Siebel Open UI did not remove a property from the propArray.

It uses the following format:

RemoveProperty (name)

where:

  • name specifies the name of the property that Siebel Open UI removes from propArray.

For example:

outputPS.RemoveProperty("prop");

SetProperty Method

The SetProperty method sets a property of the property set. It returns one of the following values:

  • true. Siebel Open UI set a property of the property set.

  • false. Siebel Open UI did not set a property of the property set.

It uses the following format:

SetProperty (name, value)

For example:

inputPS.SetProperty("SelectedItem", val);

It uses the following arguments:

  • name. Specifies the new property name.

  • value. Specifies the new property value.