CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

LockIndicator with Dynamic Loading Frame

by asp » 12 Mar 2014 09:09

Hi!

Consider the situation when we have a form with dynamic loading frames. Inside the frame we have a control initiating a long process which need a lock indicator. But if you assign the indicator laying on the form with the particular event of the frame's control, it will not be shown. As a workaround you can create dummy invisible button on the form and set its indicator property. Then the indicator for the frame's control will appear. I made a sample project illustrating this issue.
You do not have the required permissions to view the files attached to this post.
asp
 
Posts: 235
Joined: 06 Dec 2013 11:17
Location: Moscow, Russia

by Jorge Sousa » 12 Mar 2014 11:02

Hi

The LockIndicator is not supported in Frames because of performance reasons.

We will try to change that in a near future,

however, you don't have to create any inivisible button!!!

You can also create the LockIndicator in the ServerController

or knowing that you should create the frame with Iwform as owner:

AFrame := TfrTest.Create(WebApplication.ActiveForm); // Why WebApplication.ActiveForm and not Self?

Inside the frame's code, in oncreate event you can do the following:

begin
bProcess.JQButtonOptions.OnClick.Indicator := Owner.FindComponent('IWCGJQLockIndicator1') as TIWCGJQLockIndicator; // The name is always IWCGJQLockIndicator1
// or
bProcess.JQButtonOptions.OnClick.Indicator := (Owner as TIWForm1).IWCGJQLockIndicator1; // Adding Form's Unit1 to uses clause
// or
bProcess.JQButtonOptions.OnClick.Indicator := IWServerController.IWCGJQLockIndicator1;
end;
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by asp » 12 Mar 2014 13:29

I changed the sample project according your tips, but it doesn't work.

cgdevtools_support wrote:
Inside the frame's code, in oncreate event you can do the following:

begin
bProcess.JQButtonOptions.OnClick.Indicator := (Owner as TIWForm1).IWCGJQLockIndicator1; // Adding Form's Unit1 to uses clause

end;


See attached file.
You do not have the required permissions to view the files attached to this post.
asp
 
Posts: 235
Joined: 06 Dec 2013 11:17
Location: Moscow, Russia

by Jorge Sousa » 12 Mar 2014 15:06

Hi

Yes, it doesn't work if the Indicator item is not used by any other event.

But that we can fix easily.
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by zsleo » 15 Mar 2014 01:17

cgdevtools_support wrote:Hi
You can also create the LockIndicator in the ServerController


Can you please explain in more detail - maybe with a code extract.

If LockIndicator is created in the ServerController does it globally replace the standard IW page lock functionality?

TIA
zsleo
 
Posts: 776
Joined: 03 Feb 2013 03:33

by Jorge Sousa » 17 Mar 2014 10:47

If LockIndicator is created in the ServerController does it globally replace the standard IW page lock functionality?


No we cannot replace this functionality on our side
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58


Return to JQLockIndicator

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.