I just noticed an issue when I was making multiple ajax requests when using Primefaces.addSubmitParam in my javascript. When multiple ajax requests are done without refreshing the page (i.e not ajax, but a full submit), new submit params with the same key do not work (you get the old one).
I've gotten around this by overriding addSubmitParam in my javascript like so:
Code: Select all
PrimeFaces.addSubmitParam = function(parent, name, value) {
$(this.escapeClientId(parent)).append("<input id=\"" + "submitParam_" + name + "\" + type=\"hidden\" name=\"" + name + "\" value=\"" + value + "\"/>");
var child = $("#submitParam_" + name);
child.val(value);
return this;
};
Code: Select all
addSubmitParam : function(parent, name, value) {
$(this.escapeClientId(parent)).append("<input type=\"hidden\" name=\"" + name + "\" value=\"" + value + "\"/>");
return this;
}
Cheers,
Bill