Loading Views Question

In my UI I have the following …

    vInventoryHierarchy = new V_Inventory_Hierarchy(presenter, bus);        
    vInventory  = new V_Inventory(presenter, bus);

    navigator.addView("Inventory Hierarchy" , vInventoryHierarchy);
    navigator.addView("Inventory" , vInventory);

vInventoryHierarchy and vInventory are views.

It seems I must have an instantiated view before I put that view in a navigator.
This means it’s constructor is called.
And it seems too, that the ‘enter’ method is called.
So the views are ‘fully initialized’.

I was hoping to wait until a user clicked on a menu item before fully inititializing views - because data is being needlessly loaded from SQL

So the question is, can I lazy load views somehow?

Next Question. Construction starts the first ‘enter’, so if I want to use the ‘enter’ to lazy load, I would put a counter in the view ‘enter’ and on the 2nd entry, then load data?

Well, you have several options to do this. But what about creating the layouts and building blocks in the constructor or via some initialize() method right after calling constructor? Alternatively, you could of course do this on the enter() method, something like this:

@Override
public void enter(ViewChangeEvent event) {
    if (!initialized) {
        initalizeLayouts();
    }

    if (!isDataUpToDate) {
        updateData();
    }
}

This is just the first thing that popped into my mind.