Page 1 of 2

ItemSelectListener on a columnChart

Posted: 18 Mar 2010, 21:42
by pdioniziofilho
Hy,

recently I was looking at this post http://primefaces.prime.com.tr/forum/vi ... 54&start=0 because I've the same issue.

I've my app working with JSF 1.2 + RichFaces + Seam + PrimeFaces .

I've configured the PrimeFaces and the chart is working properly however the itemSelectListener is not working! .. when I click on the bar nothing happens ..

do you guys have any tips on how to solve it?

the chart is inside a form, everything is just the way the reference guide states..

thank's

Re: ItemSelectListener on a columnChart

Posted: 19 Mar 2010, 13:31
by pdioniziofilho
I've just tested the itemSelectListener with a pieChart and nothing happens too..

anyone knows what might be wrong?

Re: ItemSelectListener on a columnChart

Posted: 19 Mar 2010, 13:34
by cagatay.civici
Showcase seems to be working fine;

http://www.primefaces.org:8080/prime-sh ... Charts.jsf

Can you post your code? Which PrimeFaces version do you have?

Re: ItemSelectListener on a columnChart

Posted: 19 Mar 2010, 14:46
by pdioniziofilho
Yep, showcase is working fine,

I'm using primefaces-1.0.0.jar and JSF 1.2

Here goes the code just the way it is now:

Code: Select all

....
<h:form id="chartForm">
<p:columnChart value="#{PontoComprometimentoBean.listaCartoesGraficoPOC}" 
      var="v" xfield="#{v.dataFormatada}" rendered="{PontoComprometimentoBean.isGraficoDia()}"
      itemSelectListener="#{PontoComprometimentoBean.visualizarCartoesPorHora}">
     <p:chartSeries label="#{labelGraficoDia}" value="#{v.quantidadeCartoes}" />
</p:columnChart>
</h:form>

...
My bean:

Code: Select all

	
	public void visualizarCartoesPorHora(ItemSelectEvent event) {
            //implementation goes here
        }

However this method is never called!

My project structure is like this:

Code: Select all

- Ear 
   - lib 
   - core jar file(with VO's....)
   - web war file 
 
Do you think that's a problem to keep the prime lib outside the war file?

I'm using Websphere 6.1 app server..

Re: ItemSelectListener on a columnChart

Posted: 19 Mar 2010, 16:27
by cagatay.civici
I don't think problem is related with PrimeFaces jar being outside as you can see the chart displayed.

Which exact version of JSF do you have? For example MyFaces 1.2.6 or Mojarra 1.2._12?

Re: ItemSelectListener on a columnChart

Posted: 19 Mar 2010, 19:27
by pdioniziofilho
I've

Mojarra JSF Implementation 1.2_13-b01-FCS
and for facelets 1.1.14

RichFaces 3.3.1.GA

JBoss Seam 2.0.2.SP1

Re: ItemSelectListener on a columnChart

Posted: 20 Mar 2010, 00:11
by cagatay.civici
I'm kinda out of suggestions, since you have RichFaces, can you create a little new project with the same small page with just PrimeFaces to see if it works then we can understand the problem.

It is hard to find out the reason of the problem as showcase works fine.

Re: ItemSelectListener on a columnChart

Posted: 20 Mar 2010, 01:22
by pdioniziofilho
sure,

I'll do it and I'll let you know..

Re: ItemSelectListener on a columnChart

Posted: 23 Mar 2010, 14:18
by pdioniziofilho
updating here..

I think I found one of the problems...

The chart was inside a rich component called rich:simpleTogglePanel. I put the chart outside this togglepanel and now the listener is working only in Firefox!.

In the IE7 it doesn't work! nothing happens like I said before..

Re: ItemSelectListener on a columnChart

Posted: 23 Mar 2010, 14:48
by pdioniziofilho
I found the problem,

my page is using <rich:dropDownMenu >

If I remove this element everything works fine, something of primeFaces is "conflicting" with this component of richFaces.

Do you have any ideia catagay of how to solve this problem?