To create a toolbar button to invoke the Web component, add a <tool> element. The example below creates a 'Show Excel View' button to display search results in a spreadsheet:
<results>
...
<tool
name="excel"
tooltip="Show Excel View"
icon="excel.gif"
function="ShowExcel" />
<script>
<![CDATA[
<script type="text/javascript"
src="scripts/show-excel.js">
</script>
]]>
</script>
<results>
This calls the function SE_ShowExcel() provided in the show-excel.js library.
The SE_ShowExcel() function loads data into the component, displays the component and hides the results table. That is, it loads search results into a spreadsheet and displays the spreadsheet, and hides the standard table of search results.
|
Copyright © 2014 CA.
All rights reserved.
|
|