• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Search Components on Client Screen

 
Terry McKee
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are people approaching the use of search components on the client screen? Just textboxes or combo boxes?
 
mitchner green
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic