| | |
Updating functionality
Please support our JSP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jan 2007
Posts: 2
Reputation:
Solved Threads: 0
I am using structs to try and get the "update" functionality working.
I have a list of items appearing in the jsp page, "viewItem.jsp" . I am getting this list from the database. At the
moment I am just displaying the item description, but item id is also available in the list.
Code for viewItem.jsp
Every item is clickable i.e. url, which will direct to another jsp page, "enterItem.jsp", which has
the input filed names as "description".
Code for enterItem.jsp
What I am looking for is, that input field "description" in enterItem.jsp gets
populated with the item that was clicked on the "viewItem.jsp" page, so that the description
could be changed, and can be updated for that particular id.
I want to know how can I get this functionality work.
Suggestion or urls are greatly appreciated.
I have a list of items appearing in the jsp page, "viewItem.jsp" . I am getting this list from the database. At the
moment I am just displaying the item description, but item id is also available in the list.
Code for viewItem.jsp
JSP Syntax (Toggle Plain Text)
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="form"%> <html> <head> <title>List</title> </head> <body> <table cellspacing="3" cellpadding="3" border="3" width="500"> <tr> <td><b>Frequencies</b></td> <td><a href="enterFrequency.jsp">Add Frequency</a><br> </td> </tr> <c:forEach items="${requestScope.resultsList}" var="frequencyList"> <tr> <td><c:out value="${frequencyList.description}" /></td> </tr> </c:forEach> <a href="enterItem.jsp"> <c:out value="${frequencyList.description}" /> </a> </table> </body> </html>
Every item is clickable i.e. url, which will direct to another jsp page, "enterItem.jsp", which has
the input filed names as "description".
Code for enterItem.jsp
JSP Syntax (Toggle Plain Text)
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="form" %> <html> <head> <title>Entering New Item</title> </head> <body> <form:form action="/enterFrequency"> <table> <tr> <td colspan="2"><h3>Frequency Entering<h3> </td> </tr> <tr> <td>Description:</td> <td><form:text property="description"/></td> </tr> </table> <form:submit value ="Save"/> </form:form> </body> </html>
What I am looking for is, that input field "description" in enterItem.jsp gets
populated with the item that was clicked on the "viewItem.jsp" page, so that the description
could be changed, and can be updated for that particular id.
I want to know how can I get this functionality work.
Suggestion or urls are greatly appreciated.
![]() |
Similar Threads
- Is Updating Windows Xp Necessary (IT Professionals' Lounge)
- ALL GMail invites to be posted here please! (Geeks' Lounge)
- Updating the cpu drivers question? (Motherboards, CPUs and RAM)
- I can't remove about:blank (Viruses, Spyware and other Nasties)
- adware.mainsearch - how do you get rid of it? (Viruses, Spyware and other Nasties)
- Another Trojan.Bookmarker.Gen (Viruses, Spyware and other Nasties)
- www.lookfor.cc search still buggin me (Viruses, Spyware and other Nasties)
- 35 processes, need to trim the fat (Viruses, Spyware and other Nasties)
- Compaq Presario 1247 FREEZING! (Windows NT / 2000 / XP)
Other Threads in the JSP Forum
- Previous Thread: connection with crystal report
- Next Thread: href is not working properly in jsp
| Thread Tools | Search this Thread |
apache backbutton combobox connection database development directorystructure dynamicpagetitles eclipse frames glassfish ie8 imagetodatabse imageupload integer internet java javaee javascript jsf jsp jsppagetitles levels mvc2 mvcmodel2 network parameters passing ping printinserverinsteadofclient redirect request.getparameter response servlet servletdopost()readxml sessions software ssl state_saving_method stocks sun tomcat tutorial update video web





