[jboss-user] [JBoss Portal] - have any one get chartcreator to work with jboss portal?

kevin@adapt.com do-not-reply at jboss.com
Mon Aug 7 18:06:35 EDT 2006


 Hi,

I was trying to draw a chart within a portlet in jboss
portal with chartcreator (http://jsf-comp.sourceforge.net/components/chartcreator/index.html) but failed. the image is not
rendering. by view source, I've got
img id="impressions" width="400" height="300"
src="chartcreatorrequest.jsf?ts=1154984708281&id=impressions"
 but the picture is just not drawn.


my jsf file:

<chart:chart id="impressions" title="Impressions"
datasource="#{folderDailyImps}" type="timeseries"
width="400" height="300" />

my bean

@Out(scope=ScopeType.SESSION, required=false)
private TimeSeriesCollection folderDailyImps;

@Factory("folderDailyImps")
public void populateTimeSeries() {

Connection conn = _session.connection();
PreparedStatement ps = null;
ResultSet rs = null;
TimeSeries series = null;
folderDailyImps = new TimeSeriesCollection();

try {
ps = conn.prepareStatement(SQL_GET_GOOGLE_TIME_SERIES);
ps.setInt(1, 1);
rs = ps.executeQuery();

while (rs.next()) {
if (series != null) {
folderDailyImps.addSeries(series); // Add the last
series
}
series = new TimeSeries(rs.getString("name"),
Day.class);
series.add(new Day(new
Date(rs.getDate("xdate").getTime())), rs
.getInt("imps"));
logger.info(rs.getString("name") + " " +
rs.getDate("xdate") + " " + rs.getInt("imps"));
}
logger.info("folderDailyImps factory method invoked");
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}


portlet.xml
<?xml version="1.0" encoding="UTF-8"?>
<portlet-app
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
version="1.0">


<portlet-name>Reporting</portlet-name>

<portlet-class>org.apache.myfaces.portlet.MyFacesGenericPortlet</portlet-class>
<init-param>
default-view
/home.seam
</init-param>

<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>

<portlet-info>
Reporting
</portlet-info>


</portlet-app>

porlet-instance.xml
<?xml version="1.0"?>



<instance-id>ReportingInstance</instance-id>
<portlet-ref>Reporting</portlet-ref>




portal-object.xml


<if-exists>overwrite</if-exists>
<parent-ref>siab</parent-ref>

<page-name>Reporting</page-name>


<window-name>ReportingWindow</window-name>
<instance-ref>ReportingInstance</instance-ref>
center
1

<security-constraint>
<policy-permission>
<role-name>Authenticated</role-name>
<action-name>viewrecursive</action-name>
</policy-permission>
</security-constraint>



any idea?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963671#3963671

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963671



More information about the jboss-user mailing list