You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Kokavecz András (JIRA)" <de...@myfaces.apache.org> on 2011/07/26 16:33:09 UTC

[jira] [Created] (TRINIDAD-2123) tr:chart chartDrillDownListener method not called with facelets

tr:chart chartDrillDownListener method not called with facelets
---------------------------------------------------------------

                 Key: TRINIDAD-2123
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-2123
             Project: MyFaces Trinidad
          Issue Type: Bug
          Components: Components, Facelets
    Affects Versions: 2.0.0
         Environment: Intel x64 platform, Windows 7, FireFox 5.0
            Reporter: Kokavecz András


I'm trying to use Trinidad charts and I have problems with the chartDrillDown listener and also with the binding of the chart component to an UIComponent.

1.)
If I use a JSPX page with jsp:root and f:view tags, so withOUT Facelets it all works fine...the chartDrillDown fires up.

2.)
If inside ui:composition tags, so WITH facelets the problem is, that the API tries to look up the chartDrillDownListener as a property not as a MethodExpression.

This is also the case with bindig the tr:chart element to an UIComponent.

I debugged the class UIXChart, as the event travels throught its "broadcast(FacesEvent event)" method.

		// Deliver to the default ChartDrillDownEvent
		if (event instanceof ChartDrillDownEvent) {
			broadcastToMethodExpression(event, getChartDrillDownListener());
		}
		super.broadcast(event);

In case of FACELETS the getChartDrillDownListener() method tries to call getProperty() for UIXComponentBase and exits with a PropertyNotFoundException.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (TRINIDAD-2123) tr:chart chartDrillDownListener method not called with facelets

Posted by "Kokavecz András (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-2123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13071123#comment-13071123 ] 

Kokavecz András commented on TRINIDAD-2123:
-------------------------------------------

Max Starets (max.starets@oracle.com) wrote a reply for this:

"The problem is that the Facelets engine does not know it is dealing with a MethodExpression.

One way to fix it would be to override  createMetaRuleset() in the newly created chart tag along these lines: 

protected MetaRuleset createMetaRuleset(Class type)
{
    MetaRuleset m = super.createMetaRuleset(type);
    m.addRule(new MethodRule("chartDrillDownListener", null, new Class[]{ChartDrillDownEvent.class}));
    return m;
}

Another way would be to implement getChartDrillDownListeners() on CoreChart, so that TrinidadListenersTagRule can add a rule automatically."

> tr:chart chartDrillDownListener method not called with facelets
> ---------------------------------------------------------------
>
>                 Key: TRINIDAD-2123
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-2123
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components, Facelets
>    Affects Versions: 2.0.0
>         Environment: Intel x64 platform, Windows 7, FireFox 5.0
>            Reporter: Kokavecz András
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> I'm trying to use Trinidad charts and I have problems with the chartDrillDown listener and also with the binding of the chart component to an UIComponent.
> 1.)
> If I use a JSPX page with jsp:root and f:view tags, so withOUT Facelets it all works fine...the chartDrillDown fires up.
> 2.)
> If inside ui:composition tags, so WITH facelets the problem is, that the API tries to look up the chartDrillDownListener as a property not as a MethodExpression.
> This is also the case with bindig the tr:chart element to an UIComponent.
> I debugged the class UIXChart, as the event travels throught its "broadcast(FacesEvent event)" method.
> 		// Deliver to the default ChartDrillDownEvent
> 		if (event instanceof ChartDrillDownEvent) {
> 			broadcastToMethodExpression(event, getChartDrillDownListener());
> 		}
> 		super.broadcast(event);
> In case of FACELETS the getChartDrillDownListener() method tries to call getProperty() for UIXComponentBase and exits with a PropertyNotFoundException.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (TRINIDAD-2123) tr:chart chartDrillDownListener method not called with facelets

Posted by "Max Starets (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-2123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13071240#comment-13071240 ] 

Max Starets commented on TRINIDAD-2123:
---------------------------------------

As a temporary workaround, you can use a component binding for your chart with a request-scoped bean. In your bean's setter method (lets say it is called setChart()) you can call addChartDrillDownListener programmatically to register your listener.

> tr:chart chartDrillDownListener method not called with facelets
> ---------------------------------------------------------------
>
>                 Key: TRINIDAD-2123
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-2123
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components, Facelets
>    Affects Versions: 2.0.0
>         Environment: Intel x64 platform, Windows 7, FireFox 5.0
>            Reporter: Kokavecz András
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> I'm trying to use Trinidad charts and I have problems with the chartDrillDown listener and also with the binding of the chart component to an UIComponent.
> 1.)
> If I use a JSPX page with jsp:root and f:view tags, so withOUT Facelets it all works fine...the chartDrillDown fires up.
> 2.)
> If inside ui:composition tags, so WITH facelets the problem is, that the API tries to look up the chartDrillDownListener as a property not as a MethodExpression.
> This is also the case with bindig the tr:chart element to an UIComponent.
> I debugged the class UIXChart, as the event travels throught its "broadcast(FacesEvent event)" method.
> 		// Deliver to the default ChartDrillDownEvent
> 		if (event instanceof ChartDrillDownEvent) {
> 			broadcastToMethodExpression(event, getChartDrillDownListener());
> 		}
> 		super.broadcast(event);
> In case of FACELETS the getChartDrillDownListener() method tries to call getProperty() for UIXComponentBase and exits with a PropertyNotFoundException.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Issue Comment Edited] (TRINIDAD-2123) tr:chart chartDrillDownListener method not called with facelets

