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

NX:Booking A Contractor

 
Tony Collins
Ranch Hand
Posts: 435
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just wondering how people booked a contractor, in contractors.
Did you allow the CSR to write the number to the JTable field and then press book, or have a field in the GUI to add number to and then press book to allow the row in focus to be booked.
Additiionally should we also check if the booking number is 8 bytes long?
Tony
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
User presses "Book Selected Contractor" button. If no contractor is selected, they get a "You must first select a row" popup message. If one is selected (I only allow one at a time; may change that) then a dialog comes up asking the customer ID to book the contractor to. This is populated by the last value used, as default. So the first time they book a record, they type in the customer ID; subsequently they can just hit "OK" if they don't need to change to a different customer ID.
Additiionally should we also check if the booking number is 8 bytes long?
Apparently Sun has said that it's Ok if the number is less than 8 characters. However it can't be greater than 8, and the GUI will give an error message if length is greater than 8.
 
Tony Collins
Ranch Hand
Posts: 435
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cheers Jim, sounds like a good strategy.
Tony
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12012
218
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tony
I disabled my button if no row was selected, so the user could not click it, and then enabled it if they clicked on a row. If they double clicked on a row, it acted as though they had clicked on the row then clicked on the button.
Also, it is very easy to write an extended JTextField with it's own Document that will ensure that the user can only enter numbers, and cannot enter a number greater than 8 digits. You could look at the Sun tutorial on creating a validated text field for some ideas.
Regards, Andrew
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic