closeFormPopup NG errors

Forum to discuss the new web client version of Servoy.

closeFormPopup NG errors

Postby pitc » Wed Jan 06, 2021 7:22 pm

In both NG and NGDesktopClient I do plugins.window.showFormPopup specifying the new parameters for 2020.12.0 (3622):
Code: Select all
   
        var elementToShowRelatedTo = elements.button_accept_guest_of_member;
   var showBackdrop = true;
   var doNotCloseOnClickOutside = true;//user must use close button or cancel button - this way it acts like modal
   var scope = forms.PITC_0F_checkin_ng;//this form is for popup to write back data to a form var
   var dataproviderID = 'vf_dummy';
   var width = 650;
   var height = 250;
   var x = null;//use the element closest
   var y = null;//use the element closest
   var callback = postPaymentPopup;

        plugins.window.showFormPopup(elementToShowRelatedTo, forms.PITC_1F_checkin_payment_ng, scope, dataproviderID, width, height, x, y, showBackdrop, doNotCloseOnClickOutside, callback);


The form does popup correctly.
When a button on the popup form is clicked for cancel this is called:
Code: Select all
plugins.window.cancelFormPopup();

At this point we get an error:
ERROR com.servoy.j2db.util.Debug - Error while executing client side code. Please see browser console for more info. Error: TypeError: event is undefined (Form Context: PITC_1F_checkin_payment_ng), JSEvent(type = action, source = Component: <'button_cancel_form' of parent FormUI for FormController[form: PITC_1F_checkin_payment_ng,...

java.lang.RuntimeException: Error while executing client side code. Please see browser console for more info. Error: TypeError: event is undefined
at org.sablo.websocket.WebsocketEndpoint.waitResponse(WebsocketEndpoint.java:581) ~[sablo_2020.12.0.3622.jar:?]


In the browser console we get this error:

The createJsEvent code is this:
Code: Select all
       createJSEvent: function (event, eventType, contextFilter, contextFilterElement) {
            var targetEl = event;
            if (event.target)
                targetEl = event.target;
            else if (event.srcElement)
                targetEl = event.srcElement;
   


If the user clicks on the other button on the popup form to close the form (save data) we get same error.
Note that the callback is never called.

If my usage of the showFormPopup and the closeFormPopup or cancelFormPopup is correct then I should make a Jira report.
Tom
prospect-saas.com
pitc
 
Posts: 115
Joined: Thu Nov 14, 2019 2:22 pm
Location: Ottawa, Ontario, Canada

Re: closeFormPopup NG errors

Postby dtimut » Wed Jan 06, 2021 7:50 pm

Hello,

Please create a Jira case about this issue. Link this forum post.
If you have an example solution, please also add it to the case.

Thank you!
dtimut
 
Posts: 1
Joined: Wed Jan 06, 2021 7:45 pm

Re: closeFormPopup NG errors

Postby pitc » Wed Jan 06, 2021 8:15 pm

Made report:
https://support.servoy.com/browse/SVY-15737
I have not made a test solution yet.
I can if needed.
Tom
prospect-saas.com
pitc
 
Posts: 115
Joined: Thu Nov 14, 2019 2:22 pm
Location: Ottawa, Ontario, Canada


Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 6 guests