use of org.pentaho.platform.uifoundation.chart.WidgetDefinition in project pentaho-platform by pentaho.
the class WidgetGridComponent method getXmlContent.
@Override
public Document getXmlContent() {
// get the data to populate the widgets
IPentahoResultSet resultSet = null;
if (solution != null) {
resultSet = getActionData();
}
// create the widget to use
// load the XML document that defines the dial
Document dialDefinition = null;
try {
org.dom4j.io.SAXReader reader = new org.dom4j.io.SAXReader();
reader.setEntityResolver(new SolutionURIResolver());
dialDefinition = reader.read(ActionSequenceResource.getInputStream(definitionPath, LocaleHelper.getLocale()));
} catch (Throwable t) {
// XML document can't be read. We'll just return a null document.
}
// create a dial definition from the XML definition
WidgetDefinition widgetDefinition = new DialWidgetDefinition(dialDefinition, 0, widgetWidth, widgetHeight, getSession());
return createDials(resultSet, widgetDefinition);
}
Aggregations