We migrated our JSF 2.2 based application to JSF 2.3, Except of some smaller issues we were able to get everything up and running. For one view we use Butterfaces JSF component, especially the tree component. With JSF 2.3 it was not possible to select a node and to show details of that node in another container. The apprropriate Ajax request sends the id of the node as options.params
. That worked fine with JSF 2.2 but is not working anymore with JSF 2.3. We are still on Butterfaces 2 ( which should work due to downward compatibility), but even in the showcase of Butterfaces 3 on Java EE 8, the select via Ajax seems not to work.
I had a look on the jsf.ajax.request
Javascript method of JSF 2.3, debugged it and realized, that the param was ignored and deleted since it seems to be the wrong format. Thus, I monkey patched the method in our application with this little stupid code snippet, to get the param sent to the server via the ajax request:
var originalJsfAjaxRequest = jsf.ajax.request;
jsf.ajax.request = function (source, event, options) {
options.params = {params: options.params};
originalJsfAjaxRequest.apply(this, [source, event, options]);
}
That's it, it is working fine again.
So my question is, where the problem is supposed to be. Is it a problem in JSF to ignore these sort of params. Or is it a problem of Butterfaces using the parameters in a wrong way? What is the correct way, to use options.params
?
Thanks in advance