rhaynelsillador / jsflot

Automatically exported from code.google.com/p/jsflot
0 stars 1 forks source link

chart not rendered in v 0.6 with facelets 1.1.15 #36

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. create a .xhtml file with a flotchart inside a ui:composition

What is the expected output? What do you see instead?
a chart is expected to be rendered, but i'm not seeing anything.

What version of the product are you using? On what operating system?
jsflot 0.6 with facelets 1.1.15 and richfaces 3.3.3

Please provide any additional information below.

here's my page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:c="http://java.sun.com/jstl/core"
    xmlns:a4j="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:jsflot="http://www.jsflot.org/taglib/jsflot">

<head>
<jsflot:resources />
<title>RichFaces Greeter</title>
</head>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:a4j="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:jsflot="http://www.jsflot.org/taglib/jsflot">

    <jsflot:flotChart id="firstChart" value="#{chartMbean.chartData}"
        mode="Series" chartType="Line" height="300" width="400" />

</ui:composition>
</html>

this is what i get:

<html  xmlns="http://www.w3.org/1999/xhtml"><head><link class="component" 
href="/Charts/a4j/s/3_3_3.Finalorg/richfaces/renderkit/html/css/basic_classes.xc
ss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf" rel="stylesheet" type="text/css" /><link 
class="component" 
href="/Charts/a4j/s/3_3_3.Finalorg/richfaces/renderkit/html/css/extended_classes
.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf" media="rich-extended-skinning" 
rel="stylesheet" type="text/css" /><script 
type="text/javascript">window.RICH_FACES_EXTENDED_SKINNING_ON=true;</script><scr
ipt 
src="/Charts/a4j/g/3_3_3.Finalorg/richfaces/renderkit/html/scripts/skinning.js.j
sf" type="text/javascript"></script></head><div id="firstChart"><div 
id="firstChart_chart" style="width:400px;height:300px;"></div>
<script id="firstChart_source" language="javascript" 
type="text/javascript">document.observe('dom:loaded', function() {
drawJSFlotChart();
});

window.onresize = function() { drawJSFlotChart(); }; 

function drawJSFlotChart() {
var options = {
   HtmlText: false,
   legend: {
      backgroundColor: '#D2E8FF',
      backgroundOpacity: 0.85,
      noColumns: 1,
      position: 'ne',
      show: true
   },
   lines: {
      fill: false,
      show: true
   },
   points: {show: false},
   xaxis: {
      labelsAngle: 45.55,
      showLabels: true
   },
   yaxis: {
      showLabels: true,
      tickFormatter: function(n){ return yaxisConverter(n); },
      titleAngle: 90
   }
};
function firstChart_chart_jsflotdrawGraph(opts){
var o = Object.extend(Object.clone(options), opts || {});
return Flotr.draw($('firstChart_chart'), [ {
   data:  [[0,0], [1,1], [2,2]],
   label: 'series1'
},{
   data:  [[0,4.023], [1,3.872], [2,2.926]],
   label: 'series2'
},{
   data:  [[1,3.289], [2,2.999], [3,3.924]],
   label: 'series3'
} ],o);
}
var firstChart_chart_jsflot = firstChart_chart_jsflotdrawGraph();
var startingx = firstChart_chart_jsflot.axes.x.min;
var endingx = startingx;
var dragstart;
var dragend;
}
</script>
<input type="hidden" id="firstChart_hiddenValue" value="" />
</div>
</html>

BTW if I insert the flotchart in a f:view without using facelets i get the 
chart rendered as well, i'm wondering where i'm wrong. 

Original issue reported on code.google.com by fulviode...@gmail.com on 10 Sep 2010 at 8:44

GoogleCodeExporter commented 8 years ago
obviously, the same is if I insert taglib declaration just once, in the 
ui:composition or in the html tag.

Original comment by fulviode...@gmail.com on 10 Sep 2010 at 8:47

GoogleCodeExporter commented 8 years ago
Since you are using RichFaces 3.3.3 are you also using JSF 2 ?

I will try with Facelets 1.1.15 locally as well. 

Original comment by boem...@gmail.com on 16 Sep 2010 at 11:58

GoogleCodeExporter commented 8 years ago
i'm sorry, am i using jsf2? I hardly think so since i'm just using richfaces 
3.3.3 plus facelets 1.1.15.

any help would be most welcome.
thank you.

Original comment by fulviode...@gmail.com on 17 Sep 2010 at 3:30

GoogleCodeExporter commented 8 years ago
My current test environment uses Facelets 1.1.13. I will try to rerun with a 
newer version of Facelets to see what is going on. 

Original comment by boem...@gmail.com on 17 Sep 2010 at 6:15

GoogleCodeExporter commented 8 years ago
Has this ever been resolved?  I am having the same trouble in facelets with jsf 
v1.2

Original comment by mry...@gmail.com on 16 Sep 2011 at 6:54

GoogleCodeExporter commented 8 years ago
For me moving the <jsflot:resources /> solved the problem.

Try putting it inside your <ui:composition> tag.

Best Regards,
Carl

Original comment by oubo...@gmail.com on 22 Apr 2012 at 4:00