Java Code Examples for com.vaadin.navigator.Navigator

The following are top voted examples for showing how to use com.vaadin.navigator.Navigator. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: svgexamples   File: MyUI.java   Source Code and License 6 votes vote down vote up
@Override
protected void init(VaadinRequest vaadinRequest) {
    setNavigator(new Navigator(this, (View view) -> {
        tabs.setSelectedTab((Component) view);
    }));

    registerExample(SvgInVaadin.class);
    registerExample(SimplyAsAnImageOrIcon.class);
    registerExample(FileExample.class);
    registerExample(AnimationExample.class);
    registerExample(Java2DExample.class);
    registerExample(JungExample.class);

    getNavigator().setErrorView(SvgInVaadin.class);
    tabs.addSelectedTabChangeListener(e -> {
        if (e.isUserOriginated()) {
            getNavigator().navigateTo(e.getTabSheet().getSelectedTab().getClass().getSimpleName());
        }
    });
    String state = getNavigator().getState();
    getNavigator().navigateTo(state);

    tabs.addStyleName(ValoTheme.TABSHEET_PADDED_TABBAR);
    setContent(tabs);
}
 
Example 2
Project: esup-ecandidat   File: SubMenuBar.java   Source Code and License 6 votes vote down vote up
/** Selection d'un element du sous menu
 * @param menu
 * @param vue
 */
public void selectSubMenuSheet(Menu menu, String vue,Navigator navigator, Boolean cleanListener){
	if (cleanListener){
		/*Suppression des listeners du tabSheet-->Sinon lorsqu'on ajoute un élément, il navigue donc boucle*/
		cleanTabSheetListener();
	}
	/*Suppression des listeners du tabSheet-->Sinon lorsqu'on ajoute un élément, il navigue donc boucle*/
	cleanTabSheetListener();
	menu.getSubMenu().forEach(s -> {
		if (s.getVue().equals(vue)){
			this.setSelectedTab(s.getLabel());
		}
	});
	/*Ajout du listener*/
	if (cleanListener){
		addTabSheetListener(navigator);
	}
}
 
Example 3
Project: vaadin-javaee-jaas-example   File: JaasExampleUI.java   Source Code and License 6 votes vote down vote up
@Override
protected void init(VaadinRequest vaadinRequest) {
    final VerticalLayout contentArea = new VerticalLayout();
    contentArea.setMargin(false);
    setContent(contentArea);

    final Navigator navigator = new Navigator(this, contentArea);
    navigator.addProvider(viewProvider);
    navigator.setErrorView(InaccessibleErrorView.class);

    String defaultView = Page.getCurrent().getUriFragment();
    if (defaultView == null || defaultView.trim().isEmpty()) {
        defaultView = SecureView.VIEW_NAME;
    }

    if (isUserAuthenticated(vaadinRequest)) {
        navigator.navigateTo(defaultView);
    } else {
        navigator.navigateTo(LoginView.VIEW_NAME + "/" + defaultView);
    }
}
 
Example 4
Project: garantia   File: LoginUI.java   Source Code and License 6 votes vote down vote up
@Override
protected void init(VaadinRequest request) {
	log.info("Levanto la pagina UI");
	
	final VerticalLayout root = new VerticalLayout();
       root.setSizeFull();
       root.setMargin(true);
       root.setSpacing(true);
       setContent(root);
	
       final Panel viewContainer = new Panel();
       viewContainer.setSizeFull();
       root.addComponent(viewContainer);
       root.setExpandRatio(viewContainer, 1.0f);
       
       Navigator navigator = new Navigator(this, viewContainer);
       //Navigator navigator = new Navigator(this, this);
       navigator.addProvider(viewProvider);
       
       log.info("Termina de levantar la pagina UI");

}
 
Example 5
Project: VaadinSpringShiroMongoDB   File: MainScreen.java   Source Code and License 6 votes vote down vote up
public MainScreen(MyUI ui) {

        setStyleName("main-screen");

        CssLayout viewContainer = new CssLayout();
        viewContainer.addStyleName("valo-content");
        viewContainer.setSizeFull();

        //final Navigator navigator = new Navigator(ui, viewContainer);
        final Navigator navigator = new DiscoveryNavigator(ui, viewContainer);

        navigator.setErrorView(ErrorView.class);
        menu = new Menu(navigator);
        menu.addView(new SampleCrudView(), SampleCrudView.VIEW_NAME,
                SampleCrudView.VIEW_NAME, FontAwesome.EDIT);
        menu.addView(new AboutView(), AboutView.VIEW_NAME, AboutView.VIEW_NAME,
                FontAwesome.INFO_CIRCLE);

        navigator.addViewChangeListener(viewChangeListener);

        addComponent(menu);
        addComponent(viewContainer);
        setExpandRatio(viewContainer, 1);
        setSizeFull();
    }
 
Example 6
Project: MetricsToGo   File: MetricsToGoUI.java   Source Code and License 6 votes vote down vote up
private void present() {
	context = new ClassPathXmlApplicationContext(new String[] { "./applicationContext.xml" });
	Set<Class<?>> pages = getAllPages();
	System.out.println("Pages found: " + pages.size());
	ArrayList<PageController> annotations = getAnnotations(pages);

	MetricsToGoVaadinUIController controler = new MetricsToGoVaadinUIController(context, pages);

	setContent(contentPane);
	Navigator navigator = new Navigator(this, centerContent);
	System.out.println("Annotations size:" + annotations.size());
	pages.forEach(System.out::println);
	annotations.forEach(System.out::println);
	annotations.stream()//
			.peek(System.out::println).forEach(page -> navigator.addView(page.id(), controler));

	initSidebar(navigator, annotations);
	contentPane.addComponent(centerContent);
	contentPane.setComponentAlignment(centerContent, Alignment.MIDDLE_CENTER);

	navigator.addView("main", controler);
	navigator.addView("", controler);
}
 
Example 7
Project: MetricsToGo   File: MetricsToGoUI.java   Source Code and License 6 votes vote down vote up
private void initSidebar(Navigator navigator, ArrayList<PageController> pages) {
	Sidebar sidebar = context.getBean(Sidebar.class);

	ArrayList<Controller> controller = new ArrayList<>();
	pages.stream().map(page -> new Controller(page.id(), page.name())).forEach(controller::add);
	sidebar.setNavigator(navigator::navigateTo, controller);

	contentPane.addComponent((Component) sidebar);
	contentPane.setComponentAlignment((Component) sidebar, Alignment.TOP_LEFT);

	Label spacing = new Label();
	spacing.setWidth(2, Unit.REM);

	contentPane.addComponent(spacing);
	contentPane.setComponentAlignment(spacing, Alignment.TOP_LEFT);
}
 
