2 Replies Latest reply on Jan 12, 2009 9:37 AM by rcherchi

    Richfaces is not defined

    rcherchi

      Hi guys,

      I'm using seam 2.1.1.CR1 and I have a strange issue with the code generated by a4j:form and a4j:jsFunction

      _clearJSFFormParameters is not defined


      Here is the xhtml :

      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
       xmlns:s="http://jboss.com/products/seam/taglib"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:a4j="http://richfaces.org/a4j"
       xmlns:c="http://java.sun.com/jstl/core"
       xmlns:fn="http://java.sun.com/jsp/jstl/functions"
       template="/layout/default.xhtml">
      
      [... some code ...]
      
      <a4j:outputPanel id="resultLst">
       [... some code ...]
      </a4j:outputPanel>
      
      <a4j:form>
       <a4j:jsFunction name="refreshPOIAroundResultList"
       reRender="resultLst"
       oncomplete="index.refreshPoiResultListCallbackComplete();" />
      </a4j:form>
      
      Here is the rendered code :
      
      <div style="margin-top: 5px; text-align: right;"><a id="view-all-link-1" name="view-all-link-1" href="/local-search.seam?what=MUSEUM&where=QUITO">» View all</a>
       </div></span><form id="j_id155" name="j_id155" method="post" action="/poi.seam"><script id="j_id155:j_id156" type="text/javascript">//<![CDATA[
       refreshPOIAroundResultList=function(){A4J.AJAX.Submit('_viewRoot','j_id155',null,{'parameters':{'j_id155:j_id156':'j_id155:j_id156'} ,'actionUrl':'/poi.seam','oncomplete':function(request,event,data){index.refreshPoiResultListCallbackComplete();}} )};
       //]]></script><input type="hidden" name="j_id155" value="j_id155" /><input type="hidden" name="autoScroll" value="" /><input type="hidden" name="j_id155:_link_hidden_" value="" /><input type="hidden" name="j_id155:j_idcl" value="" /><script type="text/javascript">function clear_j_id155() {
      _clearJSFFormParameters('j_id155','',['j_id155:_link_hidden_','j_id155:j_idcl']);
      }
      function clearFormHiddenParams_j_id155(){clear_j_id155();}
      function clearFormHiddenParams_j_id155(){clear_j_id155();}
      clear_j_id155();</script><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="j_id24" /></form>
       </div>


      It's strange because the same code works well on other pages of my site.

      I also get a javascript error :

      Richfaces is not defined


      Code :
      <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:rich="http://richfaces.org/rich"
       xmlns:fn="http://java.sun.com/jsp/jstl/functions">
      
       <rich:suggestionbox id="#{suggestionBoxId}"
       for="#{inputTextId}"
       suggestionAction="#{globalServiceManager.autocompleteCtgDetails}"
       var="suggestedCtg"
       requestDelay="10"
       ignoreDupResponses="true">
      
       <h:column id="#{suggestionBoxId}-col-#{suggestedCtg.id}">
       <h:outputText id="#{suggestionBoxId}-output-#{suggestedCtg.id}" value="#{fn:toLowerCase(suggestedCtg.name)}"/>
       </h:column>
      
       </rich:suggestionbox>
      
      </ui:composition>


      Thanks for you help.

        • 1. Re: Richfaces is not defined
          ilya_shaikovsky

          describe your environment more carefully (JSF, RF, versions, maybe some additional libraries like tomahawk?) and show your web.xml please.

          • 2. Re: Richfaces is not defined
            rcherchi

            Sure (sorry about that), I use :

            richfaces : 3.2.2.SR1
            jsf-api and jsf-impl : 1.2_09-BETA1

            no tomahawk

            web.xml :

            (yeah ! you solved my problem)

            I use a library for url rewriting and I placed it in the top of my web.xml file.

            I moved it at the end and it works fine now.

            Thank you !