Page 1 of 1

LockIndicator with Dynamic Loading Frame

PostPosted: 12 Mar 2014 09:09
by asp
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.

Re: LockIndicator with Dynamic Loading Frame

PostPosted: 12 Mar 2014 11:02
by Jorge Sousa
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;

Re: LockIndicator with Dynamic Loading Frame

PostPosted: 12 Mar 2014 13:29
by asp
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.

Re: LockIndicator with Dynamic Loading Frame

PostPosted: 12 Mar 2014 15:06
by Jorge Sousa
Hi

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

But that we can fix easily.

Re: LockIndicator with Dynamic Loading Frame

PostPosted: 15 Mar 2014 01:17
by zsleo
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

Re: LockIndicator with Dynamic Loading Frame

PostPosted: 17 Mar 2014 10:47
by Jorge Sousa
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