1 Reply Latest reply on Feb 28, 2014 3:33 PM by fjuma

    rich:componentControl fails on JSF 1.2_08-b06-FCS to 2.0.11-SNAPSHOT upgrade.

    magwoodk

      We use Richfaces 3.3.4.Final and we are upgrading JSF from 1.2_08-b06-FCS to 2.0.11-SNAPSHOT

      At this point, many of our modals appear to be broken because of problems with rich:componentControl.

      Here is a sample of the code:

       

      <h:panelGrid width="800">

      <div align="center">

      <rich:panel>

        <a4j:commandLink reRender="modifyModal">

              <f:setPropertyActionListener value="#{null}" target="#{....widget.selected}" />

              <h:graphicImage style="border: 0px" id="Button_AddHelp" value="/.../add.gif" />

          <rich:componentControl id="AddCompControl" for="modifyModal" operation="#{...state.SHOW.value}" event="oncomplete"/>

          </a4j:commandLink>

          <rich:toolTip value="Add" for="Button_AddHelp" />

       

      The error thrown is at the bottom of this post.

       

      This link:  https://community.jboss.org/wiki/RichFaces33-4xMigrationGuideUnleashed

      suggests that the "for" attribute has been replaced by "target".

      But the target attribute is not recognized at all.  I get a jasper exception saying:

      "Attribute target invalid for tag componentControl according to TLD".

      Maybe this is expected because we are not up to Richfaces 4 yet.

       

      The same link also recommends moving the rich:componentControl code inside the h:graphicImage.

      I tried that, but then I get no action on clicking the link.  No error thrown, but no action either.

       

      Any help would be much appreciated.

       

      The error thrown due to the code above is:

      javax.servlet.ServletException: AjaxUpdate component not found for id: AddCompControl

          javax.faces.webapp.FacesServlet.service(FacesServlet.java:521)

          org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)

          org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)

          org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)

          org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)

        .

        .

        root cause

      javax.el.ELException: AjaxUpdate component not found for id: CT0Q_AddCompControl

          org.ajax4jsf.component.EventValueExpression.getComponent(EventValueExpression.java:86)

          org.ajax4jsf.component.AbstractEventValueExpression.getValue(AbstractEventValueExpression.java:98)

          org.ajax4jsf.component.html.HtmlAjaxCommandLink.getOncomplete(HtmlAjaxCommandLink.java:736)

          org.ajax4jsf.component.AjaxActionComponent.broadcast(AjaxActionComponent.java:79)

          org.ajax4jsf.component.UIInclude.broadcast(UIInclude.java:170)

          org.ajax4jsf.component.UIInclude.broadcast(UIInclude.java:170)

          org.ajax4jsf.component.UIInclude.broadcast(UIInclude.java:170)

          org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:329)

          org.ajax4jsf.component.AjaxViewRoot.broadcastAjaxEvents(AjaxViewRoot.java:348)

          org.ajax4jsf.application.AjaxViewHandler.processAjaxEvents(AjaxViewHandler.java:216)

          org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:169)

          com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)

          com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)

          com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)

          javax.faces.webapp.FacesServlet.service(FacesServlet.java:509)

          org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)

          org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)

          org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)

          org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)

        .

        .