Example 8
Project: KrishnasSpace   File: VaadinUI.java   Source Code and License 6 votes vote down vote up
@Override
protected void init(VaadinRequest request) {
	final VerticalLayout mainLayout = new VerticalLayout();
	HorizontalLayout horizontalLayout = new HorizontalLayout();
	CssLayout viewLayout = new CssLayout();
	Page.getCurrent().setTitle("Vaadin Demo");
	mainLayout.setSizeFull();
	viewLayout.setSizeFull();
	mainLayout.setMargin(true);
	setContent(mainLayout);
	mainLayout.addComponent(horizontalLayout);
	mainLayout.addComponent(viewLayout);
	mainLayout.setExpandRatio(viewLayout, 1f);
	Navigator navigator = new Navigator(this, viewLayout);
	setNavigator(navigator);
	setupHeader(horizontalLayout);
	Map<String, Class<? extends MyView>> myViews = getViewProvider();
	navigator.addView("", new HomeView(myViews.keySet()));
	navigator.addProvider(new CachedViewProvider(myViews));
}
 
Example 9
Project: designer-tutorials   File: MainLayout.java   Source Code and License 6 votes vote down vote up
public MainLayout() {
    Navigator navigator = new Navigator(UI.getCurrent(), contentPanel);
    navigator.addView(StatsView.VIEW_NAME, StatsView.class);
    navigator.addView(PluginsView.VIEW_NAME, PluginsView.class);
    navigator.addView(PermissionsView.VIEW_NAME, PermissionsView.class);

    menuButton1.addClickListener(event -> doNavigate(StatsView.VIEW_NAME));
    menuButton2
            .addClickListener(event -> doNavigate(PluginsView.VIEW_NAME));
    menuButton3.addClickListener(
            event -> doNavigate(PermissionsView.VIEW_NAME));

    if (navigator.getState().isEmpty()) {
        navigator.navigateTo(StatsView.VIEW_NAME);
    } else {
        navigator.navigateTo(navigator.getState());
    }
}
 
Example 10
Project: flightservice   File: FlightServiceUI.java   Source Code and License 6 votes vote down vote up
@Override
protected void init(VaadinRequest request) {

	Panel panel = new Panel();
	panel.setSizeFull();

	Navigator navigator = new Navigator(this, panel);
	navigator.addView(NavigationState.HOME, HomeView.class);
	navigator.addView(NavigationState.AIRPORT_LIST, AirportListView.class);
	navigator.addView(NavigationState.FLIGHT_MAINTENANCE, FlightMaintenanceView.class);
	navigator.addView(NavigationState.FLIGHT_BOOKING, FlightBookingView.class);
	navigator.addView(NavigationState.BOOKING_CANCELLATION, BookingCancellationView.class);
	navigator.navigateTo(NavigationState.HOME);

	VerticalLayout verticalLayout = new VerticalLayout();
	verticalLayout.setSizeFull();
	verticalLayout.addComponent(createMenu());
	verticalLayout.addComponent(panel);
	verticalLayout.setExpandRatio(panel, 1);
	setContent(verticalLayout);
}
 
Example 11
Project: archetype-application-example   File: MainScreen.java   Source Code and License 6 votes vote down vote up
public MainScreen(MockAppUI ui) {

        setStyleName("main-screen");

        CssLayout viewContainer = new CssLayout();
        viewContainer.addStyleName("valo-content");
        viewContainer.setSizeFull();

        final Navigator navigator = new Navigator(ui, viewContainer);
        navigator.setErrorView(ErrorView.class);
        menu = new Menu(navigator);
        menu.addView(new SampleCrudView(), SampleCrudView.VIEW_NAME,
                SampleCrudView.VIEW_NAME, FontAwesome.EDIT);
        menu.addView(new AboutView(), AboutView.VIEW_NAME, AboutView.VIEW_NAME,
                FontAwesome.INFO_CIRCLE);

        navigator.addViewChangeListener(viewChangeListener);

        addComponent(menu);
        addComponent(viewContainer);
        setExpandRatio(viewContainer, 1);
        setSizeFull();
    }
 
Example 12
Project: vaadin4spring   File: AbstractSideBarUI.java   Source Code and License 6 votes vote down vote up
@Override
protected void init(VaadinRequest vaadinRequest) {
    getPage().setTitle("Vaadin4Spring Side Bar Sample");
    final HorizontalLayout rootLayout = new HorizontalLayout();
    rootLayout.setSizeFull();
    setContent(rootLayout);

    final VerticalLayout viewContainer = new VerticalLayout();
    viewContainer.setSizeFull();

    final Navigator navigator = new Navigator(this, viewContainer);
    navigator.setErrorView(new ErrorView());
    navigator.addProvider(viewProvider);
    setNavigator(navigator);

    rootLayout.addComponent(getSideBar());
    rootLayout.addComponent(viewContainer);
    rootLayout.setExpandRatio(viewContainer, 1.0f);
}
 
Example 13
Project: vaadin4spring   File: MainScreen.java   Source Code and License 6 votes vote down vote up
@Autowired
public MainScreen(final VaadinSecurity vaadinSecurity, SpringViewProvider springViewProvider, ValoSideBar sideBar) {
    HorizontalLayout layout = new HorizontalLayout();
    layout.setSizeFull();
    setCompositionRoot(layout);
    setSizeFull();

    // By adding a security item filter, only views that are accessible to the user will show up in the side bar.
    sideBar.setItemFilter(new VaadinSecurityItemFilter(vaadinSecurity));
    layout.addComponent(sideBar);

    CssLayout viewContainer = new CssLayout();
    viewContainer.setSizeFull();
    layout.addComponent(viewContainer);
    layout.setExpandRatio(viewContainer, 1f);

    Navigator navigator = new Navigator(UI.getCurrent(), viewContainer);
    // Without an AccessDeniedView, the view provider would act like the restricted views did not exist at all.
    springViewProvider.setAccessDeniedViewClass(AccessDeniedView.class);
    navigator.addProvider(springViewProvider);
    navigator.setErrorView(ErrorView.class);
    navigator.navigateTo(navigator.getState());
}
 
