Open kfelton opened 11 years ago
created a controller for profile info, created a model for profile info, added a method to add to profile info in mysqldatabase & Iddatabase.
Created addProfileInfoServlet which gets the information that the user enters in in the html view
mapped the servlet in the web.xml file
created the little dialog box for accessing the database where you have to enter a username & password (only michelle, mine & josh's will work) but currently it doesnt pop up so it needs to be called in a different class than it is currently called in. It should pop up & if the credentials are wrong it will exit but i think i might make a loop later on so that the person has 3 tries and then it exits if wrong. -> not really TOP priority
i changed gender, location & looking for from Strings to ints. I changed them because as of right now there only a certain amount of options the user can choose. location only include 4 states(pa, md, de, nj) which will probably be changed later but for the minimimal working system i thought that was fine. Same with looking for there are 4 options to choose from, also doing it this way the user can't enter made up locations and what theyre looking for. looking for includes relationship, friendship, cuddle buddy & nothing serious, which will probably also be changed later to contain more realistic options.
I changed in the database the varchars (45) for likes, dislikes, basic_info, anything where the user can type a large amount to 250 characters.
in userProfile.jsp i changed the text boxes to text areas that way when the user types large amounts of interests the text wraps. also made location & looking for to combo boxes so they can only select certain options.
JUnit test for Profile Info works.
https://github.com/ajcummins/LinkUp/commit/6bbeeed59ab510c10ecbf62fbd45e2c2e8390724
https://github.com/ajcummins/LinkUp/commit/f8705f598e445424498232c6195556f84112e6c0
https://github.com/ajcummins/LinkUp/commit/4a71b495d8d8e71a695c0b47ac44283a7e124cf5
https://github.com/ajcummins/LinkUp/commit/29ee2931b325a34dc56f18dc546e24b33acf898d
https://github.com/ajcummins/LinkUp/commit/1339c20692c36c0c8ffb4779f5cc20383945b868
got basic profile page implemented. created ProfileView Servlet & ProfileViewController. Added a get_profile_info method to MySqldatabase.
https://github.com/ajcummins/LinkUp/commit/876875cf3c6ffeb0ca9d3dab498bac8e318b543f
TO DO: need to make it so that if the user wants to make changes & edit their profile information they can, fix the dialog box security thing maybe. Currently to diplsay the location & looking_for i have if else statements that change the int to a string .. there is probably a better way of doing that since we will probably end up changing the way to enter a more specific location rather than just states. AND we have to make it so that the user_id is passed cause right now its hard coded to bring up where user_id='2'
did all redirecting for html button clicks https://github.com/ajcummins/LinkUp/commit/a0f31d5a94ebf2a61f7c348aa03d503b35e0c42b
created new tables for gender, religion, and what kind of relationship the user is looking for in the database where the id correlates to a value
Josh said he got passing a user id to work but said it didn't work with adding profile info and gave a null pointer exception. Trying to figure that out and im pretty sure its not actually passing a user id. Right now user id is set as user_id=Integer.parseInt(urlPath.getUserIDFromPath()); and that is where the error keeps occuring because is if manually set the user id to a number it works. And i have it print out soemthing in the console the line before user_id=Integer.parseInt(urlPath.getUserIDFromPath());
Im going with its definitely not getting a value which is why i keep getting a null pointer exception. I changed a bunch of the code trying to figure that out and i caused a lot of errors in other classes since I changed a lot so im not gonna make a commit, but atleast i know what the problem is now ..
Rather than using getUserIDFromPath() , I think we can just use the getMaxUserID() from MysqlDatabase to get the most recent userID when setting up a new user & creating new User Info. I tested addProfileInfoServlet using that and it worked & added new profile info into the database for that id, while still directing to the correct jsp afterwards.
Like i said though, there wont be a commit from me because i changed a lot of code & created a lot of errors. And i want to talk to Josh about it first too to see what he says.
Changed religion to an int & fixed the Profile View so that it pulls the values from the gender, religion, location & pinfolookingfor tables https://github.com/ajcummins/LinkUp/commit/2b8c05fb8c0e7e22469dc42bb9d68a11c4f226de
added more locations https://github.com/ajcummins/LinkUp/commit/5439fabd4f7ccbd2354325d4c34000956f26f2a6 fixed religion so it is drop down box & gets from database https://github.com/ajcummins/LinkUp/commit/3abfbfffb51efd5d01b452682f93be55f433c999 started picture functionality in html https://github.com/ajcummins/LinkUp/commit/b5168f6a7d7c4cf30019e45574a72ad4984fe486 added more options to ProfileInfoLookingFor in DB & html https://github.com/ajcummins/LinkUp/commit/97ee9a9089eea05ef1cad64d23d5bb8ffb1809b1
Rating system implemented. auto increments rating_id number, stores the users_id # that the actual rating is about and the commment. Doesn't store the rater's user_id because its anonymous. https://github.com/ajcummins/LinkUp/commit/f9150cc9d9a1d5e4bd048e18cd4d66f506c601d8 https://github.com/ajcummins/LinkUp/commit/fc1cf9260380e0f0290ab3b6ed2f5e3d1af46676
removed rate a date from the logged in users profile page, added it to the matches profile page. eliminated asking for the username they want to rate but instead pulls the ratees userid from the url path https://github.com/ajcummins/LinkUp/commit/c95cee465516c2a4686f84e94b88827a81cfdbef
started worked on the comments appearing on your matchsprofile view page https://github.com/ajcummins/LinkUp/commit/7b0ca90b423734686a39a18c09598955c20d4b27
Week of 11/11
Took age out of add_profile info so they can't enter a fake age, and also it threw and error if left blank. Birthdate shows up on profile page now, which is the birthdate they entered when they created their account. Also, created a table in sql for birthdate -> month name conversions https://github.com/ajcummins/LinkUp/commit/028d6721eec1cc778a34a515ff1a71bf7fe776ef https://github.com/ajcummins/LinkUp/commit/26e5596d4f2e8c5d6cb6a633ca95b8f3e972c25b https://github.com/ajcummins/LinkUp/commit/0e0618a16f8c701559cc3239437c08263b06bf11
updated it in matchs profile stuff too https://github.com/ajcummins/LinkUp/commit/d68e52bbaed2926014742952259efcfadb6136a0
removed continue buttons from jsp/html, unnecessary & threw errors when clicked https://github.com/ajcummins/LinkUp/commit/b8f3f660a31aa6f45df0e7bc2d09bbd978f63896
error checking for rating if left empty, also if i exceed the character limit it doesn't add the comment. https://github.com/ajcummins/LinkUp/commit/9097d4b726939ce12f9ffb9db9f35ed5b9faaa34
error checking for add_pro info -> the text area has a maxlength of characters so the user cannot enter anymore than 250 characters https://github.com/ajcummins/LinkUp/commit/b24553bcbbcc33f78e4411332920399c559ce06b
readded age to add_profile info, realized matches was based off that age. created a method in mysqldatabase that calculates the age from todays dat https://github.com/ajcummins/LinkUp/commit/4b80d37fb5aa3dcd31546011cb377d5fde1d5fd3
started edit profile info- basically same set up profile page display, gotta figure out how to get the sql data already in profile info table to display in the textareas in html https://github.com/ajcummins/LinkUp/commit/31a18829e0b3cb2617cbbd1e7d3b74a5b783e9ed
textareas display the profile info that is already in sql, so the user doens't have to re-write all their interests but can just continue from whatever they already had listed https://github.com/ajcummins/LinkUp/commit/f561eaaf424399d3bd85e2dff69cf6544738dba8
textarea saves new info, redirects back to userProfile page after submit clicked (need to do sql delete & reinsert stuff) https://github.com/ajcummins/LinkUp/commit/a22666ff635a18ba0a73d6ca8067d78119e7bf95
took out hardcoded in setupProfileinfo jsp for religion, gender & location https://github.com/ajcummins/LinkUp/commit/9c7c4cf038cc10276dffcaabbcba0868c0d43739
in linkup - profile & profile_testing work with inserting into sql in model - added UserProfile
next task: in persistence -- MysqlDatabase - need to create a gui swing thing where a pop up asked for our username & password to access to the database - security reasons