• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

URLyBird Book room / room details window

 
Piotr Nowicki
Ranch Hand
Posts: 611
1
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy Ranchers!

I've read that Roel implemented the room details window which is showing when booking room action is triggered (did I understand it correctly Roel?)

Well, the major advantage is it shows the future improvements for the GUI are very easy to do - the same windows opens when user wants to add a room, update, etc. It is also a confirmation for the user who wants to book, unbook or delete the record.

What I would like to know if more of you guys implemented the room details view, as a confirmation for the user?
Or did you just view client ID input dialog when user hits 'book' button?

Roel one more question - when the user wants to book a room, you show him the room details (as a way of confirmation, like 'are you sure you want to book THIS room?')? And after the bunch of read-only room variables you present editable customer ID field?

Thanks in advance for help guys!

Cheers!
 
Piotr Nowicki
Ranch Hand
Posts: 611
1
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, meanwhile I've implemented the room detail window as a JDialog which has a JOptionPane as a content (to give default L&F buttons). I just allow the user to provide Customer ID. The validation happens when user hits 'OK' button and it only checks if user typed customer ID value is a 8 digit one.

If so, it notifies the parent (main client window) and sends the room object as a response. The main client window is responsible for executing apropriate action to the controller (in this case just takes the customer ID and executes bookRoom(-) operation from the service, but as a Room object is returned it could be used to create, update or any other operation where Room is used).

As a observer pattern I've used Java Observable subclassed and my own RoomOperationEvent which is transported as an object when observable notifies observers.
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Pedro,

Sorry for the late answer, but I was on holiday for a week.

You are correct: a CSR can select a room from the table and hit the book button. Then a dialog is opened with the room details where the CSR must enter the customer id. That's the only field in the dialog that's editable. All other fields (with the room details) are read-only. When the user clicks 'OK', then the id is validated and the booking is send to the server (which validates if the room is still bookable,...).
This dialog can be easily reused for inserting, deleting, updating, unbooking,... rooms and gives the CSR a consistent user experience of the application, which is (in my opinion) a big advantage.

Kind regards,
Roel
 
Piotr Nowicki
Ranch Hand
Posts: 611
1
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy Roel,

Hope you did rest well on the holidays :-)

Thanks for the information - the overall flow of the process is the same :-)

Cheers!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic