Matt Raible wrote:

As far as drop-downs, I typically populate all (or most) of mine from a database at application startup using a ServletListener. I stuff these into the application scope as Lists of LabelValue beans. Then I code up a ReloadAction that can call my Listener to reload them all. I've found this useful so I don't have to restart the app if data changes. If I have edit screens for the drop-downs, I'll replace the List in application scope after saving.

I haven't done much (anything?) with servlet listeners--what's the advantage to doing it this way as opposed to a servlet.init that loads on app startup? Generally what we've done is to have a thread that checks a flag that signals DB changes that then calls the same code to reload everything. I'm not too involved with that part of the code though.


(We store a LOT of information in the DB as we do not have access to the production servers. The more we keep in the DB the better off we are. I even keep some Jython scripts in there and almost had them convinced to keep classes, but sanity prevailed :)

Dave



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to