Example 14
Project: gazpachoquest   File: QuestionnairesUI.java   Source Code and License 6 votes vote down vote up
@Override
public void init(VaadinRequest request) {
    logger.info("New Vaadin UI created");
    String invitation = request.getParameter("invitation");
    logger.info("Invitation: {} of sessions : {}", invitation);
    setSizeFull();
    GazpachoViewDisplay viewDisplay = new GazpachoViewDisplay();
    setContent(viewDisplay);

    navigator = new Navigator(this, (ViewDisplay) viewDisplay);
    navigator.addProvider(viewProvider);
    navigator.setErrorProvider(new GazpachoErrorViewProvider());

    if (isUserSignedIn()) {
        navigator.navigateTo(QuestionnaireView.NAME);
    } else {
        navigator.navigateTo(LoginView.NAME);
    }
}
 
Example 15
Project: jdal   File: SimpleApplicationUI.java   Source Code and License 6 votes vote down vote up
/**
 * Build application main window
 */
protected void buildMain() {
	this.root.removeAllComponents();
	this.top.setWidth(100, Unit.PERCENTAGE);
	this.top.setSpacing(false);
	this.top.setMargin(false);
	this.top.addComponent(buttonBar);
	this.root.addComponent(top);
	this.root.addComponent(mainView);
	this.root.setSpacing(false);
	this.root.setMargin(false);
	this.root.setExpandRatio(top, 0);
	this.root.setExpandRatio(mainView, 1);
	Navigator navigator = new Navigator(this, mainView);
	navigator.addProvider(viewProvider);
}
 
Example 16
Project: vaadin-mockapp   File: MainScreen.java   Source Code and License 6 votes vote down vote up
public MainScreen(UI ui) {
    setSizeFull();
    createHeader();
    createMenuBar();
    final Panel viewContainer = new Panel();
    viewContainer.setSizeFull();
    viewContainer.addStyleName(Reindeer.PANEL_LIGHT);
    addComponent(viewContainer);
    setExpandRatio(viewContainer, 1);

    final Navigator navigator = new Navigator(ui, viewContainer);
    navigator.setErrorView(ErrorView.class);

    navigator.addView(SampleTableView.VIEW_NAME, new SampleTableView());
    navigator.addView(SampleFormView.VIEW_NAME, SampleFormView.class);
    navigator.addView(SampleChartView.VIEW_NAME, SampleChartView.class);

    navigator.navigateTo(navigator.getState());
}
 
Example 17
Project: holon-vaadin7   File: ViewNavigationUtils.java   Source Code and License 5 votes vote down vote up
/**
 * Try to obtain ViewNavigator from current thread-bound {@link UI}
 * @return If current {@link UI} is available and has a ViewNavigator setted, this one is retuned. Null otherwise.
 */
public static ViewNavigator getCurrentUIViewNavigator() {
	UI ui = UI.getCurrent();
	if (ui != null) {
		Navigator navigator = ui.getNavigator();
		if (navigator instanceof ViewNavigator) {
			return (ViewNavigator) navigator;
		}
	}
	return null;
}
 
Example 18
Project: esup-ecandidat   File: SubMenuBar.java   Source Code and License 5 votes vote down vote up
/** Construit la bar de sous menu
 * @param menu
 * @param navigator
 * @param vue
 */
public void constructMenuBar(Menu menu, Navigator navigator, String vue){
	/*Suppression des listeners du tabSheet-->Sinon lorsqu'on ajoute un élément, il navigue donc boucle*/
	cleanTabSheetListener();
	/*Suppression puis ajout des composant du menu*/
	this.removeAllComponents();
	menu.getSubMenu().forEach(s -> {
		this.addTab(s.getLabel(), applicationContext.getMessage(s.getVue() + ".title", null, UI.getCurrent().getLocale()),s.getIcon());
	});
	/*On selectionne l'onglet qui va bien, utile lors du back navigateur ou clavier*/
	selectSubMenuSheet(menu, vue, navigator,false);
	/*Ajout du listener*/
	addTabSheetListener(navigator);
}
 
Example 19
Project: esup-ecandidat   File: SubMenuBar.java   Source Code and License 5 votes vote down vote up
/**
 * Ajout du listener du sous menu
 */
private void addTabSheetListener(Navigator navigator){
	this.addSelectedTabChangeListener(e -> {
		if (e.getTabSheet().getSelectedTab()!=null){
			navigator.navigateTo((String) ((Label)e.getTabSheet().getSelectedTab()).getData());
		}
	});
}
 
Example 20
Project: holon-vaadin   File: ViewNavigationUtils.java   Source Code and License 5 votes vote down vote up
/**
 * Try to obtain ViewNavigator from current thread-bound {@link UI}
 * @return If current {@link UI} is available and has a ViewNavigator setted, this one is retuned. Null otherwise.
 */
public static ViewNavigator getCurrentUIViewNavigator() {
	UI ui = UI.getCurrent();
	if (ui != null) {
		Navigator navigator = ui.getNavigator();
		if (navigator instanceof ViewNavigator) {
			return (ViewNavigator) navigator;
		}
	}
	return null;
}
 
Example 21
Project: history-api-navigation   File: HistoryApiNavigationStateManager.java   Source Code and License 5 votes vote down vote up
@Override
public void setNavigator(final Navigator navigator)
{
    if (this.navigator == null && navigator != null)
    {
        popStateListenerRegistration = page.addPopStateListener(event -> navigator.navigateTo(getState()));
    }
    else if (this.navigator != null && navigator == null)
    {
        popStateListenerRegistration.remove();
    }
    this.navigator = navigator;
}
 
Example 22
Project: incubator-tamaya-sandbox   File: ApplicationLayout.java   Source Code and License 5 votes vote down vote up
private void setupNavigator(UI ui) {
        navigator = new Navigator(ui, content);
        navigator.setErrorView(ErrorView.class);
        // Add view change listeners so we can do things like select the correct menu item and update the page title
        navigator.addViewChangeListener(navBar);
//        navigator.addViewChangeListener(new PageTitleUpdater());
        addView("/home", HomeView.class, getViewName(HomeView.class));
        addView("/system", SystemView.class, getViewName(SystemView.class));
        addView("/config", ConfigView.class, getViewName(ConfigView.class));
        navigator.navigateTo("/home");
    }
 
