1 Reply Latest reply on May 31, 2007 6:24 AM by Alexander Furer

    reRender jsp:include

    Alexander Furer Newbie

      Hello
      I'm trying to reRender a4j outputPanel that contains jsp:include.
      The content of outputPanel gets rerendered, but when i click on save button, the same view is rendered and action method is not called.
      Suspect logs :
      .......................
      1051625 [http-8080-3] DEBUG org.apache.myfaces.application.jsp.JspStateManagerImpl - Exiting restoreTreeStructure - No serialized view found in server session!
      1051625 [http-8080-3] DEBUG org.apache.myfaces.application.jsp.JspStateManagerImpl - Exiting restoreView
      1051625 [http-8080-3] DEBUG org.apache.myfaces.el.VariableResolverImpl - Variable 'ajaxContext' could not be resolved.
      1051625 [http-8080-3] DEBUG org.apache.myfaces.application.jsp.JspViewHandlerImpl - Created view /depStaffMngr/editClient.jsp
      1051625 [http-8080-3] DEBUG org.ajax4jsf.framework.renderer.AjaxPhaseListener - Process after phase RESTORE_VIEW(1)
      1051625 [http-8080-3] DEBUG org.apache.myfaces.lifecycle.LifecycleImpl - exiting from lifecycle.execute in RESTORE_VIEW(1) because getRenderResponse is true from one of the after listeners
      1051625 [http-8080-3] DEBUG org.apache.myfaces.lifecycle.LifecycleImpl - entering RENDER_RESPONSE(6) in org.apache.myfaces.lifecycle.LifecycleImpl
      1051625 [http-8080-3] DEBUG org.ajax4jsf.framework.renderer.AjaxPhaseListener - Process before phase RENDER_RESPONSE(6)
      .......................


      <t:selectOneListbox id="status" size="1" value="#{clientBean.obj.statustype.statusId}" readonly="#{clientBean.editMode}">
       <f:selectItems value="#{clientBean.statusTypes}" />
      <a4j:support event="onchange" actionListener="#{clientBean.statusChanged}" status="ajaxStatus" id="statusAjaxSupport" reRender="subStatus"/>
      </t:selectOneListbox>
      
      <t:selectOneListbox id="subStatus" size="1" value="#{clientBean.obj.subStatusType.id}" >
       <f:selectItems value="#{clientBean.subStatusTypes}" />
       </t:selectOneListbox>
      ...........................
      <a4j:outputPanel ajaxRendered="true" id="addInfoAjaxPanel" >
       <f:subview id="addInfo">
       <jsp:include page="${clientBean.addJSP}" />
       </f:subview>
      </a4j:outputPanel>
      
      <t:commandButton value="#{msg['save']}" action="#{clientBean.saveObject}"/>
      

      What can be the problem?
      Why "No serialized view found in server session!" ?
      Thanks

        • 1. Re: reRender jsp:include
          Alexander Furer Newbie

          More details:
          When the page is loaded first time,
          clientBean.getAddJSP() returns empty.jsp with no content inside at all.
          When status is changed clientBean.getAddJSP() returns add1.jsp, add2.jsp ... addN.jsp according to selected status. This additional jsp gets reRendered OK, but click on save button works ONLY if i change status back to empty value (in this case clientBean.getAddJSP() return empty.jsp), in other cases i get "No serialized view found in server session!."
          Can it be that when strusture of view has been changed (additional components were added) in ajax request, the view became invalid ?
          Thanks