Package org.strecks.navigate

Examples of org.strecks.navigate.NavigationHolder


  @Test
  public void testReadNavigation()
  {
    assert navigationReader.readAnnotations(ActionWithParticularHandler.class);
    NavigationHolder navigation = navigationReader.getNavigationHolder();
    assert navigation.getFactory() instanceof IdentityNavigationHandlerFactory;
    assert navigation.getHandler() instanceof ParticularNavigationHandler;
    assert navigation.getMethod().getName().contains("nextAction");
  }
View Full Code Here


  }

  private SpringViewNavigationHandler getAndTestHandler(Class clazz)
  {
    navigationReader.readAnnotations(clazz);
    NavigationHolder navigationHolder = navigationReader.getNavigationHolder();
    NavigationHandlerFactory factory = navigationHolder.getFactory();
    assert factory instanceof IdentityNavigationHandlerFactory;
   
    NavigationHandler navigationHandler = factory.getNavigationHandler(null,null);
    assert navigationHandler instanceof SpringViewNavigationHandler;
   
View Full Code Here

    replay(request);

    SimpleControllerAction action = new SimpleControllerAction();
    ActionWithNavigate bean = new ActionWithNavigate();

    NavigationHolder navigationHolder = new NavigationHolder(new PageNavigationHandler(),
        new DefaultNavigationHandlerFactory(), bean.getClass().getMethod("nextPage"));

    action.setNavigationHolder(navigationHolder);

    ViewAdapter viewAdapter = action.findActionForward(bean, new TestContextImpl(request));
View Full Code Here

    replay(request);

    SimpleControllerAction action = new SimpleControllerAction();
    ActionWithNullReturningNavigate bean = new ActionWithNullReturningNavigate();

    NavigationHolder navigationHolder = new NavigationHolder(new PageNavigationHandler(),
        new DefaultNavigationHandlerFactory(), bean.getClass().getMethod("nextPage"));

    action.setNavigationHolder(navigationHolder);

    assert null == action.findActionForward(bean, new TestContextImpl(request));
View Full Code Here

  {

    NavigableController controller = new NavigableController();
    actionCreator.readControllerClassAnnotations(ActionWithNavigate.class, controller);

    NavigationHolder navigationHolder = controller.getNavigationHolder();
    assert navigationHolder != null;

  }
View Full Code Here

    {
      NavigationHandler navigationHandler = getNavigationHandler(actionBeanClass, navigationInfo);

      checkTypes(navigationHandler.getClass(), navigationInfo.getMethod());

      navigationHolder = new NavigationHolder(navigationHandler, navigationInfo.getFactory(), navigationInfo
          .getMethod());

      return true;
    }
    else
View Full Code Here

TOP

Related Classes of org.strecks.navigate.NavigationHolder

Copyright © 2018 www.massapicom. 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.