actually what fixed the issue was the following code:
getFacesContext().getExternalContext().getRequestMap().put("event",
event);
Rafael Ribeiro wrote:
>
> I guess in my case it had to do with JBoss EL Parser...
> but.. anyways... I did an workaround that I am not proud of but at least
> let me catch the event, I've changed
> org.apache.myfaces.trinidad.component.UIXChart.broadcast method and added
> setProperty(EVENT_KEY, event);
> just before:
> broadcastToMethodExpression(event, getChartDrillDownListener());
> this way I can specify the listener as:
> chartDrillDownListener="#{chart.drillDown(event)}"
>
> For some weird reason when UIXChart tries to get its listener through
> getProperty (I guess) JBoss EL Parser does not resolve it to a method
> unless it ends with an (). Weirdly enough a4j:commandLink resolves
> properly its actionListener property on other form (what makes me think we
> could lookup in the same manner on UIXChart).
>
> regards,
> Rafael Ribeiro
>
> Rafael Ribeiro wrote:
>>
>> Has anyone ever been able to get the drilldown listener for Trinidad
>> Chart
>> working?
>> I am trying as on the examples and also as on *** book but it gives me
>> the
>> error below:
>>
>> Caused by: javax.el.PropertyNotFoundException: /graph.xhtml @26,5
>> chartDrillDownListener="#{chart.drillDown}": Property 'drillDown' not
>> found
>> on type br.com.cpqd.web.bean.chart.Chart_$$_javassist_seam_2
>> at
>> com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:73)
>> at
>> org.apache.myfaces.trinidad.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:68)
>> at
>> org.apache.myfaces.trinidad.component.UIXComponentBase.getProperty(UIXComponentBase.java:1151)
>> at
>> org.apache.myfaces.trinidad.component.UIXChart.getChartDrillDownListener(UIXChart.java:151)
>>
>> I also tried changing the expression to #{chart.drillDown()} as a way of
>> forcing it to interpret as a MethodExpression but in this case the method
>> on
>> the bean is not found, by the way the backing bean is as follows:
>>
>> package foo.bar;
>>
>> import org.apache.myfaces.trinidad.event.ChartDrillDownEvent;
>> import org.apache.myfaces.trinidad.model.ChartModel;
>> import org.jboss.seam.ScopeType;
>> import org.jboss.seam.annotations.Name;
>> import org.jboss.seam.annotations.Scope;
>>
>> @Name("chart")
>> @Scope(ScopeType.SESSION)
>> public class Chart {
>> private ChartModel chartModel = new MyChartModel();
>>
>> public ChartModel getChartModel() {
>> return this.chartModel;
>> }
>>
>> public void setChartModel(ChartModel chartModel) {
>> this.chartModel = chartModel;
>> }
>>
>> public void drillDown(ChartDrillDownEvent event) {
>> System.out.println("------------------------------------");
>> System.out.println(event);
>> System.out.println("------------------------------------");
>> }
>> }
>>
>>
>> Another attempt was to specify the listener as #{chart.drillDown(this)}
>> and
>> also as
>> #{chart.drillDown(org.apache.myfaces.trinidad.event.ChartDrillDownEvent.class)}
>> but both resulted in the event variable being null (also strangely enough
>> the method was called before the broadcastToMethodExpression method of
>> UIXChart was invoked, appearently it was being invoked during
>> getChartDrillDownListener().
>>
>> Does anyone has any tips/suggestions/whatsoever?
>>
>> best regards,
>> Rafael Ribeiro
>>
>>
>
>
--
View this message in context:
http://old.nabble.com/-Trinidad--Chart-drilldown-listener-problem-tp27062029p27079895.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.