posted 21 years ago
I need this becos, in my implementation, I use recNo as primary key.
Even I dont use it, my APIs (given by SUN) all required the input of recNo.
Thus, I guess the records should include this.
But then, I dont think it is a good idea for displaying the recNo in the GUI, becos recNo is not in sequence (if some of them are marked deleted).
So, at the beginning, I create a RecordModel, which defines only 7 fields.
But in fact, when I added a record, it contains 8 fields.
So, the last field (recNo) is not recongized by the JTable.
When I click one row in the JTable, I get the index, refer it to the RecordModel, and then get the value from the "hidden" field.
However, I think it may not be so good becos I should indeed get the "recNo" from the View, NOT the MODEL.
Any suggestions?
Thanks a lot.
SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)