Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Do you show record number in GUI ?

 
Alan Morgan
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(URLyBird 1.1.3)

Hey guys,

Doing a bit of work on the GUi at the moment and have a question.

I select a row and press the "Book" button.
My Controller has a book(int recordNum, int custNum) method.
This then calls down to the Data layer and locks the record, updates the Owner field with Customer Number and then unlocks the record.

My question is where do I get the recordNum that I pass to Controller.book ?

I have not been showing it in the UI so far.
I have the record number that is associated with each record in the Controller when I do a search.
But not sure of best way to go.

Thoughts ?
 
Titus Barik
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Alan Morgan:
(URLyBird 1.1.3)

Hey guys,

Doing a bit of work on the GUi at the moment and have a question.

I select a row and press the "Book" button.
My Controller has a book(int recordNum, int custNum) method.
This then calls down to the Data layer and locks the record, updates the Owner field with Customer Number and then unlocks the record.

My question is where do I get the recordNum that I pass to Controller.book ?


Your JTable or TableModel knows about the recordNo, just make it hidden so that it doesn't appear as a column in JTable.
 
Zee Ho
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, I suggest you to treat the record number as a invisible column of your JTable. It will provide u a clearly control to your record. especially, if you want to use a pop up window to update all the related message.
[ May 21, 2005: Message edited by: Zee Ho ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic