2 Replies Latest reply on Jan 12, 2009 3:40 PM by romain.dev.easycity.com

    Richfaces issue : _clearJSFFormParameters is not defined

    romain.dev.easycity.com

      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">&raquo; 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.


      Any clue ?

        • 1. Re: Richfaces issue : _clearJSFFormParameters is not defined
          romain.dev.easycity.com

          I just updated seam to 2.1.1.GA and I have a new similar issue :



          Richfaces is not defined
          



          Here is the 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>
          



          Something wrong with my Richfaces configuration ?

          • 2. Re: Richfaces issue : _clearJSFFormParameters is not defined
            romain.dev.easycity.com

            Solved :


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


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


            Thank you !