Here is my table:
Stock table : columns are Daily, Weekly,Monthly.
How to connect my oracle table with Dojo &wnt to display column charts.
Here is my JSP file called Report.jsp
If i hard code the data from table,i'm getting column charts.
Unable generate column chats dynamically.
Please help me the step how to connect my oracle table with dojo.
Much appreciated any sample code how to connect oracle table with dojo.
Here is my Report.jsp
So the flow would be like this:
1. A servlet which would read your request for data, connect to the DB, and return the data.
2. Call this servlet end point from your Dojo and populate the chartData with the response received from the servlet.
To return a response from Servlet have a look at JSON. You would basically need to return a JSON array of integers from your servlet.
Hope you are aware of writing a servlet?
So you got to learn the following to achieve your requirement:
1. Writing a Servlet which reads the request parameters for any data your are passing and interact with the DB.
2. Read about JSON and how you can return JSON response from Servlet. For creating JSON content you can have a look at GSON or Jackson Object Mapper.
3. Call this API from your Dojo code.
pushpa naga wrote:Thanks a lot for your reply Mohamed Sanaulla.
I'm very much new to Java.This very urgent issue
Much appreciated if you can send me any sample code.
I am afraid I cannot send you the code. Its useful for you to learn and implement it yourself so that you can reuse your knowledge elsewhere. I know its easy to copy and paste when you are tight on deadlines, but its not the right way.
pushpa naga wrote:Hi Mohamed Sanaulla,
Can't make it any progress in this issues.
So sorry to giving you an trouble again,please help in in this.
Your help is so much appreciated.
You can post your code here and let us know where you are stuck. Coderanch is NotACodeMill
Can we follow below steps to dynamically generate column charts using DOJO.
1. Exporting database table data to CSV file(Basically i have to get data dynamically from my database tables) from my servlet class & saved that csv file in an specified location(in my project location).
2. From that Csv file using CSVstore or CSVobjectStore i.e dojo modules can we populate column bar charts.
can we do like this.I don't know is it right way or not.
Thanks very much in advance.