Return-Path: Delivered-To: apmail-jakarta-taglibs-user-archive@apache.org Received: (qmail 57244 invoked from network); 7 May 2003 10:59:20 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 7 May 2003 10:59:20 -0000 Received: (qmail 4595 invoked by uid 97); 7 May 2003 11:01:21 -0000 Delivered-To: qmlist-jakarta-archive-taglibs-user@nagoya.betaversion.org Received: (qmail 4588 invoked from network); 7 May 2003 11:01:21 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 7 May 2003 11:01:21 -0000 Received: (qmail 57033 invoked by uid 500); 7 May 2003 10:59:17 -0000 Mailing-List: contact taglibs-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tag Libraries Users List" Reply-To: "Tag Libraries Users List" Delivered-To: mailing list taglibs-user@jakarta.apache.org Received: (qmail 56852 invoked from network); 7 May 2003 10:59:15 -0000 Received: from dsl-32-24.dsl.netsource.ie (HELO localhost.localdomain) (213.79.32.24) by daedalus.apache.org with SMTP; 7 May 2003 10:59:15 -0000 Received: from smaug (smaug.aurium.net [192.168.0.66]) by localhost.localdomain (8.11.6/8.11.6) with SMTP id h47AiZe08803 for ; Wed, 7 May 2003 11:44:35 +0100 Message-ID: <042b01c31487$357a8bf0$4200a8c0@smaug> From: "Brian McSweeney" To: "Tag Libraries Users List" References: <20030506174945.85713.qmail@web10002.mail.yahoo.com> Subject: Re: Populating One Based On The Value In Another > > You're correct, of course, James, but I don't want any > SQL in my jsps. The whole point of a front > controller is to get that kind of stuff out of the > JSPs. > > Database access is a back-end process, to be done on > the server side only IMHO. JSPs should only be for > presentation. > > BTW, there's a nice Struts-based idea from Larry > Maturo of Athens Group that might help: > > http://stealthis.athensgroup.com/presentations/Model_Layer_Framework/Struts_ Whitepaper.pdf > > It doesn't save a trip to the server, but it does > accomplish the "populate the second combo box after > selecting the first" goal. > > I'll be refactoring my work to use Struts once I've > got the whole thing working, so I'll probably take > advantage of Larry's technique at that time. > > Thanks - MOD > > --- James Smith wrote: > > You can't go from JavaScript back to JSTL without > > another trip to the > > server; however, you certainly can use JSTL tags to > > create a map within > > JavaScript code, something like this: > > > > > > select ID, Name from tblSomeTable > > > > > > > > > > My JavaScript is a bit rusty but it should look > > something like that. > > Anyway, that whole piece of code makes your page a > > lot larger, and then, > > when a select occurs, you've got to write the > > JavaScript to depopulate your > > second select box and repopulate it with the chosen > > secondSelectHashMapChoice. So it's possible to code > > but it seems fairly > > nasty. The second trip to the server is probably > > much wiser, unless a > > JavaScript guru out there has a brilliant method, > > probably involving forcing > > submits from forms within internal frames hidden by > > moving them off the page > > with CSS-P. > > > > James Smith > > Application Systems Analyst, Treistman Center > > College of Fine Arts, University of Arizona > > > > ----- Original Message ----- > > From: "Michael Duffy" > > To: "Tag Libraries Users List" > > > > Sent: Tuesday, May 06, 2003 9:47 AM > > Subject: RE: Populating One