Thanks for the fast reply.

It is not possible to use tomahawk or the chartcreator comp in my environment. 
So, I hope there is a solution without using special components. I will take a 
look to the source code of chartcreator and try to find a solution.

If anyone know how it works, please let me know. :)

Thanks a lot!



> -----Ursprüngliche Nachricht-----
> Von: "MyFaces Discussion" <users@myfaces.apache.org>
> Gesendet: 06.06.07 15:52:40
> An: MyFaces Discussion <users@myfaces.apache.org>
> Betreff: Re: how to create dynamic grahpics with JFreeChart and myfaces?


> 
> See JSF Chart Creator [1], it uses JFreeChart 1.0.5.
> 
> [1] http://jsf-comp.sourceforge.net/components/chartcreator/index.html 
> <http://www.jfree.org/jfreechart>
> 
> Glauco P. Gomes
> 
> Mario Ivankovits escreveu:
> > Hi!
> >   
> >> I want to show a BufferedImage on a JSF-generated page. In my case, this 
> >> Image is generated by the JFreeChart[1] library. Now my question:
> >> What must I do, that I can show this image as a graphic on a JSF Page?
> >>   
> >>     
> > Hehe - I had the same problem yesterday.
> >
> > One solution is the latest tomahawk-sandbox and its graphicsImageDynamic
> > component.
> > There you can do something like:
> >
> > <s:graphicsImageDynamic value="#{backingBean.chartRenderer}" where the
> > method signature of chartRenderer is
> >
> > public ImageRenderer getChartRenderer()
> > {
> > }
> >
> > To fulfill the ImageRenderer requirements is easy, just create a png/gif
> > byte array out of the chart and write it to the ResponseStream where
> > requested by the ImageRenderer Interface.
> > The trick is, that you have to find some way to push down informations
> > to the managed bean.
> >
> > If you do not use MyFaces Orchestra (or Seam) which provides a
> > conversation scope, the easiest way is to put the backingBean into the
> > session scope.
> >
> >
> > Another way is to use s:graphicsImageDynamic
> > imageRenderer="#{backingBean.chartImageRenderer}". Then the method
> > signature of chartImageRenderer is
> > public String getChartImageRenderer() where you have to provide a FQN of
> > a class implementing the ImageRenderer interface.
> > It should work then to add f:param tags within the graphicsImageDynamic
> > component to pass down some informations to the renderer.
> > Though, I do not know much more about that way ... I am a MyFaces
> > Orchestra user ;-)
> >
> > Ciao,
> > Mario
> >
> >
> >   
> 
> 


_______________________________________________________________
SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192

Reply via email to