// create ConsumerStructureProvider and register it to listen to page events
POMSessionManager sessionManager = (POMSessionManager) container
.getComponentInstanceOfType(POMSessionManager.class);
PortalStructureAccess structureAccess = new MOPPortalStructureAccess(sessionManager);
MOPConsumerStructureProvider structureprovider = new MOPConsumerStructureProvider(structureAccess);
listenerService.addListener(EventType.PAGE_CREATED, structureprovider);
listenerService.addListener(EventType.PAGE_DESTROYED, structureprovider);
listenerService.addListener(EventType.PAGE_UPDATED, structureprovider);
listenerService.addListener(DataStorage.PAGE_UPDATED, structureprovider);