Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.59 KB | None | 0 0
  1. <div class="row">
  2. <p:chart type="bar" model="#{InheritedFichaCostoController.cttosAnimatedModel}" />
  3. </div>
  4.  
  5. import org.primefaces.model.chart.Axis;
  6. import org.primefaces.model.chart.AxisType;
  7. import org.primefaces.model.chart.BarChartModel;
  8. import org.primefaces.model.chart.ChartSeries;
  9.  
  10. @Named("InheritedFichaCostoController")
  11. @ViewScoped
  12. public class InheritedFichaCostoController extends FichaCostoController {
  13. private List<FichaCosto> activeAgreements;
  14. private List<FichaCosto> closedAgreements;
  15. private List<FichaCosto> stopedAgreements;
  16. private BarChartModel CttosAnimatedModel;
  17.  
  18. @Override
  19. public void init() {
  20. super.init();
  21. activeAgreements = new ArrayList<>();
  22. closedAgreements = new ArrayList<>();
  23. stopedAgreements = new ArrayList<>();
  24. createCttosAnimatedModel();
  25. }
  26.  
  27. public List<FichaCosto> getActiveAgreements() {
  28. activeAgreements = new ArrayList<>();
  29. activeAgreements.addAll(getFacade().activeAgreements());
  30. return activeAgreements;
  31. }
  32.  
  33. public List<FichaCosto> getClosedAgreements() {
  34. closedAgreements = new ArrayList<>();
  35. closedAgreements.addAll(getFacade().closedAgreements());
  36. return closedAgreements;
  37. }
  38.  
  39. public List<FichaCosto> getStopedAgreements() {
  40. stopedAgreements = new ArrayList<>();
  41. stopedAgreements.addAll(getFacade().stopedAgreements());
  42. return stopedAgreements;
  43. }
  44.  
  45. public BarChartModel getCttosAnimatedModel() {
  46. return cttosAnimatedModel;
  47. }
  48.  
  49. public void setCttosAnimatedModel(BarChartModel CttosAnimatedModel) {
  50. this.cttosAnimatedModel = CttosAnimatedModel;
  51. }
  52.  
  53. private void createCttosAnimatedModel() {
  54. cttosAnimatedModel = initBarModel();
  55. cttosAnimatedModel.setTitle("Bar Charts");
  56. cttosAnimatedModel.setAnimate(true);
  57. cttosAnimatedModel.setLegendPosition("ne");
  58. Axis yAxis = cttosAnimatedModel.getAxis(AxisType.Y);
  59. yAxis = cttosAnimatedModel.getAxis(AxisType.Y);
  60. yAxis.setMin(0);
  61. yAxis.setMax(10);
  62. }
  63.  
  64.  
  65. private BarChartModel initBarModel() {
  66. BarChartModel model = new BarChartModel();
  67.  
  68. ChartSeries active = new ChartSeries();
  69. active.setLabel("#{bundle.CttosEjec}");
  70. active.set("2019", activeAgreements.size());
  71.  
  72. ChartSeries stoped = new ChartSeries();
  73. stoped.setLabel("#{bundle.CttosStop}");
  74. stoped.set("2019", stopedAgreements.size());
  75.  
  76. ChartSeries closed = new ChartSeries();
  77. closed.setLabel("#{bundle.CttosStop}");
  78. closed.set("2019", closedAgreements.size());
  79.  
  80. model.addSeries(active);
  81. model.addSeries(stoped);
  82. model.addSeries(closed);
  83.  
  84. return model;
  85. }
  86. }
  87.  
  88. Información: WebModule[null] ServletContext.log():No Spring WebApplicationInitializer types detected on classpath
  89. Información: Inicializando Mojarra 2.2.14 ( 20161114-2152 unable to get svn info) para el contexto '/modulo-gecom'
  90. Información: Monitoring jndi:/server/modulo-gecom/WEB-INF/faces-config.xml for modifications
  91. Información: Running on PrimeFaces 6.2
  92. Información: WebModule[null] ServletContext.log():Initializing Spring root WebApplicationContext
  93. Información: Root WebApplicationContext: initialization started
  94. Información: Refreshing Root WebApplicationContext: startup date [Tue Mar 19 20:40:03 BRT 2019]; root of context hierarchy
  95. Información: Loading XML bean definitions from ServletContext resource [/WEB-INF/spring-context.xml]
  96. Información: Loading XML bean definitions from ServletContext resource [/WEB-INF/spring-security-context.xml]
  97. Información: You are running with Spring Security Core 4.0.3.RELEASE
  98. Información: Spring Security 'config' module version is 4.0.3.RELEASE
  99. Información: Creating access control expression attribute 'permitAll' for /login.jsf*
  100. Información: Creating access control expression attribute 'permitAll' for /register.jsf*
  101. Información: Creating access control expression attribute 'permitAll' for /javax.faces.resource/**
  102. Información: Creating access control expression attribute 'permitAll' for /resources/**
  103. Información: Creating access control expression attribute 'permitAll' for /accessDenied.jsf
  104. Información: Creating access control expression attribute 'hasAnyAuthority('USER')' for /**
  105. Información: Checking sorted filter chain: [Root bean: class [org.springframework.security.web.context.SecurityContextPersistenceFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 200, Root bean: class [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 400, Root bean: class [org.springframework.security.web.header.HeaderWriterFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 500, Root bean: class [org.springframework.security.web.authentication.logout.LogoutFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 700, <org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#0>, order = 1100, Root bean: class [org.springframework.security.web.savedrequest.RequestCacheAwareFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1600, Root bean: class [org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1700, Root bean: class [org.springframework.security.web.authentication.AnonymousAuthenticationFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 2000, Root bean: class [org.springframework.security.web.session.SessionManagementFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 2100, Root bean: class [org.springframework.security.web.access.ExceptionTranslationFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 2200, <org.springframework.security.web.access.intercept.FilterSecurityInterceptor#0>, order = 2300]
  106. Información: No authentication manager set. Reauthentication of users when changing passwords will not be performed.
  107. Información: Creating filter chain: org.springframework.security.web.util.matcher.AnyRequestMatcher@1, [org.springframework.security.web.context.SecurityContextPersistenceFilter@30a4da97, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@52be0af4, org.springframework.security.web.header.HeaderWriterFilter@137a85c0, org.springframework.security.web.authentication.logout.LogoutFilter@17e09526, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@106852f, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@234dd651, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@64de037d, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@7784f365, org.springframework.security.web.session.SessionManagementFilter@421e3f47, org.springframework.security.web.access.ExceptionTranslationFilter@fac960b, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@1b7db968]
  108. Información: Checking whether login URL '/login.jsf' is accessible with your configuration
  109. Información: Root WebApplicationContext: initialization completed in 4945 ms
  110. Información: Loading application [modulo-gecom] at [/modulo-gecom]
  111. Información: modulo-gecom was successfully deployed in 20.563 milliseconds.
  112. Grave: Error Rendering View[/index.xhtml]
  113. java.lang.NullPointerException
  114. at org.primefaces.component.chart.renderer.BarRenderer.encodeData(BarRenderer.java:35)
  115. at org.primefaces.component.chart.renderer.BasePlotRenderer.render(BasePlotRenderer.java:29)
  116. at org.primefaces.component.chart.ChartRenderer.encodeScript(ChartRenderer.java:95)
  117. at org.primefaces.component.chart.ChartRenderer.encodeEnd(ChartRenderer.java:68)
  118. at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:920)
  119. at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863)
  120. at javax.faces.render.Renderer.encodeChildren(Renderer.java:176)
  121. at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:890)
  122. at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856)
  123. at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
  124. at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
  125. at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:458)
  126. at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:134)
  127. at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
  128. at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
  129. at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
  130. at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
  131. at javax.faces.webapp.FacesServlet.service(FacesServlet.java:659)
  132. at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
  133. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344)
  134. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
  135. at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:316)
  136. at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126)
  137. at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90)
  138. at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
  139. at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
  140. at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
  141. at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:122)
  142. at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
  143. at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
  144. at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
  145. at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:169)
  146. at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
  147. at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:48)
  148. at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
  149. at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:205)
  150. at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
  151. at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:120)
  152. at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
  153. at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64)
  154. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  155. at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
  156. at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:53)
  157. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  158. at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
  159. at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:91)
  160. at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
  161. at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:213)
  162. at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176)
  163. at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
  164. at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
  165. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
  166. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
  167. at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
  168. at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
  169. at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
  170. at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
  171. at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
  172. at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
  173. at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416)
  174. at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283)
  175. at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
  176. at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
  177. at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)
  178. at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
  179. at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
  180. at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
  181. at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
  182. at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
  183. at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
  184. at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
  185. at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
  186. at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
  187. at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
  188. at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
  189. at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
  190. at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
  191. at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
  192. at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
  193. at java.lang.Thread.run(Thread.java:745)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement