Package com.vaadin.navigator

Examples of com.vaadin.navigator.Navigator.addView()


        ViewDisplay display = new Navigator.ComponentContainerViewDisplay(
                container);
        Navigator navigator = createNavigator(new NullFragmentManager(),
                display);

        navigator.addView("tv1", tv1);
        navigator.addView("tv2", tv2);

        navigator.navigateTo("tv1");

        assertSame(tv1, container.getComponent(0));
View Full Code Here


                container);
        Navigator navigator = createNavigator(new NullFragmentManager(),
                display);

        navigator.addView("tv1", tv1);
        navigator.addView("tv2", tv2);

        navigator.navigateTo("tv1");

        assertSame(tv1, container.getComponent(0));
        assertEquals(1, container.getComponentCount());
View Full Code Here

    public void testAddViewWithNullName() throws Exception {
        Navigator navigator = new TestNavigator();

        try {
            navigator.addView(null, new TestView());
            fail("addView() accepted null view name");
        } catch (IllegalArgumentException e) {
        }
        try {
            navigator.addView(null, TestView.class);
View Full Code Here

            navigator.addView(null, new TestView());
            fail("addView() accepted null view name");
        } catch (IllegalArgumentException e) {
        }
        try {
            navigator.addView(null, TestView.class);
            fail("addView() accepted null view name");
        } catch (IllegalArgumentException e) {
        }
    }
View Full Code Here

    public void testAddViewWithNullInstance() throws Exception {
        Navigator navigator = new TestNavigator();

        try {
            navigator.addView("test", (View) null);
            fail("addView() accepted null view instance");
        } catch (IllegalArgumentException e) {
        }
    }
View Full Code Here

    public void testAddViewWithNullClass() throws Exception {
        Navigator navigator = new TestNavigator();

        try {
            navigator.addView("test", (Class<View>) null);
            fail("addView() accepted null view class");
        } catch (IllegalArgumentException e) {
        }
    }
View Full Code Here

        NavigationStateManager manager = EasyMock
                .createNiceMock(NavigationStateManager.class);
        EasyMock.replay(manager);

        Navigator navigator = new Navigator(createMockUI(), manager, display);
        navigator.addView("view", view);
        navigator.navigateTo("view");
    }
}
View Full Code Here

      mainComponent.setWidth("100%");
      mainComponent.setHeight("100%");
      // Create and register the views

      navigator.addView("", mainComponent);
      setContent(mainComponent);
    } catch (Exception e) {
      setNavigator(null);
      getSession().close();
      getUI().getPage().setLocation("login");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.