jsr372-experts@javaserverfaces-spec-public.java.net

[jsr372-experts] jsf.ajax.request() options.params is never considered in Mojarra

From: Bauke Scholtz <balusc_at_gmail.com>
Date: Fri, 18 Mar 2016 18:07:37 +0100

Hi,

While working on
https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-618 (a new
h:commandScript), I noticed that options.params as documented in
https://javaserverfaces.java.net/nonav/docs/2.2/jsdocs/symbols/jsf.ajax.html#.request
is never actually used in Mojarra's javax.faces:jsf.js. Instead the entire
options object itself is sent as params (after explicitly removing the
execute/render/onerror/onevent/delay properties).

This looks like a bug in the implementation. Moreover, the mojarra.ab
function (which is used by a.o. <h:commandLink><f:ajax>) is implemented in
such way that it simply merges the params into options object instead of
making it a "params" property of the options object.

I checked MyFaces on this (not tested) but based on the Impl.js source code
it seems to nowhere use options.params property too. Due to both JSF
implementations exposing the same issue, I'm not sure anymore if I misread
the JS doc.

Ed/Leonardo, was this intentional or is this indeed a bug? If intentional
then a spec change is required to alter the JS doc. If not then a new issue
needs to be created to align out.

Cheers, Bauke