Announcement Announcement Module
No announcement yet.
Edit a message in my database Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Edit a message in my database

    Hi Internet,
    I have an issue concerning editing a message in my application.
    I have implemented login with users and every user is able to create messages in the application, but now I want to implement so that every user may edit their own messages.
    I have implemented a function so that if a user has messages in the system, these will be listed in a table on a seperate page in a tabel.
    Now I would like to implement a function so that in this view every message will have a "edit" button and this button will link to a new page where the message may be edited.

    I have searched on google for solutions, but without success, if anyone could give me some advice I would be forever greatfull.

    This is my jsp page where the user sees all its own messages, this jsp page should have a "edit" button which will show the user the edit page for that particular message.

    This is my controller, I have not yet implemented any kind of showEditMessage method.

    This is my application if it's to any interest.

    I have the update messgae method already implemented in my messageDao:

    I'm thinking that the edit message page could have exactly the same view as my createmessage jsp:

    Just that it wont create a new message, instead just pass the message which I get to the page, edit it and send it back to the database.

    Thanks in advice!