GWT Editors framework - ListEditor, removing items, MVP violation

自闭症网瘾萝莉.ら 提交于 2019-12-03 16:13:08

Either approach is fine.

MVP is not set in stone (it's not even defined; it was coined by Martin Fowler but he retired the term in favor of two more specific patterns), so you're only violating the rules you gave to yourself. Put differently, the Editor framework as a whole can be seen as violating MVP: each editor know the model, not necessarily the exact instance it's editing (as with ValueAwareEditor or LeafValue), but at least the kind of objects it's an editor of.

FYI, we do it using indexes. It matters more that it's guaranteed to work than that it "looks good" (even though it's obviously better if it also looks good).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!