Created per Servlet to represent either an item or a (sub)menu
Menus can be created independently from WPages, used for despatching.
Menus are currently three levels -- url mapped as /context/servlet/parentMenu/MenuItem.swb.
WARNING. Menus are created per (global) servelet, must not have any per wpage instance information.
The static WPageStructure.getThreadPage provides that.
Menus are not shared between servlets, so they do have a context and servlet name.
It is the WServlet that sets the page.menu and page.pageItem based on the URL used to
find it.
If the page is defined on multiple menus this may or may not be correct.
But adding the same page to multiple menus is confusing to the user and so a generally bad idea.
WARNING These are generally Global (ie final values), see WGlobalState.
Do not modify them on a per page basis, but do refer to them using
WPageStructure.getPageItem etc. in case there are local coplies.
|