Thanks Carklin... any idea where can I get the jstl tag library from? -----Original Message----- From: Joel Carklin [mailto:jc@;GAMBIT.CO.ZA] Sent: Tuesday, November 12, 2002 8:20 AM To: [EMAIL PROTECTED] Subject: Re: List box and database tables
I would use the jstl iterator tags as in something like: <SELECT name="theListBox"> <c:forEach items="${aList.or.hashmap.from.the.database}" var="item"> <OPTION value="<c:out value='${item.key}'/>"> <c:out value='${item.value}'/> </forEach> </SELECT> Likewise you can set the value of a text box using the c:out tag as in <INPUT type="text" name="firstnameorwhatever" value="<c:out value='${objectEncapsulatingData.firstname}'/>" > the objectEncapsulatingData is a javabean which gets the data from the database and has a getFirstname method... hope this helps... > Hi all - I have a form that includes a list box, and I want to populate the > list box from my database table, is there a way to do this? any code > snippets/examples? > I also want to populate the rest of the text boxes from the table fileds, as > the user chooses a specific name from the list box. For example, the list > box will contain the filed for the table users, if I choose 'Gregg', then I > want the fields that belong to Gregg to fill the rest of the input text > boxes automatically, so the user will not need to fill them in again!? > > Thanks > > =========================================================================== > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com > =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com