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?