在 JBoss 门户上部署 VisiFire

发布于 2024-09-27 13:22:22 字数 2583 浏览 1 评论 0原文

我正在尝试使用一些分析图表工具来改进我的 JBoss Portal 仪表板,然后我发现了 VisiFire。因此,我开始研究如何将一个简单的 VisiFire 页面作为 portlet 部署到 JBoss Portal 仪表板上。以下是我所做的: - 我创建了一个虚拟 portlet(在索引页面上显示“Hello World”,index.html) - 将index.html 的内容替换为由VisiFire 呈现的简单图表:

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Visifire Charts</title>
<script language="javascript" type="text/javascript" >
</script>
</head>
<body>
    <!-- To embed in existing html copy the code below -->
    <script type="text/javascript" src="Visifire.js"></script>
    <div id="VisifireChart">
    <script language="javascript" type="text/javascript">
        var chartXmlString = ''
+'<vc:Chart xmlns:vc="clr-namespace:Visifire.Charts;assembly=SLVisifire.Charts" Width="500" Height="300" BorderThickness="0" Theme="Theme1" ToolBarEnabled="True" >'
    +'<vc:Chart.Titles>'
        +'<vc:Title Text="Global Fortune 5 Companies 2007" />'
    +'</vc:Chart.Titles>'
    +'<vc:Chart.AxesX>'
        +'<vc:Axis Title="Companies" />'
    +'</vc:Chart.AxesX>'
    +'<vc:Chart.AxesY>'
        +'<vc:Axis Title="Revenue in Million dollars" AxisType="Primary" />'
    +'</vc:Chart.AxesY>'
    +'<vc:Chart.Series>'
        +'<vc:DataSeries RenderAs="Column" AxisYType="Primary" >'
            +'<vc:DataSeries.DataPoints>'
                +'<vc:DataPoint AxisXLabel="Wall-Mart" YValue="351139" />'
                +'<vc:DataPoint AxisXLabel="Exxon Mobil" YValue="345254" />'
                +'<vc:DataPoint AxisXLabel="Shell" YValue="318845" />'
                +'<vc:DataPoint AxisXLabel="BP" YValue="274316" />'
                +'<vc:DataPoint AxisXLabel="General Motors" YValue="207349" />'
            +'</vc:DataSeries.DataPoints>'
        +'</vc:DataSeries>'
    +'</vc:Chart.Series>'
+'</vc:Chart>';
        var vChart = new Visifire("SL.Visifire.Charts.xap" , 500 , 300 );
        vChart.setDataXml(chartXmlString);
        vChart.render("VisifireChart");
    </script>
    </div>
    <!-- Copy till here -->
</body>
</html>
  • 我下载了VisiFire 3.6.1 Silverlight 二进制文件并将其复制到与index.html 相同的目录中
  • 我用MIME 类型更新了web.xml : xaml应用程序/xaml+xml xapapplication/x-silverlight-app
  • 我将其部署到本地 JBoss AS 上,但 portlet 是空白的

我一直在 google 上搜索,但找不到任何有关如何将包含 VisiFire Silverlight 图表的 portlet 部署到 JBoss Portal 上的有用信息。难道我没有做过什么愚蠢无理的事情吗?任何提示或示例代码将不胜感激!

提前致谢

I am trying to improve my JBoss Portal dashboard using some analytical charting tools then I found VisiFire. So I started to investigate how I could deploy a simple VisiFire page as a portlet onto JBoss Portal dashboard. Below is what I did:
- I created a dummy portlet (display "Hello World" on the index page, index.html)
- Replaced the content of the index.html with a simple chart which would be rendered by VisiFire:

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Visifire Charts</title>
<script language="javascript" type="text/javascript" >
</script>
</head>
<body>
    <!-- To embed in existing html copy the code below -->
    <script type="text/javascript" src="Visifire.js"></script>
    <div id="VisifireChart">
    <script language="javascript" type="text/javascript">
        var chartXmlString = ''
+'<vc:Chart xmlns:vc="clr-namespace:Visifire.Charts;assembly=SLVisifire.Charts" Width="500" Height="300" BorderThickness="0" Theme="Theme1" ToolBarEnabled="True" >'
    +'<vc:Chart.Titles>'
        +'<vc:Title Text="Global Fortune 5 Companies 2007" />'
    +'</vc:Chart.Titles>'
    +'<vc:Chart.AxesX>'
        +'<vc:Axis Title="Companies" />'
    +'</vc:Chart.AxesX>'
    +'<vc:Chart.AxesY>'
        +'<vc:Axis Title="Revenue in Million dollars" AxisType="Primary" />'
    +'</vc:Chart.AxesY>'
    +'<vc:Chart.Series>'
        +'<vc:DataSeries RenderAs="Column" AxisYType="Primary" >'
            +'<vc:DataSeries.DataPoints>'
                +'<vc:DataPoint AxisXLabel="Wall-Mart" YValue="351139" />'
                +'<vc:DataPoint AxisXLabel="Exxon Mobil" YValue="345254" />'
                +'<vc:DataPoint AxisXLabel="Shell" YValue="318845" />'
                +'<vc:DataPoint AxisXLabel="BP" YValue="274316" />'
                +'<vc:DataPoint AxisXLabel="General Motors" YValue="207349" />'
            +'</vc:DataSeries.DataPoints>'
        +'</vc:DataSeries>'
    +'</vc:Chart.Series>'
+'</vc:Chart>';
        var vChart = new Visifire("SL.Visifire.Charts.xap" , 500 , 300 );
        vChart.setDataXml(chartXmlString);
        vChart.render("VisifireChart");
    </script>
    </div>
    <!-- Copy till here -->
</body>
</html>
  • I downloaded the VisiFire 3.6.1 Silverlight binaries and copied into the same directory as the index.html
  • I updated the web.xml with the MIME type:
    xamlapplication/xaml+xml
    xapapplication/x-silverlight-app
  • I deployed it onto my local JBoss AS, but the portlet is blank

I have been google around but could not find any useful information on how to deploy a portlet contains VisiFire Silverlight chart onto JBoss Portal. Have I don't anything stupidly unreasonable? Any hints or sample codes would be appreciated!

Thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

ゞ花落谁相伴 2024-10-04 13:22:22

右键下拉菜单中没有“Silverlight”图标。

我认为 JBoss 不允许下载文件 SL.Visifire.Charts.xap。请检查SL.Visifire.Charts.xap和Visifire.js是否上传到正确的目录。另外,在浏览器地址栏中输入 SL.Visifire.Charts.xap 的直接路径并尝试下载。

还可以尝试设置直接路径,如下所示

var vChart = new Visifire("http://www.example.com/SL.Visifire.Charts.xap" , 500 , 300 );

There is no "Silverlight" icon on the right click drop down menu.

I think JBoss is not allowing to download the file SL.Visifire.Charts.xap. Please check whether SL.Visifire.Charts.xap and Visifire.js are uploaded at correct directory. Also type the direct path of SL.Visifire.Charts.xap in address bar of the browser and try to download it.

Also try setting direct path like below

var vChart = new Visifire("http://www.example.com/SL.Visifire.Charts.xap" , 500 , 300 );

失与倦" 2024-10-04 13:22:22

您能否检查一下右键单击时是否可以看到 Silverlight。

Can you please check whether you are able to see Silverlight on right click.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文