Example 23
Project: dungeonstory-java   File: MainScreen.java   Source Code and License 5 votes vote down vote up
private void setupNavigator() {
    navigator = new Navigator(DungeonStoryUI.getCurrent(), viewContainer);

    registerViews();

    // Add view change listeners so we can do things like select the correct
    // menu item and update the page title
    navigator.addViewChangeListener(navBar);
    navigator.addViewChangeListener(new PageTitleUpdater());
    navigator.addViewChangeListener(new MessageViewUpdater());

    navigator.setErrorView(ErrorView.class);
    navigator.navigateTo(navigator.getState());
}
 
Example 24
Project: limbr   File: VaadinUI.java   Source Code and License 5 votes vote down vote up
@Override
protected void init(VaadinRequest request) {

    final VerticalLayout root = new VerticalLayout();
    root.setSizeFull();
    root.setMargin(new MarginInfo(false, false, false, true));
    root.setSpacing(true);
    setContent(root);

    HorizontalLayout topBar = new HorizontalLayout();
    topBar.setSpacing(true);

    Image logo = new Image(null, new ExternalResource("images/logo1.png"));
    logo.setHeight(31f, Unit.PIXELS);
    logo.setWidthUndefined();
    topBar.addComponent(logo);

    CssLayout navBar = new CssLayout();
    navBar.addStyleName(ValoTheme.LAYOUT_COMPONENT_GROUP);
    navBar.addComponent(createNavButton(messages.get("usersNavigationLabel"), UsersViewImpl.VIEW_NAME));
    navBar.addComponent(createNavButton(messages.get("projectsNavigationLabel"), ProjectsViewImpl.VIEW_NAME));
    navBar.addComponent(createNavButton(messages.get("rolesNavigationLabel"), RolesViewImpl.VIEW_NAME));
    topBar.addComponent(navBar);

    root.addComponent(topBar);

    final Panel viewContainer = new Panel();
    viewContainer.setSizeFull();
    root.addComponent(viewContainer);
    root.setExpandRatio(viewContainer, 1.0f);

    Navigator navigator = new Navigator(this, viewContainer);
    navigator.addProvider(viewProvider);
    navigator.setErrorProvider(viewProvider);
    navigator.setErrorView(ErrorView.class);
}
 
Example 25
Project: hawkbit-examples   File: SimulatorUI.java   Source Code and License 5 votes vote down vote up
@Override
protected void init(final VaadinRequest request) {

    rootLayout.setSizeFull();

    final Panel viewContainer = new Panel();
    viewContainer.setSizeFull();
    rootLayout.addComponent(viewContainer);
    rootLayout.setExpandRatio(viewContainer, 1.0F);

    final Navigator navigator = new Navigator(this, viewContainer);
    navigator.addProvider(viewProvider);

    setContent(rootLayout);
}
 
Example 26
Project: Iris   File: IrisUi.java   Source Code and License 5 votes vote down vote up
@Override
protected void init(VaadinRequest request) {

    final CssLayout root = new CssLayout();
    root.setSizeFull();
    setContent(root);

    Navigator navigator = new Navigator(this, root);
    navigator.addProvider(viewProvider);
}
 
Example 27
Project: bookery   File: AppHeader.java   Source Code and License 5 votes vote down vote up
private MHorizontalLayout createSearchBar() {
    Label header = new Label("Bookery");
    header.addStyleName(ValoTheme.LABEL_BOLD);
    header.setSizeUndefined();
    header.addStyleName(ValoTheme.LABEL_H3);
    
    searchText = new TextField();
    searchText.setIcon(FontAwesome.SEARCH);
    searchText.addStyleName(ValoTheme.TEXTFIELD_LARGE);
    searchText.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON);
    searchText.setWidth(100, Unit.PERCENTAGE);
    searchText.setInputPrompt("hier einfach suchen..");
    Button searchButton = new Button("such!", new Button.ClickListener() {
        @Override
        public void buttonClick(Button.ClickEvent event) {
            Navigator navigator = ((App)UI.getCurrent()).getNavigator();
            if (navigator.getState().contains("search")) {
                navigator.navigateTo(navigator.getState());
            }
            else {
                navigator.navigateTo(SearchView.id);
            }
            
        }
    });
    searchButton.addStyleName(ValoTheme.BUTTON_LARGE);
    searchText.addShortcutListener(new Button.ClickShortcut(searchButton, ShortcutAction.KeyCode.ENTER));

    MHorizontalLayout layout = new MHorizontalLayout(header,searchText,searchButton);
    layout.setWidth(100, Unit.PERCENTAGE);
    layout.setExpandRatio(searchText, 1.0f);
    return layout;
}
 
Example 28
Project: vaadin-bug-demos   File: MainUI.java   Source Code and License 5 votes vote down vote up
@Override
protected void init(VaadinRequest vaadinRequest) {
    Navigator navigator = new Navigator(this, this);
    navigator.addProvider(viewProvider);
    setNavigator(navigator);
    navigator.addViewChangeListener(this);
}
 
Example 29
Project: GridStack   File: DemoUI.java   Source Code and License 5 votes vote down vote up
@Override
protected void init(VaadinRequest request) {

    navigator = new Navigator(this, this);
    navigator.addView(MenuView.VIEW_NAME, MenuView.class);
    navigator.addView(TestView.VIEW_NAME, TestView.class);
    navigator.addView(SplitView.VIEW_NAME, SplitView.class);
    navigator.addView(SimpleView.VIEW_NAME, SimpleView.class);
}
 
Example 30
Project: designer-tutorials   File: MainLayout.java   Source Code and License 5 votes vote down vote up
public MainLayout() {
    navigator = new Navigator(UI.getCurrent(), (ViewDisplay) this);
    addNavigatorView(DashboardView.VIEW_NAME, DashboardView.class,
            menuButton1);
    addNavigatorView(OrderView.VIEW_NAME, OrderView.class, menuButton2);
    addNavigatorView(AboutView.VIEW_NAME, AboutView.class, menuButton3);
    if (navigator.getState().isEmpty()) {
        navigator.navigateTo(DashboardView.VIEW_NAME);
    }
}
 
Example 31
Project: mondo-collab-framework   File: SessionSelectionPage.java   Source Code and License 5 votes vote down vote up
public SessionSelectionPage(final Navigator navigator, Application application) {
	System.out.println("Construct SessionSelectionPage");
	this.application = application;
	this.sessions = new ArrayList<CollaborationSession>();
	this.navigator = navigator;
	setSizeFull();
	initSessionsView();
}
 
