Question

I'm trying to drow some charts using AmCharts in a GWT project. I use this code

public native void paille(int i) /*-{
        var params = {
            bgcolor : "#FFFFFF"
        };

        var flashVars = {
            path : "amcharts/flash/",
            settings_file : "sampleData/pie_settings.xml",
            data_file : "sampleData/pie_data.xml"
        };

        $wnd.swfobject.embedSWF("amcharts/flash/ampie.swf", "page_"+i, 600,
                400, "7.0.0", "amcharts/flash/expressInstall.swf",
                flashVars, params);
    }-*/;

The chart appeares but when I try to use the TabPanel tabs, I get the UmbrellaException. Have you any solution for that?

Was it helpful?

Solution

I'd thank everybody for answers. I found the root problem that I want to share. I was using this code to set the id of DOM:

DOM.setElementAttribute(tabPanel.getWidget(0).getElement(), "id", "id_0");

I shouldn't do that, I should create add the id to a flowPanel like this code

flowpanel = new FlowPanel();
HTML w = new HTML();
flowpanel.add(w);
tabPanel.add(flowpanel, "titre 0");
DOM.setElementAttribute(w.getElement(), "id", "id_0");

I set resolved

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top