Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-12211

ui:repeat within rich:accordion not working (AbstractAccordion.getActiveItem NPE)

    Details

      Description

      If we use <ui:repeat within <rich:accordion, we've got an issue :
      <rich:accordion switchType="ajax">
      <ui:repeat var="historyTransactionBean" items="#

      {policyTransactionController.historyTransactionBeans}

      ">
      <rich:accordionItem header="#

      {historyTransactionBean.creationDate}">
      <p>Creation Date :<h:outputText value="#{historyTransactionBean.creationDate}

      "/></p>
      <ul>
      <li>Rating Date :<h:outputText value="#

      {historyTransactionBean.ratingDate}"/></li>
      <li>Status :<h:outputText value="#{historyTransactionBean.status}"/></li>
      <li>Premium :<h:outputText value="#{historyTransactionBean.premium}"/></li>
      <li>Uploaded :<h:outputText value="#{historyTransactionBean.uploaded}"/></li>
      </ul>
      </rich:accordionItem>
      </ui:repeat>

      org.richfaces.context.ExtendedPartialViewContextImpl$RenderVisitCallback logException <Null Message>
      java.lang.NullPointerException
      at org.richfaces.component.AbstractAccordion.getActiveItem(AbstractAccordion.java:54)
      at org.richfaces.component.AbstractTogglePanel.encodeBegin(AbstractTogglePanel.java:161)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1777)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
      at org.richfaces.renderkit.RendererBase.renderChildren(RendererBase.java:276)
      at org.richfaces.renderkit.html.TogglePanelItemRenderer.doEncodeChildren(TogglePanelItemRenderer.java:136)
      at org.richfaces.renderkit.html.TabRenderer.doEncodeChildren(TabRenderer.java:107)
      at org.richfaces.renderkit.RendererBase.encodeChildren(RendererBase.java:157)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779)
      at org.richfaces.renderkit.html.TogglePanelRenderer.encodeMetaComponent(TogglePanelRenderer.java:185)
      at org.richfaces.component.AbstractTogglePanel.encodeMetaComponent(AbstractTogglePanel.java:682)
      at org.richfaces.context.ExtendedPartialViewContextImpl$RenderVisitCallback.visit(ExtendedPartialViewContextImpl.java:493)
      at org.richfaces.context.BaseExtendedVisitContext.invokeVisitCallback(BaseExtendedVisitContext.java:321)
      at org.richfaces.context.ExtendedVisitContext.invokeMetaComponentVisitCallback(ExtendedVisitContext.java:68)
      at org.richfaces.component.AbstractTogglePanel.visitTree(AbstractTogglePanel.java:706)
      at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
      at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
      at javax.faces.component.UINamingContainer.visitTree(UINamingContainer.java:163)
      at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
      at org.richfaces.component.AbstractTogglePanel.visitTree(AbstractTogglePanel.java:719)
      at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
      at javax.faces.component.UIForm.visitTree(UIForm.java:371)
      at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
      at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
      at org.richfaces.context.ExtendedPartialViewContextImpl.processPartialRenderPhase(ExtendedPartialViewContextImpl.java:272)
      at org.richfaces.context.ExtendedPartialViewContextImpl.processPartial(ExtendedPartialViewContextImpl.java:194)
      at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:981)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779)
      at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:391)
      at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:125)
      at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
      at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1147)
      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:722)
      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:449)
      at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
      at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:125)
      at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:92)
      at com.intact.crm.web.filter.LoginFilter.doFilter(LoginFilter.java:55)
      at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:192)
      at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:89)
      at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:113)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:192)
      at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:89)
      at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:919)
      at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1016)
      at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87)
      at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:886)
      at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1655)
      at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:195)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
      at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
      at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
      at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
      at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
      at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
      at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
      at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
      at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1650)

      But if I replace ui:repeat by c:foreach, everything works fine :
      <rich:accordion switchType="ajax">
      <c:forEach var="historyTransactionBean" items="${policyTransactionController.historyTransactionBeans}">
      <rich:accordionItem header="#{historyTransactionBean.creationDate}">
      <p>Creation Date :<h:outputText value="#{historyTransactionBean.creationDate}"/></p>
      <ul>
      <li>Rating Date :<h:outputText value="#{historyTransactionBean.ratingDate}

      "/></li>
      <li>Status :<h:outputText value="#

      {historyTransactionBean.status}

      "/></li>
      <li>Premium :<h:outputText value="#

      {historyTransactionBean.premium}

      "/></li>
      <li>Uploaded :<h:outputText value="#

      {historyTransactionBean.uploaded}

      "/></li>
      </ul>
      </rich:accordionItem>
      </c:forEach>
      </rich:accordion>

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  thierryheraud Thierry.Xavier HÉRAUD
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: