Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC-3 Why doesn't ......

 
Carol Murphy
village idiot
Bartender
Posts: 1202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can edit videos, but I am still struggling with getting the fields to print with the proper input when the edit button is selected, and I also want this servlet to act like AddVideo, but I am having trouble with this. Should I be trying to get this servlet to print out a page that lets the user know the video has been edited just like the page that gets printed when a video has been added? Because if I don't need to do this, I'll stop trying. It's making me nuts!
 
Peter Gragert
Ranch Hand
Posts: 424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do not know if it is a 'must'. My solution
printed (sent html code)
JDBC ... Video edited
------------------------------
button for add
button for list
 
Manju Jain
Ranch Hand
Posts: 168
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just sent in my first attempt, so not sure of what's the best way to do it.
I use the same AddVideo for both adding and editing. If everything's ok then it prints whether the video has been added or updated in a new page.
As for the values not getting printed properly, check for spaces in the field values and replace like ReverseServlet.
 
Marilyn de Queiroz
Sheriff
Posts: 9059
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Should I be trying to get this servlet to print out a page that lets the user know the video has been edited just like the page that gets printed when a video has been added?

Yes
 
Carol Murphy
village idiot
Bartender
Posts: 1202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Darn. I was afraid of that. But I think I may have arrived at a new solution. The one I was trying would print the pages like I wanted, but the videos wouldn't edit. When I can edit the videos, then the pages won't print like I want. Oh bother.
 
Carol Murphy
village idiot
Bartender
Posts: 1202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I wrote some code that will print out the form with the required fields filled in. That part works fine. When the submit button is clicked, I still don't get my message page. I keep getting the about 1/3 of the form printed out, then it quits due to a missing parameter. This is irritating, because I know what I have to do, but I can't seem to come up with a boolean that will allow me to test for which page to print. And the video will still edit! I am kinda confused.......
 
Manju Jain
Ranch Hand
Posts: 168
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Carol, it is html magic field: hidden field came to my rescue. Pass one when you want to update the edit video and use it to determine which message ought to be printed.
 
Carol Murphy
village idiot
Bartender
Posts: 1202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah yes, the hidden field... Well, I was able to accomplish the task, but I had to use 2 classes instead of one.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic