Java Code Examples for org.springframework.web.bind.support.ConfigurableWebBindingInitializer

Following code examples demonstrate how to use org.springframework.web.bind.support.ConfigurableWebBindingInitializerfrom spring-framework. These examples are extracted from various highly rated open source projects. You can directly use these code snippets or view their entire linked source code. These snippets are extracted to provide contextual information about how to use this class in the real world. These samples also let you understand some good practices on how to use org.springframework.web.bind.support.ConfigurableWebBindingInitializerand various code implementation of this class.

    public void initEditableAvlidation() {

        ConfigurableWebBindingInitializer initializer = (ConfigurableWebBindingInitializer)handlerAdapter.getWebBindingInitializer();
        if(initializer.getConversionService()!=null) {
            GenericConversionService genericConversionService = (GenericConversionService)initializer.getConversionService();           

            genericConversionService.addConverter(new StringToDateConverter());

        }

    } 


    public void initEditableValidation() {
        ConfigurableWebBindingInitializer initializer = (ConfigurableWebBindingInitializer) handlerAdapter
                .getWebBindingInitializer();
        if (initializer.getConversionService() != null) {
            GenericConversionService genericConversionService = (GenericConversionService) initializer
                    .getConversionService();
            genericConversionService.addConverter(new NsString2DateConvert());
        }

    } 

        public void initEditableValidation() {
            ConfigurableWebBindingInitializer initializer = (ConfigurableWebBindingInitializer) handlerAdapter
                    .getWebBindingInitializer();
            if (initializer.getConversionService() != null) {
                GenericConversionService genericConversionService = (GenericConversionService) initializer
                        .getConversionService();
                genericConversionService.addConverter(new StringToDateConverter());
            }

        } 

Advertisement
Javadoc
Convenient WebBindingInitializer for declarative configuration in a Spring application context. Allo

ws for reusing pre-configured initializers with multiple controller/handlers. @author Juergen Hoeller @since 2.5 @see #setDirectFieldAccess @see #setMessageCodesResolver @see #setBindingErrorProcessor @see #setValidator(Validator) @see #setConversionService(ConversionService) @see #setPropertyEditorRegistrar

Read More
Advertisement