I have a view which contains a menu, it allows you to browse 5 different sections depending on where you click. When you click you are not changing page, you are hiding the other sections and showing the one you asked. It is required that everything occurs under the same Place.
From the View is simple and clean as each section is a different class and visually they are mutually exclusive. I access the controls of each section by "getting" the section itself
From the Presenter is a mess, I am having to register the handlers on the onBind() method for all 5 sections on that single presenter class, and all the logic of the events goes there as well, event handlers are beginning to conflict with similar names.
How can I break down the Presenter as I'm doing with the Views?
view Example
public interface MyView extends View {
public DeviceSettings getDeviceSection();
public Reports getReportsSection();
public License getLicenseSection();
public Support getSupportSection();
}
You can create PresenterWidgets/Views for each of your sections and then inject them into your MainPresenter.
You add handlers to your menu and then based on what is clicked just add/remove the corresponding PresenterWidget to your content slot.
You can check out the nested presenter example.