[ 
https://issues.apache.org/jira/browse/TOBAGO-2178?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Udo Schnurpfeil resolved TOBAGO-2178.
-------------------------------------
    Resolution: Fixed

> An action is not executed if tc:file is on page (spring-boot)
> -------------------------------------------------------------
>
>                 Key: TOBAGO-2178
>                 URL: https://issues.apache.org/jira/browse/TOBAGO-2178
>             Project: MyFaces Tobago
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 5.3.0
>            Reporter: Henning Nöth
>            Assignee: Udo Schnurpfeil
>            Priority: Critical
>             Fix For: 5.4.0
>
>
> This issue effects only spring-boot.
> {code:xml}
> <tc:in label="Name" value="#{helloSpring.name}" required="true">
>   <f:facet name="after">
>     <tc:button label="Submit" defaultCommand="true" 
> action="#{helloSpring.sayHello}"/>
>   </f:facet>
> </tc:in>
> <tc:file/>
> {code}
> {code:java}
> public String sayHello() {
>   LOG.info("Action was called, name is '{}'", name);
>   return "/result.xhtml";
> }
> {code}
> Solution:
> put this code in the Application.java
> {code}
>   @Bean
>   public ServletContextInitializer 
> multipartServletContextInitializer(MultipartConfigElement 
> multipartConfigElement) {
>     return servletContext -> {
>       ServletRegistration servletRegistration = 
> servletContext.getServletRegistration(FACES_SERVLET_NAME);
>       if (servletRegistration instanceof ServletRegistration.Dynamic) {
>         ((ServletRegistration.Dynamic) 
> servletRegistration).setMultipartConfig(multipartConfigElement);
>       }
>     };
>   }
> {code}
> (its now as example in the sping-boot demo)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to