A4J function calls always fail in RichFaces 4

Solution Unverified - Updated -

Environment

  • JBoss Web Framework Kit (WFK)
    • 2.5.0
    • RichFaces (RF)
    • 4

Issue

  • A4J function calls always fail when a application migrates to RF 4 from RF 3

    A4J.AJAX.onError = function(req,status,message)  {
    ....
    };  
    
    A4J.AJAX.onExpired = function(loc, expiredMsg){
    ....
    }
    

Resolution

  • The A4J object no longer exists in RichFaces 4 as JSF 2 standardized basic ajax features. Use jsf.ajax.AddOnEvent(callback) and jsf.ajax.addOnError(callback) methods1.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments