I spent the whole day working on the database. I wrote the store procedure that searched courses by attributes.
However, the store procedure can't return the attributes. It returns the right courses but can't display the attributes associated with the courses.
I have no dev time today because I didn't work in Eclipse.
Friday, May 4, 2007
Wednesday, May 2, 2007
GWT Junit in Ant and Attribute Search.
GWT Junit now worked in Ant script. I added to the project xml file.
Today, I figured out how to get the course names from the attributes. Probably I will write the stored procedures tomorrow.
Also I added some new drop-down list and some check boxes for the atrribute search feature. The UI looked ugly today. I would ask Brandon how he would change this tomorrow when we meet.
Today, I figured out how to get the course names from the attributes. Probably I will write the stored procedures tomorrow.
Also I added some new drop-down list and some check boxes for the atrribute search feature. The UI looked ugly today. I would ask Brandon how he would change this tomorrow when we meet.
Tuesday, May 1, 2007
GWT Junit Works in Eclipse now
Today, I just manually created the test class and put it in the client package. It worked. Last time I ran the junitCreator script that came with the GWT package. This script created the test class in the wrong folder. A lot of people on the Internet and even GWT website suggested to run this script instead of manually creating the test class.
The script didn't work for me.
The script didn't work for me.
Monday, April 30, 2007
Exception on the Search button
The exception of the Search button is handled using the same logic as each drop-down list I did a few days ago.
Also I tried to print out the number of entries found, but the number was printed twice. I traced the code but didn't know why it was like that. If I added something to the subjectNamePanel widget within the onSuccess method, then that thing would be printed twice.
Also I tried to print out the number of entries found, but the number was printed twice. I traced the code but didn't know why it was like that. If I added something to the subjectNamePanel widget within the onSuccess method, then that thing would be printed twice.
Friday, April 27, 2007
Handling Exceptions
There are times that the network connection between the client and the web server and between web server and database server were lost while users are using the application. In these situations, an error should be displayed to inform users that an error has occurred.
We need to display the error message because this is a Ajax application. If there is the network problem, the browser by default does not display any error messages. Thus, we have to have a logic that catches those exceptions and displays an error message.
I wrote some code to catch these exceptions today. I tested them and everything worked perfectly.
We need to display the error message because this is a Ajax application. If there is the network problem, the browser by default does not display any error messages. Thus, we have to have a logic that catches those exceptions and displays an error message.
I wrote some code to catch these exceptions today. I tested them and everything worked perfectly.
Thursday, April 26, 2007
Classpath in Junit Setup
I tried to figure out the problem why Junit test couldn't load the module. I searched on Google group and found that there was a person having the same problem. He got a lot of replies helping him to fix to problem. None of them worked for him. I tried to follow the solution but got no luck. This was a classpath problem. I added to the path of ClassAvailability.gwt.xml to the ....-hosted.cmd but it didn't work.
Wednesday, April 25, 2007
Database Exception Fixed
Today, I tried to do some unit tests but could not solve the problem "can't find the module". Then I stopped working on unit test and try to solve the database exception "The result set is closed".
Before I spent a lot of time on the database exception but couldn't solved it. I almost gave up. But because today Gary didn't finish the stored procedure, so I had nothing to do. I decided to look at the database exception again. I spent about one and a half hours searching on Google about the problem but couldn't find any solution. Finally, I did something that didn't make sense but it solved the problem.
In a DatabaseConnector class, I defined the connection, statement, and the resultSet as a global variable and set them to null. I used these variable in all methods that called the stored procedure. In each method I had an try, catch, finally blocks. In the finally block, it would closed the resultset, connection, statement if they were null.
What I did to solve the problem was to change those global variables to local variables. This made the code look so ugly since all method used that same variables which can be define as global. However, it fixed the problem (I hoped). I tested the application several times and it seemed like the problem got fixed. Because I didn't understand the root cause of the problem, I was sure if this solved the problem. Maybe I have to learn more about JDBC.
Before I spent a lot of time on the database exception but couldn't solved it. I almost gave up. But because today Gary didn't finish the stored procedure, so I had nothing to do. I decided to look at the database exception again. I spent about one and a half hours searching on Google about the problem but couldn't find any solution. Finally, I did something that didn't make sense but it solved the problem.
In a DatabaseConnector class, I defined the connection, statement, and the resultSet as a global variable and set them to null. I used these variable in all methods that called the stored procedure. In each method I had an try, catch, finally blocks. In the finally block, it would closed the resultset, connection, statement if they were null.
What I did to solve the problem was to change those global variables to local variables. This made the code look so ugly since all method used that same variables which can be define as global. However, it fixed the problem (I hoped). I tested the application several times and it seemed like the problem got fixed. Because I didn't understand the root cause of the problem, I was sure if this solved the problem. Maybe I have to learn more about JDBC.
Subscribe to:
Posts (Atom)