Posted by "Eric Han (Issue Comment Edited) (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-2123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13183435#comment-13183435 ] 

Eric Han edited comment on TRINIDAD-2123 at 1/11/12 2:55 PM:
-------------------------------------------------------------

I did the workaround approach, it's not solved.
    public void setCoreChart(CoreChart coreChart) {
        this.coreChart = coreChart;
        coreChart.addChartDrillDownListener(new ChartDrillDownListener(){
        	public void processChartDrillDown(ChartDrillDownEvent event) throws AbortProcessingException {
        		drillDown(event);
        	}
        });
    }
Is that right?
Or, is there other way to save it? And when do you can solve it?

Thanks,
Eric Han
                
      was (Author: feuyeux):
    I did the workaround approach, it's not solved.
    public void setCoreChart(CoreChart coreChart) {
        this.coreChart = coreChart;
        coreChart.addChartDrillDownListener(new ChartDrillDownListener(){
        	public void processChartDrillDown(ChartDrillDownEvent event) throws AbortProcessingException {
        		update();
        	}
        });
    }
Is that right?
Or, is there other way to save it? And when do you can solve it?

Thanks,
Eric Han
                  
> tr:chart chartDrillDownListener method not called with facelets
> ---------------------------------------------------------------
>
>                 Key: TRINIDAD-2123
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-2123
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components, Facelets
>    Affects Versions: 2.0.0-core
>         Environment: Intel x64 platform, Windows 7, FireFox 5.0
>            Reporter: Kokavecz András
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> I'm trying to use Trinidad charts and I have problems with the chartDrillDown listener and also with the binding of the chart component to an UIComponent.
> 1.)
> If I use a JSPX page with jsp:root and f:view tags, so withOUT Facelets it all works fine...the chartDrillDown fires up.
> 2.)
> If inside ui:composition tags, so WITH facelets the problem is, that the API tries to look up the chartDrillDownListener as a property not as a MethodExpression.
> This is also the case with bindig the tr:chart element to an UIComponent.
> I debugged the class UIXChart, as the event travels throught its "broadcast(FacesEvent event)" method.
> 		// Deliver to the default ChartDrillDownEvent
> 		if (event instanceof ChartDrillDownEvent) {
> 			broadcastToMethodExpression(event, getChartDrillDownListener());
> 		}
> 		super.broadcast(event);
> In case of FACELETS the getChartDrillDownListener() method tries to call getProperty() for UIXComponentBase and exits with a PropertyNotFoundException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (TRINIDAD-2123) tr:chart chartDrillDownListener method not called with facelets

Posted by "Eric Han (Commented) (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-2123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13183435#comment-13183435 ] 

Eric Han commented on TRINIDAD-2123:
------------------------------------

I did the workaround approach, it's not solved.
    public void setCoreChart(CoreChart coreChart) {
        this.coreChart = coreChart;
        coreChart.addChartDrillDownListener(new ChartDrillDownListener(){
        	public void processChartDrillDown(ChartDrillDownEvent event) throws AbortProcessingException {
        		update();
        	}
        });
    }
Is that right?
Or, is there other way to save it? And when do you can solve it?

Thanks,
Eric Han
                
> tr:chart chartDrillDownListener method not called with facelets
> ---------------------------------------------------------------
>
>                 Key: TRINIDAD-2123
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-2123
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components, Facelets
>    Affects Versions: 2.0.0-core
>         Environment: Intel x64 platform, Windows 7, FireFox 5.0
>            Reporter: Kokavecz András
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> I'm trying to use Trinidad charts and I have problems with the chartDrillDown listener and also with the binding of the chart component to an UIComponent.
> 1.)
> If I use a JSPX page with jsp:root and f:view tags, so withOUT Facelets it all works fine...the chartDrillDown fires up.
> 2.)
> If inside ui:composition tags, so WITH facelets the problem is, that the API tries to look up the chartDrillDownListener as a property not as a MethodExpression.
> This is also the case with bindig the tr:chart element to an UIComponent.
> I debugged the class UIXChart, as the event travels throught its "broadcast(FacesEvent event)" method.
> 		// Deliver to the default ChartDrillDownEvent
> 		if (event instanceof ChartDrillDownEvent) {
> 			broadcastToMethodExpression(event, getChartDrillDownListener());
> 		}
> 		super.broadcast(event);
> In case of FACELETS the getChartDrillDownListener() method tries to call getProperty() for UIXComponentBase and exits with a PropertyNotFoundException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira