I have a small problem with several solutions, but I don’t like any of them. I appreciate ideas / suggestions:
A TableListBox with its respective TableListBoxModel.
I’ve implemented “cellClicked” on the model, and in response to the click I add an item to the model. This means that the TableListBox needs to update its contents (because on creation of this item, I need to create a custom component for that cell), yet the TableListBoxModel doesn’t have a way to inform its TableListBox.
I’ve thought about adding a “setOwner” or something like that, to the model, so that it can “call back” and update the view, yet that defeats the purpose of the MVC design. I guess that the main issue is that the model is getting the click messages, instead of the view (well, in fact is the row that gets the message and then calls down to the model, but the proper solution would mean that I subclass the RowComponent, implement the mousUp method and perform the update right there. Doing this would mean I also have to implement a custom TableListBox which deals with / and creates my custom RowComponent instead of the default one. I find this solution way too complicated for such a simple (and perhaps common?) need.
Any suggestions? Any easier approaches?