Many-to-many checkboxes revisited
by Dave Harms
Some years ago I wrote a class to make it easy to maintain many-to-many linking data via checkboxes when using two browses on a window. In the following screen shot there's a list of students on the left and a list of courses on the right, and the checked boxes indicate the presence of a linking record between those two files.
Although I still have an app that uses this class, I hadn't thought about it in years, until I got an email from a reader who was having problems with using the class in a way I hadn't anticipated.
I don't know what happens to you when you look at old code, but I usually get an overwhelming urge to refactor.
Read the ongoing story in the links below.
- Many-to-many checkboxes revisited, part 5: Persisting the data
- Many-to-many checkboxes revisited, part 3: More UI code
- Many-to-many checkboxes revisited, part 2: The UI code
- Many-to-many checkboxes revisited, part 6: Managing the link data
- Many-to-many checkboxes revisited, part 12: The template
- Many-to-many checkboxes revisited, part 9: From user input to persister and back
- Many-to-many checkboxes revisited, part 1: The original example
- Many-to-many checkboxes revisited, part 4: Wrapping up the UI code
- Many-to-many checkboxes revisited, part 10: A summary before moving on
- Many-to-many checkboxes revisited, part 7: The persister class
- Many-to-many checkboxes revisited, part 8: The persister class unit test
- Many-to-many checkboxes revisited, part 11: Attaching to an ABC browse