<p:commandButton> not action source??

UI Components for JSF
Post Reply
hfcprime
Posts: 108
Joined: 22 Feb 2011, 20:32

18 Oct 2011, 17:18

The following table displays a list of files uploaded. The first column contains buttons for download and for deleting the file. When <p:commandButton> is used an exception is thrown complaining that the parent (<h:panelGrid> ?!) is not an action source. With <h:commandButton> the exception is not thrown. This used to work, with 3.0M3, now on M4.

Code: Select all

<h:panelGrid columns="5">
      <p:fileUpload disabled="#{! req.newItemCapable}" 
         fileUploadListener="#{fileUploadController.handleFileUpload}"              
         mode="advanced" update="attachments" sizeLimit="#{req.attachmentMax}" />
     <h:outputLabel>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h:outputLabel>
      <h:outputLabel>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h:outputLabel>
      <p:dataTable id="attachments" var="atch" value="#{req.attachments}">
       <f:facet name="header">Attachments</f:facet>
        <p:column headerText="Action">
            <p:commandButton ajax="false" value="Download">                
              <f:setPropertyActionListener value="#{atch}" target="#{req.selectedAttachment}" />
              <p:fileDownload value="#{fileDownloadController.file}" />   
            </p:commandButton>  
            <p:commandButton ajax="false" action="deleteAttachment" update="attachments" value="Delete">  
              <f:setPropertyActionListener value="#{atch}" target="#{req.selectedAttachment}" />  
            </p:commandButton>         
        </p:column>        
        <p:column headerText="Name">
           <h:outputText value="#{atch.alpha0}"></h:outputText>
         </p:column>
      </p:dataTable>
      </h:panelGrid>    

Code: Select all

SEVERE: Servlet.service() for servlet [Spring MVC Dispatcher Servlet] in context with path [/Requisitions] threw exception [Request processing failed; nested exception is org.springframework.webflow.execution.FlowExecutionException: Exception thrown in state 'textAttach' of flow 'text_attach'] with root cause
javax.faces.view.facelets.TagException: /WEB-INF/xhtml_includes/attachments.xhtml @26,97 <f:setPropertyActionListener> Parent is not of type ActionSource, type is: javax.faces.component.html.HtmlPanelGrid@c64e15
	at com.sun.faces.facelets.tag.jsf.core.SetPropertyActionListenerHandler.apply(SetPropertyActionListenerHandler.java:114)
	at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
	at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
	at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)
	at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
	at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
	at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
	at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)
	at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
	at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:166)
	at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
	at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:82)
	at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:308)
	at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:367)
	at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:346)
	at com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199)
	at com.sun.faces.facelets.tag.ui.IncludeHandler.apply(IncludeHandler.java:108)
	at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
	at com.sun.faces.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:103)
	at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:178)
	at com.sun.faces.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:395)
	at com.sun.faces.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:366)
	at com.sun.faces.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:108)
	at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
	at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
	at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)
	at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
	at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
	at com.sun.faces.facelets.tag.jsf.core.ViewHandler.apply(ViewHandler.java:167)
	at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
	at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
	at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
	at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:82)
	at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:308)
	at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:367)
	at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:346)
	at com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199)
	at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:155)
	at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
	at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:82)
	at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:152)
	at com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:744)
	at com.sun.faces.application.view.StateManagementStrategyImpl.restoreView(StateManagementStrategyImpl.java:228)
	at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:181)
	at org.springframework.faces.webflow.FlowViewStateManager.restoreView(FlowViewStateManager.java:195)
	at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java:123)
	at com.sun.faces.application.view.FaceletViewHandlingStrategy.restoreView(FaceletViewHandlingStrategy.java:448)
	at com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java:148)
	at org.springframework.faces.webflow.FlowViewHandler.restoreFlowView(FlowViewHandler.java:144)
	at org.springframework.faces.webflow.FlowViewHandler.restoreView(FlowViewHandler.java:83)
	at org.springframework.faces.webflow.JsfViewFactory.getView(JsfViewFactory.java:105)
	at org.springframework.webflow.engine.ViewState.resume(ViewState.java:193)
	at org.springframework.webflow.engine.Flow.resume(Flow.java:545)
	at org.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowExecutionImpl.java:261)
	at org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:169)
	at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:183)
	at org.springframework.faces.webflow.JsfFlowHandlerAdapter.handle(JsfFlowHandlerAdapter.java:48)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:669)
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:574)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:343)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
	at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:149)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:185)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:151)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:269)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

ENVIRONMENT
Angular 5.2.4, CLI 1.6.8, PrimeNG 5.2.0, Chrome 64.0.3282.186, Angular CLI project in Webclipse IDE, Win 10 Pro

hfcprime
Posts: 108
Joined: 22 Feb 2011, 20:32

18 Oct 2011, 17:28

Excuse me, incomplete namespace change, I think. I got most of the pages, overlooked this one. E.g.

xmlns:p="http://primefaces.prime.com.tr/ui"
ENVIRONMENT
Angular 5.2.4, CLI 1.6.8, PrimeNG 5.2.0, Chrome 64.0.3282.186, Angular CLI project in Webclipse IDE, Win 10 Pro

hfcprime
Posts: 108
Joined: 22 Feb 2011, 20:32

18 Oct 2011, 17:35

ENVIRONMENT
Angular 5.2.4, CLI 1.6.8, PrimeNG 5.2.0, Chrome 64.0.3282.186, Angular CLI project in Webclipse IDE, Win 10 Pro

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 46 guests