Illustration of How InetSoft Can Integrate with Any User Interface
JSP Tag Library Problem: My product or web application requires a single, unified user interface but most dashboard tools do not integrate seamlessly, and require a lot of additional work to provide even partial integration.
The Style Intelligence Solution: Style Intelligence provides a complete JSP tag library that can be used to integrate dashboards into any Web portal/interface that is using JSP technology. The source code for this JSP, showing both static HTML and dynamic dashboard content, follows:
<%@taglib uri="sree.tld" prefix="sree"%>
<sree:cache jspId="InventoryStatusCache"/>
<sree:create reportId="TotalInventory" name="Oasis/Total Inventory"
processPage="true" resourceUri="/oasis/resources">
</sree:create>
<sree:create reportId="ReturnSurvey" name="Oasis/Return Survey"
processPage="true" resourceUri="/oasis/resources">
</sree:create>
<html><head><title>Oasis Computing Inc. - Inventory Status</title>
<sree:header reportId="TotalInventory"/>
<sree:header reportId="ReturnSurvey"/>
</head>
<body> <table width="800" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="261" valign="top"> <div align="center">
<fieldset>
<legend class="textReportTitle">Total Inventory</legend>
<sree:body reportId="TotalInventory">
<p align="center">Please wait while the dashboard loads...</p> </sree:body> </fieldset>
</div>
</td>
<td width="43" rowspan="5"> </td>
<td width="300" rowspan="5" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="top">
<div align="left">
<fieldset>
<legend class="textReportTitle">Return Survey</legend>
<sree:body reportId="ReturnSurvey">
<p align="left">Please wait while the dashboard loads...</p>
</sree:body>
</fieldset>
</div>
</td>
</tr>
<tr>
<td height="15"> </td>
</tr>
<tr>
<td height="14" align="center" valign="top"> <div align="center"> <a href="/sreeportal/Examples?op=Replet&name=Oasis/Inventory%20and%20Sales%2 0Analysis&target=PARENT">
-Click to open the "Inventory and Sales Analysis" report -</a> </div> </td> </tr>
</table>
</td>
<td width="196" rowspan="5" valign="top"></td>
</tr> <tr>
<td height="13" valign="top"></td> </tr> <tr>
<td class="boxBlueText">
<div align="justify"> Oasis has begun an internal project aimed at reducing customer returns and overhead costs. These charts give information on inventory levels and return statistics that can be used to monitor this project's effectivness.
</div>
</td>
</tr>
<tr>
<td height="15" valign="top"> </td>
</tr>
<tr>
<td height="181" valign="top"> <img src="../images/scanner.jpg" width="175" height="150"> </td>
</tr>
</table>
</body></html>
The portions of the above, sample JSP that contain dashboard elements and static HTML content. The following steps are required to integrate any report into a JSP:
- Include a “cache” tag - This tag caches the page content of the report so that requests sent to the JSP that do not affect the report will not load the page from the report server again.
- Include a “create” tag for each dashboard element – This tag specifies the dashboard that will be embedded in the JSP. It also handles the generation of the dashboard and serves all the resources required by the dashboard.
- Include a “header” tag – This will tell the dashboard engine which dashboard it should load into cache.
- Include a “body” tag – This is the tag that will generate the chart and place it into the dashboard. Notice how HTML content can be included between the open and close tags. This is the content that will be displayed while the chart is loading.
Using this powerful JSP tag library, it is possible to integrate any chart or dashboard, in any location, into any Web application.