RachelNavarro Member since 2016 7 posts
Posted: April 20, 2016
Last activity: April 28, 2016

registerOnBeforeSubmit adds the same doBeforeSubmit function multiple times


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.



User Experience
Moderation Team has archived post,
Close popover This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.