• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

My idea about get field value.

 
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I use drop down box to support search criteria. So I must get all values of name and/or location field form db.db file. Since this, I think get all values of the others fields too, store them in the memory, such as a Vector. But I afraid if there are a lot of records, this will be a hard work, especially in network environment.
I don't know whether my idea OK? If not, what will I do?
 
author and jackaroo
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Leo,
The individual records are very small, so you will need to read an awful lot of them in order for it to have an impact on the network (or the network on your application's responsiveness).
But if you were concerned, you could try adding a server side method that only returns unique values for a given column. That way there will be less network traffic.
Personally I don't think you need to worry about this though.
Regards, Andrew
 
Ranch Hand
Posts: 435
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I used my findByCriteria method put all the individual fields in a TreeSet to sort them and root out duplicates, then used toArray to return an array of Strings. Works Fine.
Tony
 
Leo Tien
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Andrew, thanks Tony.
 
Ranch Hand
Posts: 493
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Tony,
You wrote:


I used my findByCriteria method put all the individual fields in a TreeSet to sort them and root out duplicates, then used toArray to return an array of Strings. Works Fine.
Tony


I also did it this way except that I didn't use a TreeSet and my drop-downs come out unsorted. I will change my code to use a TreeSet instead. Thanks. By the way, I only refresh the drop-downs (combo boxes) when the user retrieves "all" records with no selection for name or location. Any thoughts on that?
Regards.
Bharat
 
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bharat,

By the way, I only refresh the drop-downs (combo boxes) when the user retrieves "all" records with no selection for name or location. Any thoughts on that?


I understand that your search criteria comboBoxes need some "refresh" functionality (records may be created, updated or deleted by another application with as consequence that your criteria values are not up to date anymore). But why to couple it with the "search all" function ? I don't see any logical relation between both events (the user deciding to retrieve all records, and the need to refresh the search criteria). Did I miss something ? If not, I think that some "refresh" button could do the job.
Best,
Phil.
 
Bharat Ruparel
Ranch Hand
Posts: 493
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Phil,
You wrote:


I understand that your search criteria comboBoxes need some "refresh" functionality (records may be created, updated or deleted by another application with as consequence that your criteria values are not up to date anymore). But why to couple it with the "search all" function ? I don't see any logical relation between both events (the user deciding to retrieve all records, and the need to refresh the search criteria). Did I miss something ? If not, I think that some "refresh" button could do the job.


Thanks for your response. I wasn't really sure what should I do. I figured if I let the user retrieve all records whether they are booked or not (except the deleted off-course), and refresh the combo-boxes at the same time. Why not? Saves me a "Refresh" button. Moreover, do the specs say otherwise? I am not sure. You may be right.
Regards.
Bharat
 
Philippe Maquet
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bharat,
I think that the CSR's will use at least the "location" search criteria most of the time. If they don't find a room to book for a specific location, and if (we don't know from our instructions how/when new records are added to the db) they know that new records may be added while they are working, they'll want sometimes get a "fresh" list of search criteria values. If the only way you offer them to achieve that is to query the db for all records (which they don't need BTW), I am not sure they'll find it user-friendly. Just try to explain that in your user manual and ...
In theory, the best solution IMO is to get the criteria values automatically updated as needed, but, after analysis, I found it too complex to be implemented.

if I let the user retrieve all records whether they are booked or not (except the deleted off-course)


How do you justify the fact that you show booked rooms along with bookable ones ? After all, the CSR's job is just to book rooms, and the latter must be available for booking.
BTW, did you take into account the 48 hours restriction ?
In my implementation, I will show only rooms available for booking. These are :
  • Not deleted
  • Not booked yet
  • With a date which is neither past nor outside the 48 hours time range


  • I intend to make that range parametrable.
    I wondered if some "unbook" function had some sense (which would justify the fact that the user may see booked rooms), and my conclusion was that it is not a good idea. On the other hand, I think that some "undo" function is more interesting : a user would be able to unbook a room booked by him, as far as it is still "undoable" (operation still in some fixed-size "undo" buffer maintained server-side and the record(s) envolved didn't change in the meantime). When the user would call undo, he'll have to select which operation(s) to undo within a list and confirm it. What do you think about it ?
    Regards,
    Phil.
    [ September 07, 2003: Message edited by: Philippe Maquet ]
     
    Bharat Ruparel
    Ranch Hand
    Posts: 493
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hello Phil,
    Thanks for the response and sharing your thoughts. I will think it over and get back to you by tomorrow.
    Working late tonight in France? It is 4 PM here in Boston.
    Regards.
    Bharat
     
    Philippe Maquet
    Bartender
    Posts: 1872
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi Bharat,
    It's 10 PM here in Brussels (BTW I am in Belgium, not France - OK it's very close, anyway much closer than Boston to India where I imagined you were living ). I'll stop working for today. "See" you tomorrow then.
    Best,
    Phil.
     
    Tony Collins
    Ranch Hand
    Posts: 435
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    But is that French brussels or Dutch brussels ?
    I've heard they don't mix.
    Tony
     
    Consider Paul's rocket mass heater.
    reply
      Bookmark Topic Watch Topic
    • New Topic