• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Confusion with Requirement on UI

 
jyothi ve
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
The sun requirement says
The user should be able to select the origin and destination of flights, and the display should update to show only flights that satisfy those criteria. The user must be able to describe enter the string value "any" for the origin, destination, or both, so as to implement a wildcard-like feature.
I am in bit confusion with above spec. I divided above with 2 points
1. The user should be able to select the origin and destination of flights
2. The user must be able to describe enter the string value "any" for the origin, destination, or both, so as to implement a wildcard-like feature.
From the point(1), I am thinking of using combo boxes for selecting Origination & Destination Airport locations.
If I use the JCombo boxes how can I do the point(2) i.e how can the user enter "any" or "wildcard-like feature".
Since I am thinking of filling the Jcomboboxes directly from the "db" data, I am in confusion with this requirement.
I appreciate if somebody can clarify the above requirement. Probably I may be interpreting wrong.
Thanks
Jyothi
 
Ian B Anderson
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
With a combo box you would fill it by selecting all the distinct values from the database. Since you wouldn't know how many going to values you were return you would probably use a Vector to store the results. Why then don't you just add your "any" wildcard to the Vector before you begin your search for distinct values.
How you dealt the the "any" in criteraFind() would be up to you.
Hope it helps
Ian
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nothing stops you from adding an "ANY" entry to your combo box and treating it as a special case. By the way, I'm not so sure it's a good idea to handle it in criteriaFind() itself - arguably, it's a user interface feature rather than a Data API feature.
- Peter
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic