File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes [B&S] Caching the name and location Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "[B&S] Caching the name and location" Watch "[B&S] Caching the name and location" New topic

[B&S] Caching the name and location

Samuel Ittera

Joined: Jun 09, 2006
Posts: 9
I call a funtion on initialization to get all the contractor's name. I populate the name combo box used in my search panel with this. I do the same for location. I only allow the name and location to be searched. Since I only allow the client to book and search, I know the list won't change. Can anyone give me their thoughts on this approach?
Jeroen T Wenting
Ranch Hand

Joined: Apr 21, 2006
Posts: 1847
risky. Right now there's only one type of client on that database engine.
But that's hardly guaranteed to last, in the future another client might be created (or this one expanded) that can enter new records for new contractors.

It's your decision whether you want to be prepared for that or not of course.

Myself, I've not used dropdowns at all. The user can type in search terms which are then sent to the server which uses them to filter the data.

Sam Codean
Ranch Hand

Joined: Feb 26, 2006
Posts: 194
I too prepopulate the Combo Boxes in the initial stages but then i refresh this "Meta data" every time i get some results from the server and that will take care of refreshing the data at every search.

It is risky to only populate at the initial stage what if the a certain hotel gets filled within the time you have launched the client. It is very likely that the CSRs do not launch the server every time they want to book. They will only launch it once in the morning.

Try adding a refresh method that will refresh the data for these combo box.

-Sam Codean<br />SCJP 1.4 (98%)<br />SCJD 5.0 (87.5%)
I agree. Here's the link:
subject: [B&S] Caching the name and location
It's not a secret anymore!