2 Replies Latest reply on Jul 2, 2010 9:08 AM by Yuhong Zhang

    a4j:repeat and SEAM

    Yuhong Zhang Newbie

      I have been struggling with this for a few days. What I need to do is simple, but I just could not get it to work.

       

      What I need to do -- I have list of name value pairs, I need to the user to edit the text values in them

      What I use -- jboss-6.0.0.20100429-M3, seam 2.2.1.CR1, Richfaces 3.3.3_Final

      What I know so far

      • I cannot use the Richfaces demo example as it with SEAM becasue SEAM conponents does like me to use JSF binding
      • The following code worked in past (older version of everything) somehow, although I cannot get it to work anymore
      • I did try to use ajaxKeys, and rowKeyVar attributes in the repeat. But none is working.  And it is consistent, that it can display the values fine on the page.  But ajax actions cannot find the variables and back beans

       

      ...          <a:outputPanel id="configurations" ajaxRendered="true">
                      <a:repeat value="#{merchantController.propertyValues}"
                          var="_property">
                          <s:decorate template="/layout/edit.xhtml">
                              <ui:define name="label">#{_property.name}</ui:define>
                              <h:inputText value="#{_property.value}" required="true">
                                  <a:support event="onchange" limitToList="true" ajaxSingle="true" />
                              </h:inputText>
                          </s:decorate>
                      </a:repeat>
                 </a:outputPanel>

      ....

       

      • It seems that if I put an a4j:repeat section in the form, all my ajax actions (including the action out side the repeat block) got this error
      Cannot create Seam component, scope is not active: merchantController(...)

       

      • The onchange action, generate the following error

      12:30:26,376 WARNING [javax.enterprise.resource.webcontainer.jsf.lifecycle] javax.el.PropertyNotFoundException: /view/merchant/merchantEdit.xhtml @82,63 value="#{_property.value}": Target Unreachable,

      identifier '_property' resolved to null: javax.faces.FacesException: javax.el.PropertyNotFoundException: /view/merchant/merchantEdit.xhtml @82,63 value="#{_property.value}": Target Unreachable, ident

      ifier '_property' resolved to null

              at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1256) [:2.0.2-FCS]

              at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:672) [:2.0.2-FCS]

              at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1262) [:2.0.2-FCS]

              at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:672) [:2.0.2-FCS]

              at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1262) [:2.0.2-FCS]

              at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:672) [:2.0.2-FCS]

              at org.ajax4jsf.component.UIDataAdaptorBase.invokeOnComponent(UIDataAdaptorBase.java:1134) [:3.3.3.Final]

              at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1262) [:2.0.2-FCS]

              at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:672) [:2.0.2-FCS]

              at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1262) [:2.0.2-FCS]

              at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:672) [:2.0.2-FCS]

              at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1262) [:2.0.2-FCS]

              at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:672) [:2.0.2-FCS]

              at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1262) [:2.0.2-FCS]

              at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:672) [:2.0.2-FCS]

              at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:244) [:3.3.3.Final]

              at org.ajax4jsf.component.AjaxViewRoot.processValidators(AjaxViewRoot.java:463) [:3.3.3.Final]

              at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76) [:2.0.2-FCS]

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

              at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [:2.0.2-FCS]

              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312) [:2.0.2-FCS]

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:336) [:6.0.0.20100429-M3]

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.20100429-M3]

              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) [:2.2.1.CR1]

              at org.jboss.seam.web.RewriteFilter.doFilter(RewriteFilter.java:63) [:2.2.1.CR1]

              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [:2.2.1.CR1]

              at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40) [:2.2.1.CR1]

              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [:2.2.1.CR1]

              at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90) [:2.2.1.CR1]

              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [:2.2.1.CR1]

              at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64) [:2.2.1.CR1]

              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [:2.2.1.CR1]

              at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) [:2.2.1.CR1]

              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [:2.2.1.CR1]

              at org.jboss.seam.web.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:42) [:2.2.1.CR1]

              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [:2.2.1.CR1]

              at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206) [:3.3.3.Final]

              at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290) [:3.3.3.Final]

              at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388) [:3.3.3.Final]

              at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515) [:3.3.3.Final]

              at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56) [:2.2.1.CR1]

              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [:2.2.1.CR1]

              at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60) [:2.2.1.CR1]

              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [:2.2.1.CR1]

              at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53) [:2.2.1.CR1]

              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [:2.2.1.CR1]

              at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) [:2.2.1.CR1]

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.20100429-M3]

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.20100429-M3]

              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:293) [:6.0.0.20100429-M3]

              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:6.0.0.20100429-M3]

              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183) [:6.0.0.20100429-M3]

              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95) [:6.0.0.20100429-M3]

              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126) [:6.0.0.20100429-M3]

              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70) [:6.0.0.20100429-M3]

              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.20100429-M3]

              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.20100429-M3]

              at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.20100429-M3]

              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.20100429-M3]

              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [:6.0.0.20100429-M3]

              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:872) [:6.0.0.20100429-M3]

              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [:6.0.0.20100429-M3]

              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.0.0.20100429-M3]

              at java.lang.Thread.run(Thread.java:619) [:1.6.0_14]

      Caused by: javax.el.PropertyNotFoundException: /view/merchant/merchantEdit.xhtml @82,63 value="#{_property.value}": Target Unreachable, identifier '_property' resolved to null

              at com.sun.facelets.el.TagValueExpression.getType(TagValueExpression.java:62) [:1.1.15.B1]

              at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:95) [:2.0.2-FCS]

              at javax.faces.component.UIInput.getConvertedValue(UIInput.java:1008) [:2.0.2-FCS]

              at javax.faces.component.UIInput.validate(UIInput.java:934) [:2.0.2-FCS]

              at javax.faces.component.UIInput.executeValidate(UIInput.java:1189) [:2.0.2-FCS]

              at javax.faces.component.UIInput.processValidators(UIInput.java:691) [:2.0.2-FCS]

              at org.ajax4jsf.component.AjaxViewRoot$3.invokeContextCallback(AjaxViewRoot.java:447) [:3.3.3.Final]

              at org.ajax4jsf.component.ContextCallbackWrapper.invokeContextCallback(ContextCallbackWrapper.java:44) [:3.3.3.Final]

              at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1253) [:2.0.2-FCS]

              ... 63 more