In Liferay, you can call the Request widget by creating the portlet and specifying the source code. Review the following steps for producing the earlier Request widget example. Follow them as a model to configure the display and behavior of the Request widget in your implementation.
Follow these steps:
The New Web Content window appears.
The new portlet gets added to Liferay.
The portlet Settings appears.
The Source container opens for editing.
Source and Key Parameters
The source for the Request widget example follows:
<script type="text/javascript" src="http://hostname:portnumber/usm/gwt/fdRenderer/fdRenderer.nocache.js"></script>
<script type="text/javascript" src="http://hostname:portnumber/usm/explorer/scripts/request.widget.js"></script>
<script> CA_Catalog.buildWidget({type: 'request', renderTo: 'targetDiv', rootId: -1, linkColor: 'inherit', borderColor: 'darkGreen'}); </script>
<div align="left" id="targetDiv" style="margin-bottom: 10px;"> </div>
The first line references the form renderer required for the Request widget.
The second line references the JavaScript file for the Request widget.
The third line specifies the JavaScript with configuration parameters for the Request widget.
Note: Separate parameters with a comma, but do not specify a comma after the last parameter.
The fourth line specifies the DOM element in which the Request widget is rendered.
Key parameters and explanations follow for the CA_Catalog.buildWidget function call in the Request widget example.
We recommend single-sign-on for widgets. However, if you require login credentials for this widget, specify them in this function call. Use the following format:
username: 'username', password: 'password'
Specifies that the widget is a Request widget.
Specifies that the widget is rendered into the DOM element whose ID is targetDiv.
Specifies that when the Request widget opens initially, it displays nothing.
When the user clicks a service in the Browse widget, the Request widget displays that service.
| Copyright © 2013 CA. All rights reserved. |
|