I have class that holds Tree Items for a Tree. Say the constructor looks like this ViewTreeItem(List item) and can be called like this
for( List l : model.getLists() )
getTree().add( new ViewTreeItem(l) );
My controller ControllerTreeItem uses the List item reference to modify the list directly instead of calling to model to do the work.
Is this OK to change the model in this way? If not how might I do it in an alternative way?
the whole point of MVC is to make the design flexible. i think it would probably be better to have a method in the model which you can use to modify the list instead of modifying directly, as this would negate the whole point of using the MVC pattern.