ROCLASI:
Are you sure this is the case? Isn’t it just a case of not redrawing while the method runs?
I’m pretty sure Robert - runs perfectly in SC but the colour changes don’t appear to happen in WC - and we have tested it using a label as a notification instead of the colour changes - (shown at the start of a process and hidden at the end) and using application.updateUI() to no effect.
As confirmation if I just show the label (and comment out the hide code) the label is shown when expected, but with the hide code - its seems to be shown then hidden immediately, though its so fast we cant actually see it happening??
Do you think I’ve missed a trick with this Robert?
I guess I was mistaken (perhaps tested some in SC instead…which is like automatic for me), I can’t reproduce it anymore.
Anyway, I don’t think continuations will help you with this. WC needs to let the browser redraw and it doesn’t do it. I tried updateUI(milliseconds) even in combination with sleep(milliseconds) and nothing helps the browser to redraw that label. So I am wondering if WC actually pushes the updateUI to the browser at all.
So I guess this is an issue for Servoy.
ROCLASI:
I guess I was mistaken (perhaps tested some in SC instead…which is like automatic for me), I can’t reproduce it anymore.
Anyway, I don’t think continuations will help you with this. WC needs to let the browser redraw and it doesn’t do it. I tried updateUI(milliseconds) even in combination with sleep(milliseconds) and nothing helps the browser to redraw that label. So I am wondering if WC actually pushes the updateUI to the browser at all.
So I guess this is an issue for Servoy.
Thanks Robert I’ll ask Paul for comments too as he was good enough to respond to my original ‘continuations’ question post.
I’ve just started using mod_dialog v 1.1.7 to hopefully make my dialogs work in WC as they do in SC. Thank you for creating this. It is working well but I am running into a couple problems and I’m wondering if they are easy to fix. I’m on 5.2.14, Java 6, Windows & Chrome.
Problem 1:
Open a FIMD with a close button on it.
Behind the close button put a globals.DIALOGS.showQuestionDialog() - for instance one that asks if the user is sure they want to save changes before closing the FIMD
When I test this, the questionDialog goes away but the FIMD stays open and blank and it says ‘Error calling server’ in the top right corner. In the Server Log I get this:
org.apache.wicket.request.target.component.listener.BehaviorRequestTarget
behavior not enabled; ignoring call. behavior: com.servoy.j2db.server.headlessclient.MainPage$1@13690b5 at index: 1 on component: [Page class = com.servoy.j2db.server.headlessclient.MainPage, id = 6, version = 0, ajax = 5]
To reproduce this easily in your demoDialog app you can just modify demoFIMD.onAction() as follows:
function onAction(event) {
if (event.getElementName() == 'btnClose') {
globals.DIALOGS.showQuestionDialog('test','test','test','test') // ADD THIS LINE
application.closeForm();
} else {
forms.main.addToLog("opening FIMD2...");
globals.DIALOGS.showFormInModalDialog('DemoFIMD2', -1, -1, -1, -1, 'FIMD2');
forms.main.addToLog(".. and continuing again (FIMD2)");
}
}
Problem 2:
When users close a FIMD using the close box, I sometimes bring up a message in a showInfoDialog. I do this in the FIMD’s onHide event. But if I call globals.DIALOGS.showInfoDialog() in the onHide event of a FIMD that was opened using globals.DIALOGS.showFormInModalDialog it doesn’t display the infoDialog. It would be great if it could do that.
Could you make a case (or 2) on the ServoyForge project with these issues.
Problem 1 looks like this is Chrome-only as it does work fine on FireFox for instance. I pinged Johan for this.
I’m now using mod_dialog 1.5.6 under Servoy 7 and it seems that specifying -1,-1,-1,-1 as the coordinates for showForminModalDialog() no longer causes the dialog to be centered. And the JSWindow.setLocation(x,y) and setInitialBounds() doesn’t seem to support -1,-1 either. Is there some easy trick to getting dialogs to open centered within the main application window or should I get to work writing a method to calculate those coordinates for me? Thanks.
I figured out what’s going on. The problem only happens when I have dragged my main application window to an external monitor that is to the left of my main monitor. In that situation, -1,-1 coordinates exist so the dialog opens in the top left corner of the main monitor.
JSWindow.setLocation(-1,-1) and JSWindow.setInitialBounds(-1,-1,-1,-1) all do this so I assume that’s why it’s happening in mod_dialog.
Same thing happens if I use setInitialBounds(JSWindow.DEFAULT, JSWindow.DEFAULT, JSWindow.DEFAULT, JSWindow.DEFAULT) even though the docs say this will cause the window to be initially centered.
Not sure whether to report this as a bug or not - what do you think?