• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

cewolf

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A DatasetProducer is supposed to generate the same data when passed in the same paramters. So Cewolf returns a cached instance of a chart if there is no change in parameters.

my question is "where the cewolf checks the previous chart image?"
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do you mean by "where" - where in the cewolf source code? Check out the classes in the de.laures.cewolf.storage package.
 
Manju R Sankar
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"where" means where the cewolf stores the chart id ?like "session or cache or file"


when we refresh the page the cewolf loads the chart... from where it loads the chart?



could anyone tell the working of cewolf in loading the charts?
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ewolf has several options, amongst them server sessions and files. You can select the one to be used as a servlet init parameter in the web.xml file. The source code of the classes I pointed you to are probably the best documentation available on this.

Not sure what you mean by "where it loads the chart" - it loads it from wherever it stored it, assuming that it got stored in the first place.
 
Manju R Sankar
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

what is the use of "hasExpired" and "getProducerId" methods in datasetProducer interface?
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Those method have javadoc comments - what didn't you understand about those?
 
Manju R Sankar
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i wrote a struts application to display the charts using cewolf...
the datas needed for the chart is fetch from the database and the charts are displayed....

and when we refresh the page the name of the chart does not change(means the previously displayed chart is again loaded)

Example:first time the chart is loaded and name is "cewolf;jsessionid=85BFCF136F756353724AF93C6A22FC3F?img=-666842058&width=200&height=125&iehack=.png"
and when i refresh the page the same is loaded namely "cewolf;jsessionid=85BFCF136F756353724AF93C6A22FC3F?img=-666842058&width=200&height=125&iehack=.png"

how it possible?
my guess is
when we refresh the page cewolf produce another chart image, isn't it?

my guessing is correct or wrong?
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Probably. Did you implemented hasExpired and getProducerId properly so they return the correct values? Is hasExpired being called?
 
Manju R Sankar
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes "hasExpired" is called........

but how it returns the same image?



when we refresh the page,
if there is a change in database it produces a new chart image(EXAMPLE: the chart id is different"......?img=123345323&width=200&height=125&iehack=.png")
otherwise it loads the same image("cewolf;jsessionid=85BFCF136F756353724AF93C6A22FC3F?img=-666842058&width=200&height=125&iehack=.png")

how it works?

i need the working principle of cewolf...............
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure what you're asking. Yes, if the data changes and the methods hasExpired and getProducerId are properly implemented, then a new chart is generated; otherwise not. If you're asking how that works on the code level (which is irrelevant to a user of the taglib), I suggest to dig into the source code.
 
Manju R Sankar
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
" if the data changes and the methods hasExpired and getProducerId are properly implemented, then a new chart is generated; otherwise not."
if we reload the page, what will happen new chart or not(old chart from session)?


how the chart image is stored in session(as object or image)? and when we request for the chart how it renders?
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Before I forget, you need to fix your display name to comply with the naming policy. Please do that prior to your next post.

if we reload the page, what will happen new chart or not(old chart from session)?


The DatasetProducer will be queried whether or not a new chart should be created.

how the chart image is stored in session(as object or image)?


The chart as a org.jfree.chart.JFreeChart object, the image as a de.laures.cewolf.ChartImage object.

and when we request for the chart how it renders?


The rendering is done via the JFreeChart library.
 
Manju R Sankar
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"The DatasetProducer will be queried whether or not a new chart should be created."

To create a new chart or display the old chart the DatasetProducer must know about the previously created chart, isn't it?

how the DatasetProducer knows about the previously created chart?

from where it queried about the chart info?
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

how the DatasetProducer knows about the previously created chart? from where it queried about the chart info?


It's up to the DatasetProducer -i.e., your code- to determine this. That's why it gets passed the parameters and the date of the last chart generation.
 
Manju R Sankar
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for your reply.......
reply
    Bookmark Topic Watch Topic
  • New Topic