[ANNOUNCEMENT] Dialog module v1.0 released

Share business templates, ideas, experiences, etc with fellow Servoy developers here

Re: [ANNOUNCEMENT] Dialog module v1.0 released

Postby Kahuna » Tue Jul 05, 2011 7:19 pm

Your DIALOG global is working brilliantly Robert - that's excellent work for sure. I think McCourt is going to contact you separately to mention a couple of points he's discovered in its use.

We have been wondering if some of this code could be applied to other controls in web client too.

For example, we change the colour of menus to show that they have registered a click and then after the function has run we change the colour again to show it is the selected menu item and it's ready to work.

With WC obviously this doesn't work for the same reason the Dialogs don't - the WC code is just run without halting to allow the called procedures to run before completing, hence the UI changes are too fast to register.

We figured there may be some method in your global that we could apply to halt the code execution whilst other functions are run, and then return and complete the UI stuff, but the concept doesn't seem to apply in this context. Or perhaps we have missed a point or two.

What's your view on using continuations in this context Robert? Possible - Sensible???
(Servoy Version: 6.0.7 Win XP / 7 - SQL Server 2008 R2)
Ian Cordingley (Kahuna)
Kahuna
 
Posts: 1235
Joined: Thu Oct 26, 2006 1:39 am
Location: 1/2 NE UK 1/2 Olvera Spain

Re: [ANNOUNCEMENT] Dialog module v1.0 released

Postby ROCLASI » Thu Jul 07, 2011 10:08 am

Hi Ian,

Kahuna wrote:Your DIALOG global is working brilliantly Robert - that's excellent work for sure. I think McCourt is going to contact you separately to mention a couple of points he's discovered in its use.

If he can do it on short notice, I am almost ready to push out a new bugfix version of the module. If he has something that needs to be fixed I can put it in with it.

Kahuna wrote:We have been wondering if some of this code could be applied to other controls in web client too.

For example, we change the colour of menus to show that they have registered a click and then after the function has run we change the colour again to show it is the selected menu item and it's ready to work.

With WC obviously this doesn't work for the same reason the Dialogs don't - the WC code is just run without halting to allow the called procedures to run before completing, hence the UI changes are too fast to register.

We figured there may be some method in your global that we could apply to halt the code execution whilst other functions are run, and then return and complete the UI stuff, but the concept doesn't seem to apply in this context. Or perhaps we have missed a point or two.

What's your view on using continuations in this context Robert? Possible - Sensible???

With menus you mean popup menus ? In any case it would be something for me to look at and spend time on. I can't really say what would be best in this case.
Robert Ivens
ROCLASI Software Solutions / JBS Group, Partner
SAN Developer / Servoy Valued Professional / Servoy Certified Developer
Twitter: @roclasi / @servoyforge
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5209
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: [ANNOUNCEMENT] Dialog module v1.0 released

Postby Kahuna » Thu Jul 07, 2011 10:27 am

Thanks for the feedback Robert - I'll chat with McCourt this am and see what we can draught.

With menus you mean popup menus ? In any case it would be something for me to look at and spend time on. I can't really say what would be best in this case.

I was talking about our own created menus which are essentially buttons. And of course its the same with our buttons on a form.

Right now (in SC) we colour the buttons when the user clicks them to show they have been activated, and colour them again when the activity is done. So on our menu buttons, the text goes red when the user clicks them, and stays that way until the form is loaded and shown at which point the button is text is coloured orange to show that is the active menu selection.

With action buttons we colour the background and change the text to 'working...' after the user clicks it. After the task is performed the button is reset to its original state.

Right now in the WC the buttons change so fast that the user gets no information about state - and that's because the code runs straight through - not waiting for the intermediate calls to complete.

That's why we thought continuations may be an answer - but its the concept we are struggling with - where to place the continuation break and where restart it again etc. Also not sure which aspects of your dialog code would be useful rather than building our own continuation code?

Hope that makes sense Bud?
(Servoy Version: 6.0.7 Win XP / 7 - SQL Server 2008 R2)
Ian Cordingley (Kahuna)
Kahuna
 
Posts: 1235
Joined: Thu Oct 26, 2006 1:39 am
Location: 1/2 NE UK 1/2 Olvera Spain

Re: [ANNOUNCEMENT] Dialog module v1.0 released

Postby ROCLASI » Thu Jul 07, 2011 10:36 am

Hi Ian,

Kahuna wrote:Right now in the WC the buttons change so fast that the user gets no information about state - and that's because the code runs straight through - not waiting for the intermediate calls to complete.


Are you sure this is the case? Isn't it just a case of not redrawing while the method runs?
Robert Ivens
ROCLASI Software Solutions / JBS Group, Partner
SAN Developer / Servoy Valued Professional / Servoy Certified Developer
Twitter: @roclasi / @servoyforge
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5209
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: [ANNOUNCEMENT] Dialog module v1.0 released

Postby ROCLASI » Thu Jul 07, 2011 10:47 am

A quick test shows me that putting a application.updateUI(100) right after the color/text update works wonders in WebClient.

