3 Replies Latest reply on Apr 4, 2014 6:01 AM by michpetrov

    Migration from Richfaces 4 to 5 - Ajax issue

    cohencyr4

      Hello,

       

      I've just migrate my project from RF4 to RF5 and I faces some ajax issues.

       

      For example, I've changed:

      <h:inputText value="#{user.businessunitfilter}">

        <a4j:ajax event="keyup" render="businessunitlist" />

      </h:inputText>

      to:

      <h:inputText value="#{user.businessunitfilter}">

        <r:ajax event="keyup" render="businessunitlist" />

      </h:inputText>

       

      In RF4 i was working fine, after changing to RF5 it behaves like there is no keyup event, I mean the value of "user.businessunitfilter" doesn't change (I've even printed logs in the getter and setter functions).

       

      This is how it is generated in the html code, it may be help:

      <input id="filterform:j_idt45" type="text" name="filterform:j_idt45" value="" onkeyup="RichFaces.ajax(this,event,{&quot;parameters&quot;:{&quot;javax.faces.behavior.event&quot;:&quot;keyup&quot;,&quot;org.richfaces.ajax.component&quot;:&quot;filterform:j_idt45&quot;} ,&quot;sourceId&quot;:this} )" />

        • 1. Re: Migration from Richfaces 4 to 5 - Ajax issue
          michpetrov

          Hi,

           

          I see no error in the code, and the same thing works in showcase. Try using <r:log>, or setting a breakpoint on the RichFaces.ajax() to see if it gets executed.

          • 2. Re: Migration from Richfaces 4 to 5 - Ajax issue
            cohencyr4

            I've just added "<r:log/>" in this page and this is what i get:


            info [12:48:06.692]: Received 'begin' event from <input id=filterform:j_idt46 ...>

            info [12:48:06.777]: Received 'beforedomupdate' event from <input id=filterform:j_idt46 ...>

            info [12:48:06.779]: Listing content of response changes element:
            Element update for id=j_id1:javax.faces.ViewState:0
            <update id="j_id1:javax.faces.ViewState:0"><![CDATA[-8568935678015307422:-3581161796047996750]]></update>
            Element extension for id=org.richfaces.extension
            <extension id="org.richfaces.extension"><render>businessunitlist</render></extension>

            warn [12:48:06.781]: richfaces.queue: ajax submit error: Object #<Text> has no method 'getAttribute'

            error[12:48:06.781]: Received 'error@malformedXML' event from <input id=filterform:j_idt46 ...>

            error[12:48:06.781]: [200] Object #<Text> has no method 'getAttribute'

            info [12:48:06.781]: Received 'complete' event from <input id=filterform:j_idt46 ...>

            • 3. Re: Migration from Richfaces 4 to 5 - Ajax issue
              michpetrov

              That looks like a JSF error, see JAVASERVERFACES-2907. What server you're running on?