Example 32
Project: mondo-collab-framework   File: LoginPage.java   Source Code and License 5 votes vote down vote up
public LoginPage(final Navigator navigator, Application application) {
	System.out.println("Construct LoginPage");
	this.navigator = navigator;

	Panel panel = new Panel("Login");
	panel.setSizeUndefined();
	addComponent(panel, "left: 20px; top: 20px;");

	CustomLayout custom = new CustomLayout("loginPage");

	panel.setContent(custom);
	
	TextField username = new TextField();
	custom.addComponent(username, "username");
	TextField password = new TextField();
	custom.addComponent(password, "password");

	boolean isAuthorized = this.authenticate();
	
	Button buttonLogin = new Button("Login");
	buttonLogin.addClickListener(new Button.ClickListener() {
		@Override
		public void buttonClick(ClickEvent event) {
			if(isAuthorized) {
				application.bindUser(
					username.getValue(), 
					password.getValue()
				);
				navigator.navigateTo(SessionSelectionPage.NAME);
			}
		}
	});
	this.application = application;
	custom.addComponent(buttonLogin, "buttonLogin");
}
 
Example 33
Project: metl   File: ViewManager.java   Source Code and License 5 votes vote down vote up
public void init(AppUI ui, ComponentContainer container) {
    navigator = new Navigator(ui, container);
    navigator.setErrorView(new PageNotFoundView(this));
    if (views != null) {
        for (View view : views) {
            TopBarLink menu = (TopBarLink) view.getClass().getAnnotation(TopBarLink.class);
            if (menu != null && menu.uiClass().equals(AppUI.class)) {
                navigator.addView(menu.id(), view);
            }
        }
    }
}
 
Example 34
Project: cdi-tutorial   File: NavigationServiceImpl.java   Source Code and License 5 votes vote down vote up
@PostConstruct
public void initialize() {
    if (ui.getNavigator() == null) {
        Navigator navigator = new Navigator(ui, ui);
        navigator.addProvider(viewProvider);
        navigator.setErrorView(errorView);
    }
}
 
Example 35
Project: vaadin4spring   File: NavigationUI.java   Source Code and License 5 votes vote down vote up
@Override
protected void init(VaadinRequest request) {
    final VerticalLayout root = new VerticalLayout();
    root.setSizeFull();
    root.setMargin(true);
    root.setSpacing(true);
    setContent(root);

    final CssLayout navigationBar = new CssLayout();
    navigationBar.addStyleName(ValoTheme.LAYOUT_COMPONENT_GROUP);
    navigationBar.addComponent(createNavigationButton("Prototype Scoped View", PrototypeScopedView.VIEW_NAME));
    navigationBar.addComponent(createNavigationButton("UI Scoped View", UIScopedView.VIEW_NAME));
    navigationBar.addComponent(createNavigationButton("View Scoped View", ViewScopedView.VIEW_NAME));
    navigationBar.addComponent(createNavigationButton("Access Control", AccessControlView.VIEW_NAME));
    root.addComponent(navigationBar);

    final Panel viewContainer = new Panel();
    viewContainer.setSizeFull();
    root.addComponent(viewContainer);
    root.setExpandRatio(viewContainer, 1.0f);

    viewProvider.setAccessDeniedViewClass(AccessDeniedView.class);

    Navigator navigator = new Navigator(this, viewContainer);
    navigator.setErrorView(new ErrorView()); // You can still create the error view yourself if you want to.
    navigator.addProvider(viewProvider);
}
 
Example 36
Project: vaadin4spring   File: MainUI.java   Source Code and License 5 votes vote down vote up
@Override
protected void init(VaadinRequest request) {
    getPage().setTitle("Vaadin Shared Security Demo");
    // Let's register a custom error handler to make the 'access denied' messages a bit friendlier.
    setErrorHandler(new DefaultErrorHandler() {
        @Override
        public void error(com.vaadin.server.ErrorEvent event) {
            if (SecurityExceptionUtils.isAccessDeniedException(event.getThrowable())) {
                Notification.show("Sorry, you don't have access to do that.");
            } else {
                super.error(event);
            }
        }
    });
    HorizontalLayout layout = new HorizontalLayout();
    layout.setSizeFull();

    // By adding a security item filter, only views that are accessible to the user will show up in the side bar.
    sideBar.setItemFilter(new VaadinSecurityItemFilter(vaadinSecurity));
    layout.addComponent(sideBar);

    CssLayout viewContainer = new CssLayout();
    viewContainer.setSizeFull();
    layout.addComponent(viewContainer);
    layout.setExpandRatio(viewContainer, 1f);

    Navigator navigator = new Navigator(this, viewContainer);
    // Without an AccessDeniedView, the view provider would act like the restricted views did not exist at all.
    springViewProvider.setAccessDeniedViewClass(AccessDeniedView.class);
    navigator.addProvider(springViewProvider);
    navigator.setErrorView(ErrorView.class);
    navigator.navigateTo(navigator.getState());

    setContent(layout); // Call this here because the Navigator must have been configured before the Side Bar can be attached to a UI.
}
 
Example 37
Project: LazyLayouts   File: DemoUI.java   Source Code and License 5 votes vote down vote up
@Override
protected void init(VaadinRequest request) {

    Navigator navigator = new Navigator(this, this);
    setNavigator(navigator);

    navigator.setErrorView(ErrorView.class);

    navigator.addView(MenuView.VIEW_ID, MenuView.class);
    navigator.addView(LazyVLView.VIEW_ID, LazyVLView.class);
    navigator.addView(LazyWindowView.VIEW_ID, LazyWindowView.class);
    navigator.addView(TabSheetView.VIEW_ID, TabSheetView.class);
    navigator.addView(Issue7View.VIEW_ID, Issue7View.class);
}
 
