PrimeFaces 7.0 getCallbackParams() not found

3.2k Views Asked by At

I just upgraded from PrimeFaces 6.2 to 7.0 and I'm unable to find getCallbackParams(). In PrimeFaces 6.2 it wasn't deprecated nor there was an hint of it being moved in further releases.

Some of the RequestContext functions were moved to PrimeFaces.current().ajax() (like addCallbackParam()) but it wasn't there either.

Has it been removed or moved elsewhere?

1

There are 1 best solutions below

1
On BEST ANSWER

You can still do so by calling:

PrimeRequestContext.getCurrentInstance().getCallbackParams();

This is just what the org.primefaces.PrimeFaces.Ajax class is doing:

public void addCallbackParam(String name, Object value) {
        getRequestContext().getCallbackParams().put(name, value);
}

protected PrimeRequestContext getRequestContext() {
    return PrimeRequestContext.getCurrentInstance();
}