This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Confusion with Requirement on UI  RSS feed

 
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
 
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
 
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!