我想开发一个与Tibco Spotfire集成的系统,并且能够检索Spotfire渲染的可视化并将它们暴露给WYSIWYG操作。这可能吗? 如果是这样,请提供指导。我想使用C#和ASP.NET
答案 0 :(得分:3)
首先加载javascriptapi以处理客户端交互
<script type="text/javascript" src="http://domainname/SpotfireWeb/GetJavaScriptApi.ashx?Version=3.1" > </script>
添加用于将spotfire模板添加到网页的代码 使用以下代码在项目中创建一个javascript文件:
function addPlayer()
{
var fileInfo = new FileInformation(SpotfireVisualizationPath,SpotfireVisualizationName,SpotfireParameter, '');
var customization = new spotfire.webPlayer.Customization();
customization.showCustomizableHeader = false;
customization.showToolBar = false;
customization.showClose = false;
customization.showTopHeader = false;
if (app != null)
{
app.close();
}
app = new spotfire.webPlayer.Application(SpotfireWebPlayerURL, customization);
app.open(fileInfo.path, 'SpotfireContainer', fileInfo.parameters);
}
答案 1 :(得分:2)
Spotfire Web Player(我假设您参考)并非以这种方式构建 - 在其当前实现中,它更像是桌面Spotfire应用程序的远程桌面会话(如果您使用html替换远程桌面技术和的JavaScript)。
它的构建并不是为了能够抓取UI的各个部分以便在其他环境中重用。您可以做的最接近的是在iframe中托管整个Web播放器UI,并使用javascript API进行客户端交互。通过创建单个可视化页面并删除所有chrome(工具栏等),您可以获得看似页面上的单个可视化的内容,但它实际上只是一个黑客。