Primefaces charts from database

UI Components for JSF
Post Reply
jaltaie
Posts: 22
Joined: 27 Jul 2014, 02:31

27 Jul 2014, 14:36

I've seen plenty of examples of how to create charts with static values (ordinary numbers). I have not seen many examples or any tutorials of how to write the necessary managed beans to create PF charts from a database. Would really appreciate any advice or guidance of where to obtain instructions for creating charts from databases. Google produced no results. Many thanks, J

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

28 Jul 2014, 08:20

There is also no example on the primefaces site for displaying a datatable with data from a database. Because that is basic java and should not pose andly difficulties for a regular java developer. Just use jpa2 for this.

jaltaie
Posts: 22
Joined: 27 Jul 2014, 02:31

30 Jul 2014, 19:41

It doesn't pose difficulties as such but it does require extensive utilization of mapping objects and there is more than one way to achieve this. What I'm asking for is 'Best practices' and the recommended methodologies to use. JPA2 is the norm of course but are there any specific recommendations? Thanks.

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

30 Jul 2014, 20:24

Well, google produced this https://www.google.com/search?q=primefa ... m+database

Lots of things to study. And what do mean by 'require extensive use of mapping objects'? The fact that you need a model? Tyen don't use pf charts but use plain jqplot with json or whatever. But remember for json you also need some 'mapping' so it is up to you

jaltaie
Posts: 22
Joined: 27 Jul 2014, 02:31

03 Aug 2014, 19:10

Thanks for the advice and for the other alternatives. Actually pf is simpler than I thought. From some of the examples I thought I needed complicated models using collections objects. I was simply able to adapt the generic boy/girl examples to a DAO service and got what I needed.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 31 guests