Jump to content
We've recently updated our Privacy Statement, available here ×

JRAbstractChartCustomizer and virtualization


andrey_nado

Recommended Posts

I'm using file virtualization, which involves serialization of JasperPrint object's content. Also I'm using chart customizers and my customizer classes extends JRAbstractChartCustomizer class. I have questions:

1) Why JRAbstractChartCustomizer is not serializable? I have to create my own customizer superclass which implements java.io.Serializable.

2) After deserialization fields filler and chartDataset are both null and I lose access to report parameters/variables/fields. Is there any workaround to fix this?

Thank you for your great work.

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Chart customizers are not meant to be serialized, at least not the ones that extend JRAbstractChartCustomizer.

So the question is why it needs to be serialized in your case.  I assume that you somehow inject a reference to the customizer in the JFreeChart object that it customizes.  You should change this to fix the serialization problem.

Regards,

Lucian

Link to comment
Share on other sites

andrey_nado
Wrote:

> Chart customizers are not meant to be serialized

When I'm using file virtualizer, report pages are serialized/deserialized with all their content including customizers, aren't they?

Not by default.  Only if you somehow include a reference to the customizer in the JFreeChart instance passed to the customize() method.

Regards,

Lucian

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...