Configuring Siebel Open UI > Configuring Siebel Open UI to Interact with Other Applications > Displaying Data from Siebel Open UI in External Applications >
Displaying Siebel Portlets In External Applications
This topic describes how to display a Siebel portlet in an external application. It includes the following information:
You can configure Siebel Open UI to display a Siebel portlet. A Siebel portlet is a Siebel application that Siebel Open UI embeds in a thirty-party website. Oracle WebCenter and iGoogle are examples of third-party websites. Siebel Open UI uses an HTML iFrame to display a Siebel portlet in a Siebel portlet window. You can configure Siebel Open UI to make more than one call to Siebel portlets only when it calls the GotoView method or the GetApplet method. For more information about the different methods that you can use in a Siebel portlet, see Siebel Portal Framework Guide. To display Siebel portlets in external applications
- Set the server parameters:
- Log in to the Siebel client with administrative privileges.
- Navigate to the Administration - Server Configuration screen, and then the Servers view.
- In the Siebel Servers list, choose a Siebel Server.
- Click Parameters.
- In the Parameters list, add the following parameters.
|
|
PortletAPIKey |
Enter any value. For more information about the values that you can use when configuring authentication, see Siebel Security Guide. |
PortletOriginList |
Specify the list of domains that can send a communication request to the Siebel portlet. To specify more than one domain, you can use a comma to separate each domain. If the Siebel portlet receives a communication request from a domain that PortletOriginList does not specify, then Siebel Open UI creates an error in the Siebel portlet. |
PortletMaxAllowedAttempts |
Specify the number of unsuccessful times that the portlet can call a method before Siebel Open UI blocks any subsequent calls. An unsuccessful call can occur in the following situations:
- A domain attempts to send a communication request to the portlet, but the PortletOriginList does not specify this domain.
- The portlet_key is not valid.
Siebel Open UI resets the unsuccessful attempts to zero after the time interval that the PortletBlockedInterval server parameter expires. Siebel Open UI comes predefined with the PortletMaxAllowedAttempts server parameter set to 3. |
PortletBlockedInterval |
Specify how long the portal remains blocked. Siebel Open UI comes predefined with the PortletBlockedInterval server parameter set to 900. |
- Add the following object to your custom code. The SWEView, SWEApplet, and Key arguments are required. All other arguments are optional:
var msg = new Object(); msg.SWEView = view_name; msg.SWEApplet = applet_name; msg.SWECmd =Gotoview or GetApplet msg.Key = portlet_key;
where:
var msg = new Object(); msg.SWEView = Opportunity List View; msg.SWEApplet = Opportunity List Applet; msg.Key = oracle123;
- Add the following code immediately after the code that you added in Step 2.
document.getElementById('siebelframeid').contentWindow.postMessage(msg, '*');
This code calls the method that the Siebel portlet uses.
- Add the iFrame that calls the Siebel portlet.
You add this iFrame to a web page that resides in the third-party application. For example, the following code uses an iFrame to embed the Quote List Applet of Siebel Call Center in an external website:
<html> <head> <script> </script> </head> <body> <b><text> <h2>Portlet public API demo</h2></text><b> <IFRAME id="i19" name= "i19" src= "http://server_name.example.com/callcenter_enu/start.swe?SWECmd=ExecuteLogin&SWEUserName=user_name&SWEPassword=my_password&SWEAC=SWECmd=GetApplet&SWEApplet=Quote+List+Applet&IsPortlet=1&SWESM=Edit+List" style="height: 50%;width: 100%;&KeepAlive=1&PtId=my_theme"> </IFRAME> <table style="width:100%;height: 50%"> <tr style="width:100%;height: 100%"> <td style="width:50%;height: 100%"> <IFRAME id="d121" name= "i19111" src= "http://server_name.example.com/callcenter_enu/APIScript.html" style="height: 100%;width: 100%;"> </IFRAME> </td> </tr> </table> </body> </html>
Siebel Open UI can now create a Siebel session for this instance of the Siebel application in the browser. The browser can send more than one request to the same Siebel session without refreshing the page. For more information about this iFrame, see Specifying URLs to Siebel Portlets.
Specifying GotoView or GetApplet
As an option, you can specify GotoView or GetApplet. To specify GotoView
- You must specify msg.SWEView.
- You can specify msg.SWEApplet as an option. If you include msg.SWEApplet, then Siebel Open UI displays only the applet that you specify.
For example, the following code displays only the Opportunity List Applet: var msg = new Object(); msg.SWEView = Opportunity List View; msg.SWEApplet = Opportunity List Applet; msg.SWECmd=GotoView msg.Key = oracle123;
For example, the following code displays the entire Opportunity List View: var msg = new Object(); msg.SWEView = Opportunity List View; msg.SWECmd=GotoView msg.Key = oracle123;
To specify Getapplet
- You must specify msg.SWEApplet.
- You must configure the applet that msg.SWEApplet specifies as a standalone applet. For more information, see Preparing Standalone Applets.
- msg.SWEView is not required. Do not specify it.
For example, the following code displays only the Opportunity List Applet: var msg = new Object(); msg.SWEApplet = Opportunity List Applet; msg.SWECmd=GetApplet msg.Key = oracle123;
Specifying URLs to Siebel Portlets
You can use the following code to specify the Siebel URL that the external application uses to access the Siebel Server: <HTML> <BODY> <IFRAME src = "http://server_address/application/start.swe?SWECmd=SWECmd=Start&isPortlet=1&other_arguments"> </IFRAME> </BODY> </HTML>
where:
- server_address specifies the address of the Siebel Server.
- application specifies the Siebel application.
SWECmd is a required argument that specifies how to display the Siebel application when the user accesses this URL.
isPortlet is a required argument that informs the Siebel Server that this application runs in a portlet. The server requires this argument so that it can do the processing it requires to support a portlet.
- other_arguments specify how to display the Siebel application. For example, the login requirements to display, the applets to display, how to size applets, and so on.
For example, consider the following iFRAME src: http://server_name.example.com/callcenter_enu/start.swe?SWECmd=ExecuteLogin&SWEUserName=user_name&SWEPassword=my_password&SWEAC=SWECmd=GetApplet&SWEApplet=Quote+List+Applet&IsPortlet=1&SWESM=Edit+List"style="height: 50%;width: 100%;&KeepAlive=1&PtId=my_theme"
Table 16 describes the parts of this iFRAME src that specifies the Siebel URL.
Table 16. Specifying URLs to Siebel Portlets
|
|
http://server_name.example.com |
Access the Siebel Server that resides at server_name.example.com. |
/callcenter_enu |
Run the CallCenter application. |
/start.swe? |
Start the Siebel Web Engine. |
SWECmd= |
Provide commands to the Siebel Web Engine. |
ExecuteLogin&SWEUserName=user_name&SWEPassword=my_password |
Provide the user name and password authentication arguments. |
&SWEAC=SWECmd=GetApplet&SWEApplet=Quote+List+Applet |
SWEAC specifies more than one command. This example specifies to display the Quote List Applet. |
&IsPortlet=1 |
Run the CallCenter application as a portlet. |
&SWESM=Edit+List"style="height: 50%;width: 100%; |
Use the Edit List style, and set this style to 50% of the predefined height and 100% of the predefined width. |
&KeepAlive=1 |
Keep sessions active even if the session is not in use. Siebel CRM comes predefined to expire a Siebel session that is not in use for a period of time according to the value that the SessionTimeout server parameter specifies. If this session times out, and if you do not specify KeepAlive=1, then Siebel Open UI displays a login dialog box in the client. This behavior might not be desirable in a Siebel portlet. It is recommended that you set this argument to keep the session active. |
&PtId=my_theme" |
Use cascading style sheets instead of iFrame attributes. For more information, see Using Cascading Style Sheets Instead of iFrame Attributes. You must define a theme in the theme.js file and then use the PtId argument to reference it. In this example, my_theme is the name of the theme that the theme.js file contains. |
Using Cascading Style Sheets Instead of iFrame Attributes
This iFrame tag supports a number of attributes that you can use to control how Siebel Open UI displays the portlet content. For more information about these attributes, see the page that describes HTML element usage in an iframe at the following W3C website: http://www.w3.org/wiki/HTML/Elements/iframe
Recent HTML versions might replace these attributes. So, it is strongly recommended that you use cascading style sheets instead of these attributes. Siebel Open UI comes predefined to use cascading style sheet classes for this iFrame. For more information, see Using Cascading Style Sheet Classes to Modify HTML Elements.
|