Example 38
Project: Vaadin4Spring-MVP-Sample-SpringSecuritySocial   File: MainUI.java   Source Code and License 5 votes vote down vote up
@Override
protected void init(VaadinRequest request) {
	setLocale(new Locale.Builder().setLanguage("sr").setScript("Latn").setRegion("RS").build());
	
    Navigator navigator = new Navigator(MainUI.this, (ViewDisplay)mainLayout);
    navigator.addProvider(springViewProvider);
    navigator.addViewChangeListener(mainLayout);
    
    setContent(mainLayout);
    
    /*
     * Handling redirections
     */        
    RequestAttributes attrs = RequestContextHolder.getRequestAttributes();        
    if (sessionStrategy.getAttribute(attrs, VaadinRedirectObject.REDIRECT_OBJECT_SESSION_ATTRIBUTE) != null) {        	
    	VaadinRedirectObject redirectObject = (VaadinRedirectObject) sessionStrategy.getAttribute(attrs, VaadinRedirectObject.REDIRECT_OBJECT_SESSION_ATTRIBUTE);
    	sessionStrategy.removeAttribute(attrs, VaadinRedirectObject.REDIRECT_OBJECT_SESSION_ATTRIBUTE);
    	 
    	navigator.navigateTo(redirectObject.getRedirectViewToken());
    	
    	if (redirectObject.getErrorMessage() != null) {
    		Notification.show("Error", redirectObject.getErrorMessage(), Type.ERROR_MESSAGE);
    	}
    	
    }
           
}
 
Example 39
Project: fns-projects   File: Application.java   Source Code and License 5 votes vote down vote up
@Override
protected void init(VaadinRequest vaadinRequest) {
	Navigator navigator = new Navigator(this, this);
	navigator.setErrorView(errorView);
	navigator.addProvider(viewProvider);
	setNavigator(navigator);
}
 
Example 40
Project: Vaadin4Spring-MVP-Sample   File: MyVaadinUI.java   Source Code and License 5 votes vote down vote up
@Override
protected void init(VaadinRequest request) {
	setLocale(new Locale.Builder().setLanguage("sr").setScript("Latn").setRegion("RS").build());
	
    Navigator navigator = new Navigator(MyVaadinUI.this, (ViewDisplay)mainLayout);
    navigator.addProvider(springViewProvider);
    
    navigator.addViewChangeListener(mainLayout);
    setContent(mainLayout);
}
 
Example 41
Project: extacrm   File: ExtaMainMenu.java   Source Code and License 5 votes vote down vote up
/**
 * <p>Constructor for ExtaMainMenu.</p>
 *
 * @param ui      a {@link com.vaadin.ui.UI} object.
 * @param content a {@link com.vaadin.ui.ComponentContainer} object.
 */
public ExtaMainMenu(final UI ui, final ComponentContainer content) {

    // URI навигатор
    navigator = new Navigator(ui, content);
    navigator.setErrorView(ErrorView.class);

    fragmentToButton = new HashMap<>();

    ui.getPage().addUriFragmentChangedListener(this);
}
 
Example 42
Project: vaadin-ga-tracker   File: GoogleAnalyticsTrackerDemo.java   Source Code and License 5 votes vote down vote up
@Override
protected void init(VaadinRequest request) {

    // Create a tracker for vaadin.com domain and "ga-demo" prefix
    GoogleAnalyticsTracker tracker = new GoogleAnalyticsTracker(
            "UA-658457-8", "none", "/ga-demo/");
    
    // Use this if you still haven't upgraded to Universal tracking API
    // tracker.setUniversalTracking(false);

    // Example: Create a tracker for vaadin.com domain.
    // GoogleAnalyticsTracker tracker = new GoogleAnalyticsTracker(
    // "UA-658457-8", "vaadin.com");
    
    tracker.setUserId("12345"); //optional: set the User-ID. Must also enable User-ID tracking within Google Analytics admin.
    
    // attach the GA tracker to this UI
    tracker.extend(this);

    // simple view navigator sample
    Navigator n = new Navigator(this, this);
    n.addView("", MainView.class);
    n.addView("second", SecondView.class);
    n.addView("third", ThirdView.class);

    // attach the tracker to the Navigator to automatically track all views
    // To use the tracker without the Navigator, just call the
    // tracker.trackPageview(pageId) separately when tracking is needed.
    getNavigator().addViewChangeListener(tracker);

    // Examples how to track page views. Note that the "trackingPrefix" is added to these.
    tracker.trackPageview("mydemo/init");
    tracker.trackPageview("edit/customer");

    // Examples how to track events
    tracker.trackEvent("GoogleAnalyticsTrackerDemo","init");
    tracker.trackEvent("GoogleAnalyticsTrackerDemo","start", "Demo Campaign");
    tracker.trackEvent("GoogleAnalyticsTrackerDemo","run", "Demo Campaign",3);
}
 
Example 43
Project: ScaleImage   File: DemoUI.java   Source Code and License 5 votes vote down vote up
@Override
protected void init(VaadinRequest request) {

    Navigator navigator = new Navigator(this, this);
    navigator.addView(MenuView.VIEW_NAME, MenuView.class);
    navigator.addView(TestView.VIEW_NAME, TestView.class);
    navigator.addView(AdjustView.VIEW_NAME, AdjustView.class);

}
 
Example 44
Project: scoutmaster   File: PublicUI.java   Source Code and License 5 votes vote down vote up
@Override
protected void init(final VaadinRequest request)
{
	// VaadinSession.getCurrent().setConverterFactory(new
	// ScoutmasterConverterFactory());
	// styleConfirmDialog();
	//
	// SectionTypeDao daoSectionType = new DaoFactory().getSectionTypeDao();
	// daoSectionType.cacheSectionTypes();

	this.viewMap.add(new ViewMapping("", PublicCalendarView.class));
	this.viewMap.add(new ViewMapping(PublicCalendarView.NAME, PublicCalendarView.class));

	this.mainLayout = new VerticalLayout();
	this.mainLayout.setMargin(false);
	this.mainLayout.setSpacing(true);
	this.mainLayout.setSizeFull();

	final VerticalLayout viewContainer = new VerticalLayout();
	viewContainer.setHeight("100%");

	final Navigator navigator = new Navigator(this, viewContainer);

	// Wire up the navigation
	for (final ViewMapping viewmap : this.viewMap)
	{
		navigator.addView(viewmap.getViewName(), viewmap.getView());
	}

	this.mainLayout.addComponent(viewContainer);
	this.mainLayout.setExpandRatio(viewContainer, 1.0f);

	setContent(this.mainLayout);
}
 
