>
>
>
>
>
> > por exemplo:
> > minha pagina web ta assim:
> > <html xmlns="
http://www.w3.org/1999/xhtml"
> > xmlns:h="
http://java.sun.com/jsf/html"
> > xmlns:ui="
http://java.sun.com/jsf/facelets"
> > xmlns:f="
http://java.sun.com/jsf/core"
> > xmlns:p="
http://primefaces.prime.com.tr/ui"
> > xml:lang="pt">
>
> > <f:view>
> > <head>
> > <meta http-equiv="Content-Type" content="text/html;
> > charset=ISO-8859-1"/>
> > <title>PrimeFaces Test</title>
> > <p:resources />
> > </head>
> > <body>
> > <h3>Database Image Simulation</h3>
> > <p:graphicImage value="#{mbchart.chart}" />
> > </body>
> > </f:view>
> > </html>
>
> > meu beangerenciador ta assim:
>
> > public class DynamicImageController {
>
> > private StreamedContent chart;
>
> > private static final Logger logger =
> > Logger.getLogger(DynamicImageController.class.getName());
>
> > public DynamicImageController() {
> > //Chart
> > try {
> > JFreeChart jfreechart =
> > ChartFactory.createPieChart("Turkish
> > Cities", createDataset(), true, true, false);
> > File chartFile = new File("dynamichart");
> > ChartUtilities.saveChartAsPNG(chartFile, jfreechart,
> > 375, 300);
> > chart = new DefaultStreamedContent(new
> > FileInputStream(chartFile),
> > "image/png");
> > } catch (Exception e) {
> > logger.severe(e.getMessage());
> > }
>
> > }
>
> > public StreamedContent getChart() {
> > return chart;
> > }
> > public void setChart(StreamedContent chart) {
> > this.chart = chart;
> > }
>
> > private PieDataset createDataset() {
> > DefaultPieDataset dataset = new DefaultPieDataset();
> > dataset.setValue("Istanbul", new Double(45.0));
> > dataset.setValue("Ankara", new Double(15.0));
> > dataset.setValue("Izmir", new Double(25.2));
> > dataset.setValue("Antalya", new Double(14.8));
>
> > return dataset;
> > }
> > }
>
> > to tentan usar essa lib
> > primefaces-1.0.0-SNAPSHOT.jar
>
> > ja tentei essa e nada:
> > primefaces-2.0.0.jar
>
> > tambem essa:
> > primefaces-ui-0.9.3.jar, segundo algumas informações que encontrei por
> > ai, diziam que só seria necessário esse jar para usar gráfico.
>
> > preciso saber qual os jars corretos e configurações necessárias.
>
> > obrigado.
>
> > On 22 fev, 11:10, Bruno Maomeh <
brunomao...@xxxxxxxxx> wrote:
> > > fale os problemas que você teve.. especifique mais.. que assim fica mais
> > > fácil de ajudar..
>
> > > Em 22 de fevereiro de 2010 11:00, johnibat <
johni...@xxxxxxxxxxxx>
> > escreveu:
>
> > > > Alguém saberia como apresentar um gráfico em página jsf, com ou sem
> > > > primefaces. Pois já segui varias dicas da web e até o momento não
> > > > consegui nada, só um tela em branco e nada de grafico. Acredito que
> > > > possa ser alguma biblioteca que esteja faltando ou com problema, como
> > > > nunca fiz isso funcionar não tenho idéia do que fazer.
>
> > > > desde já agradeço a ajuda.
>
> > > > Batista.
>
> > > > --
> > > >
http://groups.google.com/group/javasf
>
> > > > You received this message because you are subscribed to the Google
> > > > Groups "javasf: JavaServer Faces Group" group.
> > > > To post to this group, send email to
javasf@xxxxxxxxxxxxxxxx
>
> > > --
> > > Bruno Maomeh
> > >
http://brunomaomeh.wordpress.com
>
> > --
> >
http://groups.google.com/group/javasf
>
> > You received this message because you are subscribed to the Google
> > Groups "javasf: JavaServer Faces Group" group.
> > To post to this group, send email to
javasf@xxxxxxxxxxxxxxxx
>
> --
> Bruno Maomeh
>
http://brunomaomeh.wordpress.com