• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

[ Displaying choices ] Small # of items -- alternatives ?

 
Ranch Hand
Posts: 782
Python Chrome Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a need to display small number of items in select boxes. Most of them are of the binary tuple form.
e.g. service codes
1 = now
2 = tomorrow
3 = next month
I do not want to query the database every time I need to display these in a drop down box ? What alternatives are available to manage these codes efficiently ? Note that ease of editing these codes is vital.
Thanks
Pho
 
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can query the database once, and store the information in a bean available for the whole session.
Then you can have jsp pages for managing and displaying the items.
HTH
reply
    Bookmark Topic Watch Topic
  • New Topic