views:

19

answers:

2

Hi,

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"&gt;
<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

A: 

Hi,

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

No, the content of the portlet is empty. There is no "Silverlight" icon on the right click drop down menu.
Thomas
A: 

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 );

Somnath