Frage

I red google-gwt article about MVP and would like to ask about how you are creating the view layer. Suppose you have three different "elements" on one view, the Tree, the Table and Text. And now I think the best practice is to create these three elements decoupled (I mean that, if I don't want Tree "element", in my view, I would comment the line, with for instance setTree(...) in code, somewhere). Also I would like to use UIBinder for creating each of the "element"

So my questions are: Who should be responsible for creating such decoupled element like Tree or Table (Controller, Presenter or may View)

and

Who is responsible for setting such elements to the View?

War es hilfreich?

Lösung

The view should be responsible for assembling the widget components it needs. Your view class will be the one with a corresponding UiBinder file, and in that file you can combine a Tree, Table, and Label (or whatever).

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top