aspose file tools*
The moose likes Other Open Source Projects and the fly likes CeWolf - SeriesPaintProcessor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "CeWolf - SeriesPaintProcessor " Watch "CeWolf - SeriesPaintProcessor " New topic
Author

CeWolf - SeriesPaintProcessor

Amandeep Aggarwal
Greenhorn

Joined: Jul 11, 2008
Posts: 12
Dear Experts,

I have just started using CeWolf-1.1.5 in a JSP application to display bar graphs. I was able to come up with a vertical bar graph (single category).
By default, it is Red in color. I tried using SeriesPaintProcessor to change the color of the bars. The J2ee engine is not able to parse the JSP and is giving the error:

The error is: com.sap.engine.services.servlets_jsp.lib.jspparser.exceptions.JspParseException: Cannot parse custom tag with short name [param].


Below is the relevant code that I am using:

<%@taglib uri='/WEB-INF/tld/cewolf.tld' prefix='cewolf' %>
<jsp:useBean id="seriesPaint" class="de.laures.cewolf.cpp.SeriesPaintProcessor" />
<html>
<body>

<jsp:useBean id="pageViews3" class="com.test.model.MyDataProducer"/>
<cewolf:chart
id="verticalbar"
title="Page View Statistics"
type="verticalbar"
xaxislabel="Page"
yaxislabel="Views">

<cewolf:data>
<cewolf:producer id="pageViews3"/>
</cewolf:data>
<cewolf:chartpostprocessor id="seriesPaint">
<cewolf:param name="0" value="#66bc29"/>
</cewolf:chartpostprocessor>
</cewolf:chart>


<cewolf:img chartid="verticalbar" renderer="cewolf" width="400" height="300">

</cewolf:img>


</body>
</html>

It works fine and displays the bar graph (in Red color) if I remove

<cewolf:chartpostprocessor id="seriesPaint">
<cewolf:param name="0" value="#66bc29"/>
</cewolf:chartpostprocessor>

Thanks for your help in advance.

Thanks,
aman

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42289
    
  64
For starters, use this taglib definition:

<%@taglib uri="http://cewolf.sourceforge.net/taglib/cewolf.tld" prefix="cewolf" %>


Ping & DNS - my free Android networking tools app
Amandeep Aggarwal
Greenhorn

Joined: Jul 11, 2008
Posts: 12
Thanks for your response.
Anyone using SAP's WAS, make a note of this. This is a bug in SAP WAS .The version I am using is 7.0.
I am pretty sure that this bug exists in other versions as well. SAP engine doesn't seem to accept JSP custom tag param values when specified in ""(Double quotes).
It has to be declared as a Java expression as mentioned below.

<cewolf:chartpostprocessor id="seriesPaint">
<cewolf:param name="0" value='<%="#66bc29"%>'/>
</cewolf:chartpostprocessor>

By changing from value="#66bc29" to value='<%="#66bc29"%>', it worked.

Thanks & Regards,
Amandeep
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42289
    
  64
Good to hear you got it resolved. Make sure to file a bug report with SAP. Maybe it's just the '#' character that's confusing it?
Amandeep Aggarwal
Greenhorn

Joined: Jul 11, 2008
Posts: 12
I don't think it is the "#" char that is confusing the SAP Java engine as I have seen the same problem with other non- color parameters.
It is the tag "param" as in
<cewolf:param name="outline" value='<%="true"%>'/>
is not getting parsed properly.

I will raise a defect to SAP for this

Thanks,
Amandeep
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: CeWolf - SeriesPaintProcessor