2 Replies Latest reply on Mar 30, 2012 2:17 PM by Adrien Adrien

    [RF 3.3.x -> RF4.2] rich:JQuery function not generated

    Adrien Adrien Apprentice

      Hi

      I'm currently migrating from RF3.3.x to RF4.2.

       

      I've difficults to migrate some rich:query wich don't work in 4.2

      Here a sample :

      {code}

      ....

      <style type="text/css">

                          .curmsg{

                          border-color:  #FFBB00;

                          background-color:#F3F781;

                          }

       

                </style>

       

      ....

      <a4j:commandLink value="test"   render="det" execute="@this"   ajaxSingle="true" oncomplete="window.location.href = '#b';selectNewMsg('#b');"/>

       

      <rich:jQuery name="selectNewMsg"  query="addClass('curmsg');" />

                          <div id="a" >

                                              <div id="b" >

                                              <span id="ss">nl</span>

                                              </div>

                          </div>

      ....

      {code}

       

       

      Here the code in the result page in the browser :

       

      {code}

      ...

      <script type="text/javascript">selectNewMsgee = RichFaces.jQuery.createFunction({"query":"addClass('curmsg');"} );</script>

      ...

      {code}

       

      I'm expected to find in the page something like in RF 3.3 (?)

       

       

      <script type="text/javascript">//<![CDATA[

      function selectNewMsg(elm, param) {

      var selector = "";

      try {

      selector = eval("");

      } catch (e) {}


      jQuery(elm || selector).parent().parent().addClass('curmsg');

      }

      //]]></script>

       

       

      Does I m doing something wrong?

       

      Thanks

      Adrien