Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Data Consistency

 
Patrick Mugabe
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have two screens with the same field (i.e it represents a primary key in one table and a foreign key in the other).
The value entered on Screen one should be automatically set on screen 2 when the 'action' button is clicked on screen one.(NB the two screens have been linked with getAppletContext().showDocument("...") .
Further Details:
Screen one has the following fields: name, surname, StudentID, residence, year and an OK Button
Screen two has: StudentID, ProgramCode, NumOfCourses, Semester, FeesBalance and an OK Button.
On clicking OK on screen one, screen two appears but what I now want is to have the StudentID that was put on screen one to be automatically set on Student ID of screen two since these are details of the same student.
I hope I have explained my problem clearly, Sorry ranchers this was too long.
Thanks for your support.
 
Premkumar N
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well .. if I understand properly...
You have the studentID in screen-1 (in some variable.)

Soln : While "instantiationg" or "before showing" screen-2 why not set that screen with thsi variable...
May be u could pass this ID as a param in constructor .. or you could say scr2.setTitle("StudentID")
Hoep this helps .. :roll:
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic