1 Reply Latest reply on Sep 27, 2007 5:58 AM by ilya_shaikovsky

    Question about <a4j:include/>

      Hi,

      I'm facing problems with tag <a4j:include/> of richfaces-ui-3.1.0, I don't know what problem... but my app functioned with <a4j:include/> of richfaces-3.0.1.

      My question i't... What change of ajax4jsf for richfaces?

      I'm using a simple code:

      <a4j:include id="ajaxPanel" viewId="/register/#{bean.currentPage}" />
      


      Exception:
      
      javax.faces.FacesException: Could not retrieve value of component with path : {Component-Path : [Class: org.ajax4jsf.component.AjaxViewRoot,ViewId: /reg/main.xhtml][Class: org.ajax4jsf.component.html.Include,Id: ajaxPanel][Class: org.ajax4jsf.component.html.AjaxForm,Id: mainForm][Class: com.myapp.base.components.ApplyOperationsUIComponent,Id: _id73][Class: javax.faces.component.html.HtmlInputText,Id: mnemonicTextField]}
       at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getStringValue(RendererUtils.java:227)
       at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.renderInput(HtmlTextRendererBase.java:135)
       at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.encodeEnd(HtmlTextRendererBase.java:53)
       at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:539)
       at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:242)
       at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
       at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
       at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
       at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
       at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:580)
       at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
       at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
       at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
       at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      
      


      Thank's for help...

        • 1. Re: Question about <a4j:include/>
          ilya_shaikovsky

           

          private String property="included1.xhtml";
           public String getProperty1() {
           return property1;
           }
          
           public void setProperty1(String property1) {
           System.out.println("Setting property1 to _> "+ property1);
           this.property1 = property1;
           }


          <ui:define name="body">
           <f:verbatim>
           <a href="javascript:Richfaces.showModalPanel('_panel',{left:'auto', top:'auto'})">
           Show Modal Panel
           </a>
           </f:verbatim>
           <rich:modalPanel id="_panel">
           <a4j:include viewId="/pages/#{bean.property}"></a4j:include>
           </rich:modalPanel>
           </ui:define>


          and included1.xhml
          <ui:define name="body">
           <h:form>
           <h:outputText value="Go to the step 2"/>
           <a4j:commandButton value="next" action="included2" />
           </h:form>
           </ui:define>


          wizard works fine for me under RF 3.1.1 snapshot
          JSF 1.2_04 Facelets 1.1.12