0

in my JSF 2.2 application I was trying to create an AJAX request using RichFaces 4.3.2 with .
The rendered HTML is:

<a href="#" id="x" name="x" onclick="RichFaces.ajax(x;,event,{x:x} );return false;">

The problem is that after clicking the link, nothing happens and an error in my Chrome Console appears:

Uncaught TypeError: Object #<Object> has no method 'ajax'

When I type RichFaces into console I get some autocomplete possibilities like `Event, valueOf' etc. but it doesn't see any specific RichFaces functions. It looks like the RichFaces library wouldn't be attached at all but I have no idea why.

Why is it happening?

The code of the commandLink:

<ui:repeat value="#{commonsOperations.newsList}" var="n">
     <li>
         <a4j:commandLink action="#{commonsOperations.setSelectedNews(n)}"
            value="#{n.title}" render="content" />
     </li>
</ui:repeat>

I found out the problem why RichFaces libraries were not loaded properly was the conflict between RichFaces and PrimeFaces. After removing PrimeFaces from POM, all RichFaces javascript files are loaded.

Nav
  • 437
  • 1
  • 8
  • 16

0 Answers0