5 Replies Latest reply on Apr 21, 2008 3:50 AM by ilya_shaikovsky

    rich:component not found error

    echen1

      I copied the following code from Exadel's live demo site (http://livedemo.exadel.com/richfaces-demo/richfaces/modalPanel.jsf). I put it into my Seam generated application. Could somebody help me with the issue of "Function 'rich:component' not found"? I copied richfaces-api.jar into the web_inf folder when I noticed it was not there. It is showing in my Eclipse Seam perspective in both EAR libraries and web app libraries subfolders under the libraries folder. Do I need to import it into some java code? Thanks much in advance...

      <ui:composition xmlns="http://www.w3.org/1999/xhtml"

      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich">


      function getRightTop(ref) {
      var position = new Object();
      position.top = 0; //ref.offsetTop;
      position.left =0; // ref.offsetLeft+ref.clientWidth+6;
      return position;
      }


      <rich:modalPanel id="mp" minHeight="200" minWidth="450"
      height="200" width="500" zindex="2000">
      <f:facet name="header">
      <h:outputText value="Modal Panel Title" />
      </f:facet>

      <f:facet name="controls">
      </f:facet>
      Any JSF content might be inside the panel. In case of using
      Facelets or JSF 1.2, it might be any mixed content.
      The RichFaces modal panel is good with <a4j:include> to create
      a wizard like behavior.
      The model panel is open and closed from the javascript function
      on Richfaces object. The following code

      <a href="#" onclick="#{rich:component('mp')}.hide()">hide this panel:
      <f:verbatim>#</f:verbatim>{rich:component('mp')}.hide()
      </rich:modalPanel>
      </ui:composition>