Question
Last activity: 28 Apr 2016 22:47 EDT
registerOnBeforeSubmit adds the same doBeforeSubmit function multiple times
Hi,
We've got a customized version of the multiselect control. As part of that, we have added a line to register the doBeforeSubmit function via registerOnBeforeSubmit.
I noticed that the doBeforeSubmit function is being called multiple times depending on how many times I've refreshed the screen. I checked via the console if the contextObjects are equivalent and it comes up false. However, the contextObjects entries attributes (prototype, _handle, _select and _startingLength) are equal.
Do you know if there's a fix for this?
This is the code for the multiselect where registerOnBeforeSubmit is being called. It is really the same as the original one in pega_ui_multiselect.js
pega.ui.MultiSelect = function(handle, startingLength) { this._handle = handle + "$l"; this._select = handle; this._startingLength = startingLength; pega.u.d.registerOnBeforeSubmit(this.doBeforeSubmit, this); }
We're using Pega v6.2 SP2.
Thanks,
Rachel