Example 45
Project: mideaas   File: MideaasUI.java   Source Code and License 5 votes vote down vote up
@Override
protected void init(VaadinRequest request) {
	
	//System.out.println("init of MideeasUI is called");
	
	navigator = new Navigator(this, this);
	
	navigator.addView("", new LoginView(this, "lobby"));
	
	navigator.addView("lobby", new LobbyView(this));
	
	navigator.addProvider(new EditorViewProvider(this, settings));
	
	//navigator.setErrorView(new LobbyView(this));
	
	/*
	// cutomizing System messages
	VaadinService.getCurrent().setSystemMessagesProvider( new SystemMessagesProvider() {
	    
		@Override
		public SystemMessages getSystemMessages(
				SystemMessagesInfo systemMessagesInfo) {
			// TODO Auto-generated method stub
			CustomizedSystemMessages messages = new CustomizedSystemMessages();
			
			//messages.setSessionExpiredCaption("farshad");
			//messages.setSessionExpiredMessage("ahmadi");
			//messages.setSessionExpiredNotificationEnabled(false);
			//messages.setSessionExpiredURL("/mideaastest");
			//messages.setSessionExpiredURL("/mideaas");
			messages.setSessionExpiredNotificationEnabled(true);
			
	    	return messages;
		}
	});
	*/
}
 
Example 46
Project: jdal   File: NavigatorAction.java   Source Code and License 5 votes vote down vote up
@Override
public void buttonClick(ClickEvent event) {
	Navigator navigator = UI.getCurrent().getNavigator();
	
	if (navigator != null)
		navigator.navigateTo(viewName);
}
 
Example 47
Project: holon-vaadin7   File: DefaultViewNavigatorChangeEvent.java   Source Code and License 4 votes vote down vote up
public <N extends Navigator & ViewNavigator> DefaultViewNavigatorChangeEvent(N navigator, View oldView,
		View newView, String viewName, String parameters, Window containerWindow) {
	super(navigator, oldView, newView, viewName, parameters);
	this.containerWindow = containerWindow;
}
 
Example 48
Project: holon-vaadin7   File: DefaultViewNavigatorChangeEvent.java   Source Code and License 4 votes vote down vote up
public static <N extends Navigator & ViewNavigator> DefaultViewNavigatorChangeEvent create(ViewChangeEvent event,
		N navigator, Window containerWindow) {
	return new DefaultViewNavigatorChangeEvent(navigator, event.getOldView(), event.getNewView(),
			event.getViewName(), event.getParameters(), containerWindow);
}
 
Example 49
Project: holon-vaadin   File: DefaultViewNavigatorChangeEvent.java   Source Code and License 4 votes vote down vote up
public <N extends Navigator & ViewNavigator> DefaultViewNavigatorChangeEvent(N navigator, View oldView,
		String oldViewName, View newView, String viewName, String parameters, Window containerWindow) {
	super(navigator, oldView, newView, viewName, parameters);
	this.oldViewName = oldViewName;
	this.containerWindow = containerWindow;
}
 
Example 50
Project: bbplay   File: MainUI.java   Source Code and License 4 votes vote down vote up
@Override
protected void init(VaadinRequest request) {
	getUI().setLocale(BBPlay.getLanguage(request.getLocale().getLanguage()));
	I18n.init(i18n);
	getPage().setTitle("BBPlay");
	setErrorHandler(new DefaultErrorHandler() {
		private static final long serialVersionUID = -18984634551415736L;

		@Override
		public void error(com.vaadin.server.ErrorEvent event) {
			if (SecurityExceptionUtils.isAccessDeniedException(event.getThrowable())) {
				BBPlay.error(I18n.t("error.noAccess", "MainUI"));
			} else {
				super.error(event);
			}
		}
	});
	VerticalLayout layout = new VerticalLayout();
	layout.setSizeFull();

	HorizontalLayout horizontalLayout = new HorizontalLayout();
	horizontalLayout.setSizeFull();
	layout.addComponent(horizontalLayout);
	layout.setExpandRatio(horizontalLayout, 1f);

	sideBar.setItemFilter(new VaadinSecurityItemFilter(vaadinSecurity));
	horizontalLayout.addComponent(sideBar);

	CssLayout viewContainer = new CssLayout();
	viewContainer.setSizeFull();
	viewContainer.addStyleName("scrollable-y");
	horizontalLayout.addComponent(viewContainer);
	horizontalLayout.setExpandRatio(viewContainer, 1f);

	Navigator navigator = new Navigator(this, viewContainer);
	springViewProvider.setAccessDeniedViewClass(AccessDeniedView.class);
	navigator.addProvider(springViewProvider);
	navigator.setErrorView(NavigatorErrorView.class);

	Footer footer = new Footer();
	layout.addComponent(footer);
	layout.addComponent(animator = new AnimatorProxy());

	setContent(layout);
}
 
Example 51
Project: incubator-tamaya-sandbox   File: ApplicationLayout.java   Source Code and License 4 votes vote down vote up
public Navigator getNavigator(){
    return navigator;
}
 
Example 52
Project: vaadin-router   File: Router.java   Source Code and License 4 votes vote down vote up
public Router(Navigator navigator) {
    this(navigator, new RoutedMenu(), new DummyAccessLevelProvider());
}
 
Example 53
Project: vaadin-router   File: Router.java   Source Code and License 4 votes vote down vote up
public Router(Navigator navigator, CurrentAccessLevelProvider accessLevelProvider) {
    this(navigator, new RoutedMenu(), accessLevelProvider);
}
 
Example 54
Project: vaadin-router   File: Router.java   Source Code and License 4 votes vote down vote up
public Router(Navigator navigator, RoutedMenu menu, CurrentAccessLevelProvider accessLevelProvider) {
    this.navigator = navigator;
    this.menu = menu;
    this.accessLevelProvider = accessLevelProvider;
    postInit();
}
 
Example 55
Project: vaadin-router   File: Router.java   Source Code and License 4 votes vote down vote up
public Navigator getNavigator() {
    return navigator;
}
 
Example 56
Project: metasfresh-procurement-webui   File: MFNavigator.java   Source Code and License 4 votes vote down vote up
public static final MFNavigator cast(final Navigator navigator)
{
	return (MFNavigator)navigator;
}
 
