maranda

Members
  • Content count

    2
  • Joined

  • Last visited

About maranda

  • Rank
    Forum Newbie
  1. Solved! The problem was the relative path of the chart... Now it works, but only in Chrome! I suppose that is an econding problem, has anybody run into the same problem? Thanks a lot
  2. Hello everyone, I need your help. I’m trying to use FusionCharts XT in my project, but I don’t manage to! The project is a Maven – Web Application, Java 6, JSF 2 and IceFaces 3.2. I followed the instructions in this web (Documentatio --> Guide for Web Developers --> Using with J2EE). That is what I’ve already done: Place the FusionCharts folder containing all the .swf and .js files within the Web application (Maven uses by default the folder resources, so I made a new folder Charts in resources) Copy the fchelper.jar, fctl.jar, fcexporter.jar, and fcexporthandler.jar to the classpath of my web server (in my WAR structure is in WEB-INF/lib) I didn’t find the right JSF tag library for version 2, I only found this one: fusionchartstaglibJSF1-2.zip (JSF 1.2, Java 6) (the jar is in WEB-INF/lib too) I use FusionCharts.js and FusionChartsExportComponents.js so: <h:outputScript name=”FusionCharts.js” library=”Charts” /> <h:outputScript name=”FusionChartsExportComponents” library=”Charts” /> And my test.xhtml looks like this: <?xml version='1.0' encoding='UTF-8' ?> <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:ice="http://www.icesoft.com/icefaces/component" xmlns:ace="http://www.icefaces.org/icefaces/components" xmlns:f="http://java.sun.com/jsf/core" xmlns:fc="http://www.fusioncharts.com" template="/WEB-INF/template/common-template.xhtml"> <ui:define name="content"> <script type="text/javascript" src="Charts/FusionCharts.js" /> <h:form> <div id="chartContainer">FusionCharts XT will load here</div> <h:panelGrid id="grid1"> <fc:render chartId="${chartData.chartId}" filename="Charts/#{chartData.swfFilename}" width="100%" height="100%" debugMode="true" registerWithJS="1" WMode="0" color="CCCCCC" scaleMode="0" lang="en" detectFlashVersion="0" autoInstallRedirect="" xml="#{chartData.xml}" /> </h:panelGrid> </h:form> </ui:define> </ui:composition> Here the generated HTML: <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link href="/projectName-jsf/resources/css/less/bootstrap.less" rel="stylesheet/less" /> <script src="/projectName-jsf/javax.faces.resource/FusionCharts.js.jsf?ln=Charts" type="text/javascript"></script> <script src="/projectName-jsf/javax.faces.resource/FusionChartsExportComponent.js.jsf?ln=Charts" type="text/javascript"></script> <title>projectName</title> [...] </head> <body> [...] <div id="content"> [...] <form action="/projectName-jsf/pages/secured/report/test.jsf" enctype="application/x-www-form-urlencoded" id="j_idt100" method="post" name="j_idt100"> <input name="j_idt100" type="hidden" value="j_idt100" /> <input name="ice.window" type="hidden" value="qihgdf85bc" /> <input name="ice.view" type="hidden" value="vhk3x06c" /> <script id="j_idt100:j_idt100_captureSubmit" type="text/javascript">ice.captureSubmit('j_idt100',false);ice.captureEnterKey('j_idt100');</script> <div id="chartContainer">FusionCharts XT will load here</div><table id="j_idt100:grid1"> <tbody> <tr> <td> <!-- START Script Block for Chart basicChart--> <div align="center" id="basicChartDiv"> Chart. </div> <script type="text/javascript"> var chart_basicChart = new FusionCharts('Charts/Column3D.swf', 'basicChart', '100%', '100%', '1', '0'); chart_basicChart.setDataXML("<chart caption='Monthly Unit Sales' xAxisName='Month' yAxisName='Units' showValues='0' formatNumberScale='0' showBorder='1'> <set label='Jan' value='462' /> <set label='Feb' value='857' /> <set label='Mar' value='671' /> <set label='Apr' value='494' /><set label='May' value='761' /><set label='Jun' value='960' /><set label='Jul' value='629' /><set label='Aug' value='622' /><set label='Sep' value='376' /><set label='Oct' value='494' /><set label='Nov' value='761' /><set label='Dec' value='960' /></chart>"); chart_basicChart.render('basicChartDiv'); </script> <!--END Script Block for Chart basicChart--> </td> </tr> <tr> [...] I saw a solution using Primefaces, but that is not possible for me L I have to use IceFaces. Can anybody help me, please? What am I doing wrong or missing? No error message is shown! Is ther already an update Taglib for JSF 2? Thanks in advance María