7 Replies Latest reply on Oct 27, 2014 6:56 AM by Paul Baker

    rich:focus -  SEVERE [ExtendedPartialViewContextImpl$RenderVisitCallback Error

    Paul Baker Apprentice

      I tried applying the rich:Focus component to my application and started receiving the following errors when changing tabs. When I remove the rich:focus the errors stop.

      2013-06-28 13:32:23,528 SEVERE [ExtendedPartialViewContextImpl$RenderVisitCallback.logException] j_idt83: java.lang.IllegalArgumentException: j_idt83

              at javax.faces.component.UIComponentBase.findComponent(UIComponentBase.java:606) [:2.1.2-FCS]

              at org.richfaces.renderkit.util.RendererUtils.findComponentFor(RendererUtils.java:759) [:4.3.2.Final]

              at org.richfaces.renderkit.focus.AbstractFocusRenderStrategy.getFocusedComponent(AbstractFocusRenderStrategy.java:91) [:4.3.2.Final]

              at org.richfaces.renderkit.focus.AbstractFocusRenderStrategy.getSubmittedFocus(AbstractFocusRenderStrategy.java:79) [:4.3.2.Final]

              at org.richfaces.renderkit.focus.AbstractFocusRenderStrategy.getFocusCandidates(AbstractFocusRenderStrategy.java:40) [:4.3.2.Final]

              at org.richfaces.renderkit.focus.AbstractFocusRenderStrategy.getFocusCandidatesAsString(AbstractFocusRenderStrategy.java:24) [:4.3.2.Final]

              at org.richfaces.renderkit.focus.FormFocusRenderStrategy.getFocusCandidatesAsString(FormFocusRenderStrategy.java:65) [:4.3.2.Final]

              at org.richfaces.renderkit.FocusRendererBase.getFocusCandidatesAsString(FocusRendererBase.java:38) [:4.3.2.Final]

              at org.richfaces.renderkit.html.FocusRenderer.doEncodeEnd(FocusRenderer.java:91) [:4.3.2.Final]

              at org.richfaces.renderkit.RendererBase.encodeEnd(RendererBase.java:175) [:4.3.2.Final]

              at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875) [:2.1.2-FCS]

              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1763) [:2.1.2-FCS]

              at org.richfaces.context.ExtendedPartialViewContextImpl$RenderVisitCallback.visit(ExtendedPartialViewContextImpl.java:557) [:4.3.2.Final]

              at org.richfaces.context.RenderExtendedVisitContext.invokeVisitCallbackForImplicitComponent(RenderExtendedVisitContext.java:70) [:4.3.2.Final]

              at org.richfaces.context.BaseExtendedVisitContext.invokeVisitCallback(BaseExtendedVisitContext.java:333) [:4.3.2.Final]

              at javax.faces.component.UIComponent.visitTree(UIComponent.java:1589) [:2.1.2-FCS]

              at javax.faces.component.UIComponent.visitTree(UIComponent.java:1600) [:2.1.2-FCS]

              at javax.faces.component.UIForm.visitTree(UIForm.java:344) [:2.1.2-FCS]

              at javax.faces.component.UIComponent.visitTree(UIComponent.java:1600) [:2.1.2-FCS]

              at javax.faces.component.UIComponent.visitTree(UIComponent.java:1600) [:2.1.2-FCS]

              at org.richfaces.context.ExtendedPartialViewContextImpl.processPartialRenderPhase(ExtendedPartialViewContextImpl.java:310) [:4.3.2.Final]

              at org.richfaces.context.ExtendedPartialViewContextImpl.processPartial(ExtendedPartialViewContextImpl.java:213) [:4.3.2.Final]

              at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:981) [:2.1.2-FCS]

              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1756) [:2.1.2-FCS]

              at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:390) [:2.1.2-FCS]

              at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131) [:2.1.2-FCS]

              at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288) [:2.1.2-FCS]

              at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121) [:2.1.2-FCS]

              at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [:2.1.2-FCS]

              at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) [:2.1.2-FCS]

              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594) [:2.1.2-FCS]

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.Final]

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]

              at com.mnat.store.client.utils.SessionTimeoutFilter.doFilter(SessionTimeoutFilter.java:57) [:]

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.Final]

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]

              at com.mnat.store.client.utils.SessionTimeoutFilter.doFilter(SessionTimeoutFilter.java:57) [:]

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.Final]

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]

              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.0.0.Final]

              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:6.0.0.Final]

              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0.Final]

              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:593) [:6.0.0.Final]

              at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.Final]

              at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.Final]

              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0.Final]

              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.0.0.Final]

              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.Final]

              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.Final]

              at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.Final]

              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.Final]

              at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0.Final]

              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.0.0.Final]

              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.0.0.Final]

              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [:6.0.0.Final]

              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.0.0.Final]

              at java.lang.Thread.run(Thread.java:662) [:1.6.0_27]

       

      The rich:focus is added following the form like shown here.

       

      <h:body
        onload="#{rich:component('waitPanel')}.hide(); document.body.style.cursor = 'default';">
        <h:form id="form">
         <rich:focus />

         <div class="ui-layout-north">
          <ui:insert name="header" />
         </div>

         <div class="ui-layout-center">
          <ui:insert name="content" />
         </div>

         <div class="ui-layout-south">
          <ui:insert name="footer" />
         </div>

        </h:form>

       

      The "content" is structured like this:

      <ui:define name="content">
           <div
              style="width: 100%; overflow: hidden;"
              align="center">

              <rich:tabPanel
                  id="#{cid.itmTabPnl}"
                  switchType="ajax"
                  styleClass="pnlDialog"
                  style="margin-top: 20px;"
                  itemChangeListener="#{itemTabController.tabItemChangeListener}">

                  <rich:tab
                      name="General"
                      style="vertical-align: bottom;">
                       <ui:include
                           src="/fragments/inventory/generalInfo.xhtml" />
                  </rich:tab>

                  <rich:tab
                      name="Standard Characteristics"
                      style="vertical-align: bottom;"
                      disabled="#{(not inventoryController.invItemCategorySet)}">
                       <ui:include
                            src="/fragments/inventory/stdCharacteristics.xhtml" />
                  </rich:tab>
      ...
      ...

       

      When user changes from frist tab to second tab the error log entry is generated in the log file.

       

      Environment:

      Richfaces   4.3.2.Final

      Windows 7

      JBoss: AS6

      JSF: Mojarra-2.1

       

      I've removed the rich:focus.  Has anyone had the same issue and found a resolution?

        • 1. Re: rich:focus -  SEVERE [ExtendedPartialViewContextImpl$RenderVisitCallback Error
          Lukáš Fryč Master

          Hey Paul,

           

          in order to identify what's an issue you need to know what the component identifier "j_idt83" stands for.

          Could you debug the page - look into ui:debug tree view for a component for that identifier?

          • 2. Re: rich:focus -  SEVERE [ExtendedPartialViewContextImpl$RenderVisitCallback Error
            Paul Baker Apprentice

            Hi Lukáš,

             

            Thanks for replying.. I'll provide anything you need to help solve the issue.. I appreciate the help. 

             

            I have a tab panel and the rqmt is to allow the user to tab from the last field on one tab panel to the first field on the next tab panel. Since rich:select does not have a tabindex attribute we created a js file that will loop through all the child input components in a tab and set (or add and set) the tabindex attribute to each input field and also set the focus.. but the focus is not working for me here either as the browser URL input always gets the focus even though I am able to select the first input field on the next tab panel.. That may be TMI for now... Here is the info you requested.

             

            id: j_idt91 is associated with the first tab panel tab header:

             

            <form name="form" id="form"
              action="/MNaTStore/pages/inventory/manageInventory.xhtml"
              enctype="application/x-www-form-urlencoded" method="post">
              <input name="form" type="hidden" value="form">
              <span class="rf-fcs" id="form:j_idt15">
               <input name="org.richfaces.focus" id="form:j_idt15InputFocus" type="hidden"
               value="form:itmCat1LnkFld form:itmGnlPnl_body form:itmGnlPnl form:j_idt91:content form:j_idt91 form:itmTabPnl form">
              </span>
              <div
              class="ui-layout-north ui-layout-pane ui-layout-pane-north"
              style="background: rgb(255, 255, 255); margin: 0px; padding: 10px; border: 1px solid rgb(187, 187, 187); left: 0px; top: 0px; width: auto; height: 49px; right: 0px; bottom: auto; overflow: auto; display: block; visibility: visible; position: absolute; z-index: 0;">
              <span id="form:j_idt19" style="padding: 0px;">
              <table class="rf-tb " id="form:j_idt20"
               style="padding: 0px; width: 100%;">
               <colgroup>
                <col style="width: 1px;">
                <col style="width: 1px;">
                <col style="width: 1px;">
                <col style="width: 1px;">
            

             

             

             

             

            Some additional info; the second tab panel component is built using a java backing bean. I can send more info if needed. I am using IE10.

             

            Here is the log error that is generated when the user select the second tab

             

            2013-07-02 08:03:00,735 SEVERE [ExtendedPartialViewContextImpl$RenderVisitCallback.logException] j_idt91: java.lang.IllegalArgumentException: j_idt91
                    at javax.faces.component.UIComponentBase.findComponent(UIComponentBase.java:606) [:2.1.2-FCS]
                    at org.richfaces.renderkit.util.RendererUtils.findComponentFor(RendererUtils.java:759) [:4.3.2.Final]
                    at org.richfaces.renderkit.focus.AbstractFocusRenderStrategy.getFocusedComponent(AbstractFocusRenderStrategy.java:91) [:4.3.2.Final]
                    at org.richfaces.renderkit.focus.AbstractFocusRenderStrategy.getSubmittedFocus(AbstractFocusRenderStrategy.java:79) [:4.3.2.Final]
                    at org.richfaces.renderkit.focus.AbstractFocusRenderStrategy.getFocusCandidates(AbstractFocusRenderStrategy.java:40) [:4.3.2.Final]
                    at org.richfaces.renderkit.focus.AbstractFocusRenderStrategy.getFocusCandidatesAsString(AbstractFocusRenderStrategy.java:24) [:4.3.2.Final]
                    at org.richfaces.renderkit.focus.FormFocusRenderStrategy.getFocusCandidatesAsString(FormFocusRenderStrategy.java:65) [:4.3.2.Final]
                    at org.richfaces.renderkit.FocusRendererBase.getFocusCandidatesAsString(FocusRendererBase.java:38) [:4.3.2.Final]
                    at org.richfaces.renderkit.html.FocusRenderer.doEncodeEnd(FocusRenderer.java:91) [:4.3.2.Final]
                    at org.richfaces.renderkit.RendererBase.encodeEnd(RendererBase.java:175) [:4.3.2.Final]
                    at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875) [:2.1.2-FCS]
                    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1763) [:2.1.2-FCS]
                    at org.richfaces.context.ExtendedPartialViewContextImpl$RenderVisitCallback.visit(ExtendedPartialViewContextImpl.java:557) [:4.3.2.Final]
                    at org.richfaces.context.RenderExtendedVisitContext.invokeVisitCallbackForImplicitComponent(RenderExtendedVisitContext.java:70) [:4.3.2.Final]
                    at org.richfaces.context.BaseExtendedVisitContext.invokeVisitCallback(BaseExtendedVisitContext.java:333) [:4.3.2.Final]
                    at javax.faces.component.UIComponent.visitTree(UIComponent.java:1589) [:2.1.2-FCS]
                    at javax.faces.component.UIComponent.visitTree(UIComponent.java:1600) [:2.1.2-FCS]
                    at javax.faces.component.UIForm.visitTree(UIForm.java:344) [:2.1.2-FCS]
                    at javax.faces.component.UIComponent.visitTree(UIComponent.java:1600) [:2.1.2-FCS]
                    at javax.faces.component.UIComponent.visitTree(UIComponent.java:1600) [:2.1.2-FCS]
                    at org.richfaces.context.ExtendedPartialViewContextImpl.processPartialRenderPhase(ExtendedPartialViewContextImpl.java:310) [:4.3.2.Final]
                    at org.richfaces.context.ExtendedPartialViewContextImpl.processPartial(ExtendedPartialViewContextImpl.java:213) [:4.3.2.Final]
                    at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:981) [:2.1.2-FCS]
                    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1756) [:2.1.2-FCS]
                    at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:390) [:2.1.2-FCS]
                    at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131) [:2.1.2-FCS]
                    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288) [:2.1.2-FCS]
                    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121) [:2.1.2-FCS]
                    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [:2.1.2-FCS]
                    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) [:2.1.2-FCS]
                    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594) [:2.1.2-FCS]
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.Final]
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
                    at com.mnat.store.client.utils.SessionTimeoutFilter.doFilter(SessionTimeoutFilter.java:57) [:1.0.2.SNAPSHOT]
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.Final]

             

            • 3. Re: rich:focus -  SEVERE [ExtendedPartialViewContextImpl$RenderVisitCallback Error
              Paul Baker Apprentice

              Hi Lukáš,

               

              After looking into it a bit more, field id is contains within both the tab 1 and tab 2 panels. 

              I have attached the html from both tabs that I saved from IE 10 debug window.

              PLease let me know what else I can provide.

               

              Thanks again.

               

              Paul

              • 4. Re: rich:focus -  SEVERE [ExtendedPartialViewContextImpl$RenderVisitCallback Error
                Paul Baker Apprentice

                Attached is the complete UI:Debug output for tabs 1 and 2.

                 

                <UITab bypassUpdates="false" execute=" itmTabPnl" header="General" id="j_idt92" immediate="true" inView="true" limitRender="false" name="General" rendered="true" style="vertical-align: bottom; overflow:auto;" switchType="ajax" transient="false">

                 

                • 5. Re: rich:focus -  SEVERE [ExtendedPartialViewContextImpl$RenderVisitCallback Error
                  Paul Baker Apprentice

                  Hi Lukáš,

                  Where you able to find anything using the information I attached?  Please let me know if I can provide any additional details.

                  Thanks, Paul

                  • 6. Re: rich:focus -  SEVERE [ExtendedPartialViewContextImpl$RenderVisitCallback Error
                    Milos Damnjanovic Newbie

                    I solved this problem on my side when I set value for id of component has to be focused after rendering. Please try to set some id on your first rich:tab component

                    • 7. Re: rich:focus -  SEVERE [ExtendedPartialViewContextImpl$RenderVisitCallback Error
                      Paul Baker Apprentice

                      Hi Milos, I'll try and let you know... Thanks for posting this. Paul