Example 57
Project: VaadinSpringShiroMongoDB   File: Menu.java   Source Code and License 4 votes vote down vote up
public Menu(Navigator navigator) {
    this.navigator = navigator;
    setPrimaryStyleName(ValoTheme.MENU_ROOT);
    menuPart = new CssLayout();
    menuPart.addStyleName(ValoTheme.MENU_PART);

    // header of the menu
    final HorizontalLayout top = new HorizontalLayout();
    top.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT);
    top.addStyleName(ValoTheme.MENU_TITLE);
    top.setSpacing(true);
    Label title = new Label("My CRUD");
    title.addStyleName(ValoTheme.LABEL_H3);
    title.setSizeUndefined();
    Image image = new Image(null, new ThemeResource("img/table-logo.png"));
    image.setStyleName("logo");
    top.addComponent(image);
    top.addComponent(title);
    menuPart.addComponent(top);

    // logout menu item
    MenuBar logoutMenu = new MenuBar();
    logoutMenu.addItem("Logout", FontAwesome.SIGN_OUT, new Command() {

        @Override
        public void menuSelected(MenuItem selectedItem) {
            VaadinSession.getCurrent().getSession().invalidate();
            Page.getCurrent().reload();
        }
    });

    logoutMenu.addStyleName("user-menu");
    menuPart.addComponent(logoutMenu);

    // button for toggling the visibility of the menu when on a small screen
    final Button showMenu = new Button("Menu", new ClickListener() {
        @Override
        public void buttonClick(final ClickEvent event) {
            if (menuPart.getStyleName().contains(VALO_MENU_VISIBLE)) {
                menuPart.removeStyleName(VALO_MENU_VISIBLE);
            } else {
                menuPart.addStyleName(VALO_MENU_VISIBLE);
            }
        }
    });
    showMenu.addStyleName(ValoTheme.BUTTON_PRIMARY);
    showMenu.addStyleName(ValoTheme.BUTTON_SMALL);
    showMenu.addStyleName(VALO_MENU_TOGGLE);
    showMenu.setIcon(FontAwesome.NAVICON);
    menuPart.addComponent(showMenu);

    // container for the navigation buttons, which are added by addView()
    menuItemsLayout = new CssLayout();
    menuItemsLayout.setPrimaryStyleName(VALO_MENUITEMS);
    menuPart.addComponent(menuItemsLayout);

    addComponent(menuPart);
}
 
Example 58
Project: hybridbpm   File: HybridbpmUI.java   Source Code and License 4 votes vote down vote up
public void registerView(ViewDefinition viewDefinition, Class<? extends View> viewClass) {
    ViewProvider viewProvider = new Navigator.ClassBasedViewProvider(viewDefinition.getUrl(), viewClass);
    ((HybridbpmUI) UI.getCurrent()).getHybridbpmNavigator().addProvider(viewProvider);
}
 
Example 59
Project: hybridbpm   File: HybridbpmUI.java   Source Code and License 4 votes vote down vote up
public static void registerView(ViewDefinition viewDefinition, View view) {
    ViewProvider viewProvider = new Navigator.StaticViewProvider(viewDefinition.getUrl(), view);
    ((HybridbpmUI) UI.getCurrent()).getHybridbpmNavigator().addProvider(viewProvider);
}
 
Example 60
Project: locationstore   File: VaadinUI.java   Source Code and License 4 votes vote down vote up
@Override
protected void init(final VaadinRequest request) {
	final VerticalLayout root = new VerticalLayout();
	root.setSizeFull();
	root.setMargin(true);
	root.setSpacing(true);
	setContent(root);
	
	HorizontalLayout titleBar = new HorizontalLayout();
	titleBar.setWidth(100, Unit.PERCENTAGE);
	Label title = new Label("Location Store");
	title.setStyleName(ValoTheme.LABEL_H1);
	titleBar.addComponent(title);
	titleBar.setComponentAlignment(title, Alignment.MIDDLE_LEFT);
	
	VerticalLayout titleBarRight = new VerticalLayout();
	titleBarRight.setSpacing(true);
	titleBar.addComponent(titleBarRight);
	titleBar.setComponentAlignment(titleBarRight, Alignment.TOP_RIGHT);
	HorizontalLayout titleBarRightTop = new HorizontalLayout();
	titleBarRightTop.setSpacing(true);
	titleBarRight.addComponent(titleBarRightTop);
	titleBarRight.setComponentAlignment(titleBarRightTop, Alignment.TOP_RIGHT);
	User user = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
	Label userInfo = new Label((user.isAdmin() ? "Administrator " : "User ") + user.getFullname()
		+ " (" + user.getUsername() + ")");
	titleBarRightTop.addComponent(userInfo);
	titleBarRightTop.setComponentAlignment(userInfo, Alignment.MIDDLE_RIGHT);
	Button logout = new Button("Logout");
	logout.setStyleName(ValoTheme.BUTTON_SMALL);
	logout.addClickListener(event -> {
		getPage().setLocation("/logout");
	});
	titleBarRightTop.addComponent(logout);
	titleBarRightTop.setComponentAlignment(logout, Alignment.MIDDLE_RIGHT);
	
	HorizontalLayout titleBarRightBottom = new HorizontalLayout();
	titleBarRightBottom.setSpacing(true);
	titleBarRight.addComponent(titleBarRightBottom);
	titleBarRight.setComponentAlignment(titleBarRightBottom, Alignment.BOTTOM_RIGHT);
	titleBarRightBottom.addComponent(new Label("Navigation:"));
	// home
	Button navHomeButton = new Button("Home");
	navHomeButton.setStyleName(ValoTheme.BUTTON_SMALL);
	navHomeButton.addClickListener(event -> getNavigator().navigateTo(Pages.HOME));
	navHomeButton.setEnabled(ViewSecurity.isAccessGranted(HomePage.class));
	titleBarRightBottom.addComponent(navHomeButton);
	// administration
	Button navAdminButton = new Button("Administration");
	navAdminButton.setStyleName(ValoTheme.BUTTON_SMALL);
	navAdminButton.addClickListener(event -> getNavigator().navigateTo(Pages.ADMINISTRATION));
	navAdminButton.setEnabled(ViewSecurity.isAccessGranted(AdminPage.class));
	titleBarRightBottom.addComponent(navAdminButton);
	
	root.addComponent(titleBar);
	
	final Panel viewContainer = new Panel();
	viewContainer.setSizeFull();
	root.addComponent(viewContainer);
	root.setExpandRatio(viewContainer, 1.0f);
	
	// the sub-pages are managed by Spring
	Navigator navigator = new Navigator(this, viewContainer);
	navigator.addProvider(viewProvider);
	// the navigator is automatically held by this UI and available via getNavigator()
	
	// add view security
	navigator.addViewChangeListener(new ViewSecurity());
}