Runtime components : Service components : Smart channel services : Smart widget : Using the Top n service widget
  
Using the Top n service widget
The top n service help bank to find out the most popular service in a specific period. To integrate this widget into your project, refer to following steps:
1 In the “client/widget” path of file bttweb2collector.jar, copy file topService.jsp in folder topNServiceChart and file smartWidget.jsp in folder smartWidget to the web project. The file smartWidget.jsp is referenced by file topService.jsp.
2 Configure the file smartWidget.jsp:
<%
String dojoPath="../../../dojo-release-1.3.2";
%>
The dojoPath is the directory where Dojo locates.
3 Configure the file topService.jsp:
<%
String dwrPath="../../../dwr";
%>
The dwrPath is root path of the web project.
Configure the path of the file smartWidget.jsp.
<jsp:include page="../smartWidget/smartWidget.jsp"
flush="true"/>
You can also configure the number of top n value. The default value is 5.
<script
type="text/javascript">
var beginTime="";
var endTime="";
var type="all";
var topN=5;
</script>
4 Add following code into the dwr.xml file under the WEB-INF folder in the web project:
<xml ?xml version="1.0" encoding="UTF-8"?><DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD Direct Web Remoting 2.0//EN" "http://getahead.org/dwr/dwr20.dtd">
<dwr>
<allow>
......
<convert converter="bean" match="com.ibm.btt.channel.smart.web2.data.TopService">
<param name="include" value="serviceName,visitNum" />
</convert>
</allow>
</dwr>
The top n service widget works as following:
This graphic is described in the surrounding text.
To generate the chart, select the Start date and End date, and select the Type, then click the Query button. In this widget, there are three types: all, execute, and view. The execute value means the number of services viewed by customers. The view value means the number of services executed by customers. The all value means that the number is the calculation of the number of “execute” and “view”. At the top of the chart, the “Plot” has three types of chart: columns, pie, and stacked line. You can use this parameter to set the style of the chart:
This graphic is described in the surrounding text.
This graphic is described in the surrounding text.
You can also check or clear the Grid to include or not include the grid in the chart.
Go up to
Smart widget