How should I use DataTables with my current application?

How should I use DataTables with my current application?

user345user345 Posts: 2Questions: 0Answers: 0
edited April 2015 in Free community support

Hello fellow free spirits, hope all is well with your development!

I have few questions as i'm new to DataTables and it would be very appreciated to get help and feedback. I will make my best so you can understand my gibberish.

First, I have built a JSP application using Netbeans. It is an eCommerce with a large amount of products held in an external database (Mysql). On the server-side, the products are already fetched and broken into categories (like in every regular online store right).

I use a page named category.jsp to display the products of a given/chosen category on user request. For instance, if user chooses category "laptop" the number of products for the category "laptop" will display and so on for every single category. Anyway, you get the gist of it.

This is the category.jsp:
https://jsfiddle.net/6hxpj3hy/

My concerns are, I do not know how to use DataTables to fetch partial lists for my online store. Every example here seems to be used to fetch full lists of data. But in an online store, it is most likely "partial lists" as the products have already been fetched and broken into little lists by assigning them categories. I just want by default, to show say 5 products per page regardless of the chosen category.

I already have all the packages and classes necessary: Product.Java, Category.java, ControllerServlet.java and their cousins etc...

My application is pretty much finished and completed. All i'm trying to do now is adding pagination to my tables which get their data using query requests. I have been trying to use DataTables for hours without getting it to work...I don't know what i'm doing wrong...

How would you go about doing this? Any tip? I can provide with any supp. code if necessary! :)

Replies

  • allanallan Posts: 61,787Questions: 1Answers: 10,115 Site admin

    Can you link to the page you are using so I can try it out and debug it please?

    Allan

This discussion has been closed.