Hope this helps.
Robert Ivens
ROCLASI Software Solutions / JBS Group, Partner
SAN Developer / Servoy Valued Professional / Servoy Certified Developer
Twitter: @roclasi / @servoyforge
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5209
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: [ANNOUNCEMENT] Dialog module v1.0 released

Postby Kahuna » Thu Jul 07, 2011 10:49 am

ROCLASI wrote: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?
(Servoy Version: 6.0.7 Win XP / 7 - SQL Server 2008 R2)
Ian Cordingley (Kahuna)
Kahuna
 
Posts: 1235
Joined: Thu Oct 26, 2006 1:39 am
Location: 1/2 NE UK 1/2 Olvera Spain

Re: [ANNOUNCEMENT] Dialog module v1.0 released

Postby ROCLASI » Thu Jul 07, 2011 11:01 am

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.
Robert Ivens
ROCLASI Software Solutions / JBS Group, Partner
SAN Developer / Servoy Valued Professional / Servoy Certified Developer
Twitter: @roclasi / @servoyforge
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5209
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: [ANNOUNCEMENT] Dialog module v1.0 released

Postby Kahuna » Thu Jul 07, 2011 11:46 am

ROCLASI wrote: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.

Cheers my friend!
(Servoy Version: 6.0.7 Win XP / 7 - SQL Server 2008 R2)
Ian Cordingley (Kahuna)
Kahuna
 
Posts: 1235
Joined: Thu Oct 26, 2006 1:39 am
Location: 1/2 NE UK 1/2 Olvera Spain

Re: [ANNOUNCEMENT] Dialog module v1.0 released

Postby ROCLASI » Fri Jul 08, 2011 11:15 am

I haven't heard back from McCourt so I am releasing version 1.1.3 of the Dialog module now.

It fixes 2 (web client only) issues:

  • The default stylesheet now comes along with the module when importing/exporting. So if you were missing icons this will fix this.
  • Fixed a naming issue that could cause problems.

It does require (the upcoming) Servoy 5.2.10 or 6.0rc3 (or higher) to fix the refresh issue.

You can download the Dialog module here.
See for more info in the wiki.
Check out the screenshots.
Robert Ivens
ROCLASI Software Solutions / JBS Group, Partner
SAN Developer / Servoy Valued Professional / Servoy Certified Developer
Twitter: @roclasi / @servoyforge
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5209
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: [ANNOUNCEMENT] Dialog module v1.0 released

Postby rafig » Fri Jul 08, 2011 12:05 pm

ROCLASI wrote:It does require (the upcoming) Servoy 5.2.10 or 6.0rc3 (or higher) to fix the refresh issue.

Hi Robert,
you keep on referring to 5.2.10, but they only just last week released 5.2.9...
Are they about to come out with another release very soon??

Thanks
Rafi
Servoy Certified Developer
Image
rafig
 
Posts: 481
Joined: Mon Dec 22, 2003 12:58 pm
Location: Watford, UK

Re: [ANNOUNCEMENT] Dialog module v1.0 released

Postby ROCLASI » Fri Jul 08, 2011 12:18 pm

Hi Rafi,

I don't know what Servoy's release schedule is. I only know that the issue is fixed in the upcoming releases.
Robert Ivens
ROCLASI Software Solutions / JBS Group, Partner
SAN Developer / Servoy Valued Professional / Servoy Certified Developer
Twitter: @roclasi / @servoyforge
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5209
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: [ANNOUNCEMENT] Dialog module v1.0 released

Postby rafig » Fri Jul 08, 2011 12:28 pm

Thanks :)
Servoy Certified Developer
Image
rafig
 
Posts: 481
Joined: Mon Dec 22, 2003 12:58 pm
Location: Watford, UK

Re: [ANNOUNCEMENT] Dialog module v1.0 released

Postby amcgilly » Wed Dec 19, 2012 12:42 am

Robert,

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:

Code: Select all
org.apache.wicket.request.target.component.listener.BehaviorRequestTarget

behavior not enabled; ignoring call. behavior: [email protected] 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:

Code: Select all
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.

Thanks a lot in advance.
Adrian McGilly
Servoy Developer

Image
amcgilly
 
Posts: 374
Joined: Fri Dec 09, 2005 12:03 am
Location: San Francisco, CA

Re: [ANNOUNCEMENT] Dialog module v1.0 released

Postby ROCLASI » Wed Dec 19, 2012 1:13 pm

Hi Adrian,

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.
Robert Ivens
ROCLASI Software Solutions / JBS Group, Partner
SAN Developer / Servoy Valued Professional / Servoy Certified Developer
Twitter: @roclasi / @servoyforge
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5209
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: [ANNOUNCEMENT] Dialog module v1.0 released

Postby amcgilly » Mon Oct 07, 2013 11:26 pm

Robert,

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.
Adrian McGilly
Servoy Developer

Image
amcgilly
 
Posts: 374
Joined: Fri Dec 09, 2005 12:03 am
Location: San Francisco, CA

PreviousNext

Return to Sharing Central

Who is online

Users browsing this forum: No registered users and 1 guest