My requirement is I need to populate dyanamic graphs in a jsp page. I am using jsf for my project. I planning to use "jfreecharts" but dont know how to bind my jsp page with the back bean. I have some drop downs on the basis of the selection I my BackBean is fetching the data from the DB. Can you please suggest me some procedure to that with some sample code for my reference?
You can use Fiji (Exadel) library.
They have charts, as well as support for wrapping SWF elements and sending properties in JSF.
See an example here. For each component, there is source code as well so you can try it yourself.
Primefaces has a nice chart component as well.
Fiji is very nice but check out this http://www.fusioncharts.com/
Related
I am planning to implement pagination in my JSP using DataTables. I previously implemented it using DisplayTag Library but looks like it is getting old now. I couldn't find a good example or a resource about Datatables on how to do it in a JSP. I have a list of object in my JSP and intended to show 10 records per page. With DisplayTag I did it very easily but with DataTables I am not exactly sure if it is straight forward and the changes would just be in the JSP. I want some thoughts or if there is any other library out there to help accomplish my goal.
Thanks.
Go with this link.
DatabaleExample
I am developing a simple project using spring and hibernate, and at the moment I need to update data in database and in html page without refreshing whole page. What ways can I accomplish this and what ways are best suited to the spring hibernate combination? Is it possible without using javascript?
You have to use AJAX and JQuery most of the time and you cannot do it just using java or something like that. Javascript has come to stage if you need to perform some database operations without refreshing the page. If you want to learn more about how it can be done using spring and hibernate you may look at this link:
http://www.javacodegeeks.com/2012/02/ajax-with-spring-mvc-3-using.html
or
http://fruzenshtein.com/spring-mvc-ajax-jquery/
I am trying to learn Java and Javascript. Currently I following MVC, where i have servlets that will send data from a table to a JSP and I disply the data in table.
i am trying to make this table editable and create a good look and feel of the table using DataTable, however i am not sure how or where to start..Can someone please help me on this. I am a beginner and any simple example on on how to use DataTable would really help?
Thank you!
There are several examples here: http://datatables.net/examples/
Datatables is a great plugin if you want to show the data. But in my experience, it is not simple to interact with the server.. Like... add a new tr and create an instance on database using java. It is complicated this interaction.
In my experience, I would use primefaces datables: http://www.primefaces.org/showcase-labs/ui/datatableBasic.jsf;jsessionid=1si9n7bh9e6921gz0mj3w42ew3
I need to display some tabular data in a JSF page. I need some kind of grid component, but it is a must for it to have a pager and also to be able to sort the displayed data(example: by date created, alphabetically or simmilar...) Most probably i will start to create a custom component that fits all my needs, but i was wondering is is there any tag in JSF 2.0 or in some other library that already includes all this features. I would prefer not to use an external library like richfaces or similar just clean JSF 2.0. But if there is any good gadget out there i might give it a try.
Have a look at the p:dataTable component from Primefaces. It has sorting, filtering, pagination, row selection and a lot more features.
Getting started with Primefaces is quite simple. Download the jar, put it in your classpath and add the following namespace definition to your facelet's html tag:
xmlns:p="http://primefaces.prime.com.tr/ui"
Can someone point to jqgrid + java web app solution or especially with populating the grid and sending the form back to server. there are several php examples but nothing on java.
If you want to use some advanced tools like Spring, Hibernate and Maven here is the good example.
http://krams915.blogspot.in/2012/01/spring-mvc-31-jqgrid-and-spring-data_1887.html
EDIT:
See this, if you want to use plain Servlet and JSP. This is very basic example.
http://javahunter.wordpress.com/2010/12/07/jqgrid-example/
Here is one example on the web:
jqGrid Forum: how-use-jqgrid-in-jsp-server-one-example
If you are using struts2 there's a plugin which includes jqueryui and jqgrid components.
http://struts2-jquery.googlecode.com/