[JBoss Portal] - Re: have any one get chartcreator to work with jboss portal?
by javajedi
Doesn't really have anything to do with JBoss Portal, but I just patched the chart creator to work inside JBoss Portal. In case anyone cares, here is the patch:
diff --new-file -rc ./net/sf/jsfcomp/chartcreator/ChartListener.java /home/tim/src/3p/chartcreator-1.2.0-RC1/net/sf/jsfcomp/chartcreator/ChartListener.java
| *** ./net/sf/jsfcomp/chartcreator/ChartListener.java 2006-08-08 01:22:01.000000000 -0700
| --- /home/tim/src/3p/chartcreator-1.2.0-RC1/net/sf/jsfcomp/chartcreator/ChartListener.java 2006-08-08 01:17:28.000000000 -0700
| ***************
| *** 53,58 ****
| --- 53,64 ----
| Map sessionMap = externalContext.getSessionMap();
|
| String id = (String)requestMap.get("id");
| + for (Object key : sessionMap.keySet()) {
| + String s = (String) key;
| + if (s.endsWith("?" + id)) {
| + id = s;
| + }
| + }
| ChartData chartData = (ChartData) sessionMap.get(id);
| JFreeChart chart = ChartUtils.createChartWithType(chartData);
| ChartUtils.setGeneralChartProperties(chart, chartData);
| ***************
| *** 71,81 ****
| }
|
| public void beforePhase(PhaseEvent phaseEvent) {
| -
| }
|
| public PhaseId getPhaseId() {
| ! return PhaseId.RESTORE_VIEW;
| }
|
| private void writeChartWithServletResponse(HttpServletResponse response, JFreeChart chart, ChartData chartData) throws IOException{
| --- 77,86 ----
| }
|
| public void beforePhase(PhaseEvent phaseEvent) {
| }
|
| public PhaseId getPhaseId() {
| ! return PhaseId.ANY_PHASE;
| }
|
| private void writeChartWithServletResponse(HttpServletResponse response, JFreeChart chart, ChartData chartData) throws IOException{
| diff --new-file -rc ./net/sf/jsfcomp/chartcreator/UIChart.java /home/tim/src/3p/chartcreator-1.2.0-RC1/net/sf/jsfcomp/chartcreator/UIChart.java
| *** ./net/sf/jsfcomp/chartcreator/UIChart.java 2006-08-08 01:22:01.000000000 -0700
| --- /home/tim/src/3p/chartcreator-1.2.0-RC1/net/sf/jsfcomp/chartcreator/UIChart.java 2006-08-08 01:23:24.000000000 -0700
| ***************
| *** 113,119 ****
| writer.writeAttribute("id", getClientId(context), null);
| writer.writeAttribute("width", String.valueOf(getWidth()), null);
| writer.writeAttribute("height", String.valueOf(getHeight()), null);
| ! writer.writeAttribute("src", ChartListener.CHART_REQUEST + ".jsf?ts=" + System.currentTimeMillis() + "&id=" + getClientId(context), null);
| ChartUtils.renderPassThruImgAttributes(writer, this);
| }
|
| --- 113,122 ----
| writer.writeAttribute("id", getClientId(context), null);
| writer.writeAttribute("width", String.valueOf(getWidth()), null);
| writer.writeAttribute("height", String.valueOf(getHeight()), null);
| ! writer.writeAttribute("src", context.getApplication().getViewHandler().getResourceURL(context, "/") +
| ! ChartListener.CHART_REQUEST + ".jsf?ts=" + System.currentTimeMillis() +
| ! "&id=" + getClientId(context), null);
| !
| ChartUtils.renderPassThruImgAttributes(writer, this);
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963734#3963734
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963734
19 years, 9 months
[Beginners Corner] - Re: Total Newbie Needs Help
by cagri
C:\Program Files\jboss-4.0.4.GA\bin>RUN
===============================================================================
.
JBoss Bootstrap Environment
.
JBOSS_HOME: C:\Program Files\jboss-4.0.4.GA\bin\\..
.
JAVA: java
.
JAVA_OPTS: -Dprogram.name=run.bat -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcIn
terval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
.
CLASSPATH: C:\Program Files\Java\jdk1.5.0_07\lib\tools.jar;C:\Program Files\jb
oss-4.0.4.GA\bin\\run.jar
.
===============================================================================
.
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/jboss/Mai
n (Unsupported major.minor version 48.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Press any key to continue . . .
Still the same problem:(
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963732#3963732
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963732
19 years, 9 months