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.
1. Is it sufficient to provide only the Origin and Destination airport fields for users to search by, or should other fields too be provided (day, carrier, flight num...)? 2. Should the user be able to type in "any" in the drop down or can it be coded to be one of the items in the JComboBox? Thanks.
Hi Sathya I also provided the Carrier field (because it was shown in the example for the findByCriteria). But those who only provided the specifically required fields have passed with good marks. I had "any" (in lower case) as the first item in my combo boxes. Regards, Andrew
Thanks Andrew. Just one more clarification. When you say you had provided "any" as the first item, the user can only choose it and not enter it right? To rephrase, the JCombo is not editable, correct? I was concerned because Sun's instruction is worded as "describe enter". This seems to imply that the user should be able to type "any" in the drop down. But if it is ok to make it part of the drop down, I'll go this way.
Hi Sathya, I would put some "[ANY]" as the first item of your combo boxes, instead of "any". It tells the user that it's a special query value, I think it's a quite standard way of doing (at least on Windows), and you have no (or less) risk that that value compete with the some database field value. I wouldn't make them editable, except if you want to implement some incremental search feature while typing. But it probably be overkill (I really don't know because I'll just begin with the GUI part and I don't know Swing yet). Best, Phil.
posted 16 years ago
Hi Phillipe, Yes, I agree with you that "any" should be displayed appropriately to visually denote it's special nature (of being a wildcard). And nope, presenting an editable JCombo for incremental search is not essential for the assignment, though it could be a value added offering. So will stick to a vanilla plain drop down for the search criteria. Thanks, GSS
When you say you had provided "any" as the first item, the user can only choose it and not enter it right? To rephrase, the JCombo is not editable, correct?
Correct. It was just the first option to be chosen. The user could not manually enter a value. I like Philippe's suggestion of visually differentiating the "any" from all other values. I didn't do this since lowercase "any" was already different from all the uppercase origin and destination TLAs. I did ensure it was lowercase though, since uppercase ANY is a valid airport code (somewhere in America). Regards, Andrew