This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get search criteria:Field vs ComboBox

 
Leo Tien
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On the GUI design, whitch the best way to get the search criteria? I want to provide one field allow the user enter the criteria text. But someone suggest use ComboBox or other component prevent the use enter any text. I think, if accept the last one, how can I define the search criteria? Whether read the data from proper field of the db.db file, then pass it to ComboBox, if so, must need refresh the client GUI when the server side is modified, don't this make the system more complex?
 
Miguel Roque
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Leo.
Use combo's instead of text fields. Combos are more user friendly and doesn't allow errors of input. Regarding how to fill the combo's, you fill them when the application starts only. You don't need to complicate your design and trigger a new read when the database changes. If you read the requirements of FBN assignment, Sun says that you don't need to provide live update when someone else reserves a seat so this can also be used here.
Miguel
 
Leo Tien
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Miguel, thanks for your reply.
Now I have another question, how can I define the search criteria of the Combo? If there are ten thousand records in the db.db file, the criteria will be terrible, How you do this?
Thanks.
 
Leo Tien
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whether my statement is blur. My question is if i use ComboBox to support search criteria mechanism, how to define the item in ComboBox, in other word to define the criteria text?
For example, if there is a record and it's name field's value is "foo" in the db.db file, then I will support the search criteria as "fo" or "f" or "foo", but there is another record named "far", how I can do? Support "fa" , "f", "far"? If this, if there are ten thousand records in the db.db, should i define thirty thousand search criteria text? If the name field name is longer, it's terrible!
Am I right??? How do you make this??
Thanks.
 
mao lao
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SUN says
Note that only exact matches need to be handled

so if db.db has "foo", only "foo" needed
also I think u need use distinct, so 30 thousands record do not mean 30 thousands items in your combobox
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic