• 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
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Search Components on Client Screen

 
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How are people approaching the use of search components on the client screen? Just textboxes or combo boxes?
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm using 3 combo boxes: origin, destination, and day. A guy I work with got a perfect GUI score; he did those 3 plus "max. price". I left out max price since the assignment said we only had to look for exact matches, and doing numbers would take extra work.
 
Terry McKee
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That was my thought also...to have combo boxes, but how are you populating the values for them. Are they hardcoded or read in from a file?
 
mitchner green
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I populate them by creating a list of all the origins and destinations currently on the database. By using TreeSet, I built, sorted, and returned the list in 10 lines of code.
I think dynamically building the list is the only way to go since you want the drop-downs to change as new flights with new airports are added. I hard coded the days of the week.
 
Terry McKee
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was thinking about loading them from the datasource, but I didn't want to make to many assumptions about the size of the datasource. Are you loading the fields on separate threads upon server startup?
 
mitchner green
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, I'm not using any extra threads for this purpose.
At first I considered loading them from the datasource, but since the GUI starts with all the flights anyway, I had no need to make the extra server call. In the GUI constructor, I use the data that is in the table and get the unique values from that. That way there is no additional load placed on the server.
 
Arch enemy? I mean, I don't like you, but I don't think you qualify as "arch enemy". Here, try this tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic