Package org.springframework.springfaces.config.util

Examples of org.springframework.springfaces.config.util.BeanDefinitionParserHelper.register()


    // Dispatcher + DispatcherAwareBeanPostProcessor
    RuntimeBeanReference dispatcher = getOrRegister(helper, "dispatcher", DefaultDispatcher.class);
    RootBeanDefinition postProcessor = helper.rootBeanDefinition(DispatcherAwareBeanPostProcessor.class);
    postProcessor.getConstructorArgumentValues().addIndexedArgumentValue(0, dispatcher);
    helper.register(postProcessor);

    // State Handler
    RuntimeBeanReference stateHandler = getOrRegister(helper, "state-handler", ClientFacesViewStateHandler.class);

    // Postback Handler
View Full Code Here


    RuntimeBeanReference stateHandler = getOrRegister(helper, "state-handler", ClientFacesViewStateHandler.class);

    // Postback Handler
    RootBeanDefinition postbackHandler = helper.rootBeanDefinition(FacesPostbackHandler.class);
    postbackHandler.getConstructorArgumentValues().addIndexedArgumentValue(0, stateHandler);
    helper.register(postbackHandler);

    // Exception Handler
    helper.register(MvcExceptionHandler.class);

    // Destination View Resolvers
View Full Code Here

    RootBeanDefinition postbackHandler = helper.rootBeanDefinition(FacesPostbackHandler.class);
    postbackHandler.getConstructorArgumentValues().addIndexedArgumentValue(0, stateHandler);
    helper.register(postbackHandler);

    // Exception Handler
    helper.register(MvcExceptionHandler.class);

    // Destination View Resolvers
    RuntimeBeanReference destinationViewResolvers = createResolverChain(helper, DestinationViewResolverChain.class,
        "destination-view-resolvers", RequestMappedRedirectDestinationViewResolver.class,
        DefaultDestinationViewResolver.class);
View Full Code Here

    // Spring Faces Factories
    RootBeanDefinition factories = helper.rootBeanDefinition(SpringFacesFactories.class);
    factories.getConstructorArgumentValues().addIndexedArgumentValue(0, stateHandler);
    factories.getConstructorArgumentValues().addIndexedArgumentValue(1, destinationViewResolvers);
    factories.getPropertyValues().addPropertyValue("navigationOutcomeResolver", navigationViewResolvers);
    helper.register(factories);

    // Interceptor
    RootBeanDefinition interceptor = helper.rootBeanDefinition(FacesHandlerInterceptor.class);
    RootBeanDefinition mappedInterceptor = helper.rootBeanDefinition(MappedInterceptor.class);
    mappedInterceptor.getConstructorArgumentValues().addIndexedArgumentValue(0, (Object) null);
View Full Code Here

    // Interceptor
    RootBeanDefinition interceptor = helper.rootBeanDefinition(FacesHandlerInterceptor.class);
    RootBeanDefinition mappedInterceptor = helper.rootBeanDefinition(MappedInterceptor.class);
    mappedInterceptor.getConstructorArgumentValues().addIndexedArgumentValue(0, (Object) null);
    mappedInterceptor.getConstructorArgumentValues().addIndexedArgumentValue(1, interceptor);
    helper.register(mappedInterceptor);

    parserContext.popAndRegisterContainingComponent();
    return null;
  }
View Full Code Here

      parserContext.getRegistry().registerBeanDefinition(HANDLER_ADAPTER_BEAN_NAME, handlerAdapter);
      parserContext.registerComponent(new BeanComponentDefinition(handlerAdapter, HANDLER_ADAPTER_BEAN_NAME));
    }

    // Register the handler
    RegisteredBeanDefinition resourceHandler = helper.register(FacesResourceRequestHandler.class);

    // Register the mapping
    Map<String, String> urlMap = new ManagedMap<String, String>();
    urlMap.put("/javax.faces.resource/**", resourceHandler.getName());
    RootBeanDefinition mapping = helper.rootBeanDefinition(SimpleUrlHandlerMapping.class);
View Full Code Here

    Map<String, String> urlMap = new ManagedMap<String, String>();
    urlMap.put("/javax.faces.resource/**", resourceHandler.getName());
    RootBeanDefinition mapping = helper.rootBeanDefinition(SimpleUrlHandlerMapping.class);
    mapping.getPropertyValues().addPropertyValue("urlMap", urlMap);
    mapping.getPropertyValues().addPropertyValue("order", element.getAttribute("order"));
    helper.register(mapping);

    return null;
  }
}
View Full Code Here

  @Override
  protected AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext) {
    BeanDefinitionParserHelper helper = new BeanDefinitionParserHelper(element, parserContext);
    ManagedList<BeanDefinition> converters = new ManagedList<BeanDefinition>();
    converters.add(helper.register(GenericFacesConverter.class).getBeanDefinition());
    RootBeanDefinition conversionService = helper.rootBeanDefinition(FormattingConversionServiceFactoryBean.class);
    conversionService.getPropertyValues().add("converters", converters);
    return conversionService;
  }
}
View Full Code Here

    RootBeanDefinition definition = helper.rootBeanDefinition(BookmarkableRedirectViewIdResolver.class);
    definition.getPropertyValues().add("viewClass", FacesView.class);
    addPropertyFromAttribute(definition, element, "prefix");
    addPropertyFromAttribute(definition, element, "suffix");
    addPropertyFromAttribute(definition, element, "order");
    helper.register(definition);
    return definition;
  }

  private void addPropertyFromAttribute(RootBeanDefinition beanDefinition, Element element, String propertyName) {
    beanDefinition.getPropertyValues().add(propertyName, element.getAttribute(propertyName));
View Full Code Here

class IntegrationBeanDefinitionParser implements BeanDefinitionParser {

  public BeanDefinition parse(Element element, ParserContext parserContext) {
    BeanDefinitionParserHelper helper = new BeanDefinitionParserHelper(element, parserContext);
    parserContext.pushContainingComponent(helper.getComponentDefinition());
    helper.register(SpringFacesIntegration.class);
    registerIfAttributeIsTrue(helper, "validators", SpringFacesValidatorSupport.class);
    registerIfAttributeIsTrue(helper, "converters", SpringFacesConverterSupport.class);
    registerIfAttributeIsTrue(helper, "exception-handlers", SpringFacesExceptionHandlerSupport.class,
        ObjectMessageExceptionHandler.class);
    registerIfAttributeIsTrue(helper, "spring-expressions", StandardEvaluationContextPostProcessorSupport.class,
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.