Project

General

Profile

Defect #846

Strange behaviour because of refresh? when using callback

Added by Martijn Lutgens about 9 years ago. Updated about 9 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Start date:
03/19/2015
Due date:
% Done:

0%

Estimated time:
Browser (if web client):

Description

I am using the callback function to show/hide element on the form it is called by. The plugin seems to do some sort of refresh on the form because the form scrolls to the top. As a result of that refresh the elements I show/hide are all hidden.


Files

Test.servoy (4.36 KB) Test.servoy Martijn Lutgens, 04/01/2015 09:39 AM

History

#1

Updated by Martijn Lutgens about 9 years ago

Hi Patrick,

Is it possible that you have a look at this issue? It depends on this issue wether it is usable for us. Otherwise we have to look for another upload-solution. We are willing to pay for it if that is necessary.

#2

Updated by Patrick Talbot about 9 years ago

  • Status changed from New to In Progress

The window is operating an Ajax post call to the main page from the window, what this does depends on your own Servoy scripting in the callback function and the browser.
I would need a sample solution where this issue is reproducible to see what I can do...

#3

Updated by Martijn Lutgens about 9 years ago

Hi Patrick,

I have attached a sample solution that reproduces the problem. Just upload a file and you will see that the form scrolls to the top. The label "has no file" will still be shown while it should have been "has file". Switch to tab2 and back and the label "has file" is correctly shown.

#4

Updated by Patrick Talbot about 9 years ago

  • Status changed from In Progress to Rejected

I had a closer look and the problem is that the uploader page is outside of the servoy webclient (because the embedded libraries are not compatible with Wicket markup) and has to call the page back via a refresh, this is done via 1/ an Ajax POST that is calling your callback function, and 2/ a window.opener.reload() that is supposed to refresh the page.

2 issues with that: 1/ the reload of the page triggers the scroll of the tab panel, but 2/ still the page state is unchanged (in your case you actually need to call showElements() because the onShow handler is not called, I believe this is because the call didn't actually initiate from the page itself, and Wicket keeps trace of the "version" of the page.

I'm afraid there's little I can do about that, I will mark that as non fixable for lack of outside direct access to a web-client.
The plugin is viable in most cases, but in yours I'm afraid it will not comply with your requirements.
Sorry about that.

Also available in: Atom PDF