Page 1 of 2

Refresh Label 2

PostPosted: 19 Oct 2015 18:50
by etwoss
Hi

My main form is a TIWAppForm with a TIWCGJQRegion in which i show forms of type TIWCGJQFrame.
One of my TIWCGJQFrame forms shows the TIWCGJQScheduler

I also have a label which shows the sum of hours of the events in the scheduler.
I fire a query in the OnGetData event of the scheduler and set the Label. However the label is not refreshed as expected.

So what do i do?

i call an event which is attached by a handler on my Mainform.This event sets a timer enabled to true.
In the onTimer i call a method on the scheduler form which gets the data end refreshes the label.

What does not work?
It goes ok until i hit thge method the main form. The timer is set enabled to true but the OnTimer is not fired?

Any idea why not?

Eric

Re: Refresh Label 2

PostPosted: 20 Oct 2015 07:56
by assapan
Hi,
I know its a shame but Timers doen't work on frames , they must be on Forms.

For your label , ajaxrerender doesn't works ?

Re: Refresh Label 2

PostPosted: 21 Oct 2015 07:59
by etwoss
Hi

Thats true, but i have the Timer on my TIWAppForm , its enabled but does not fire.

Eric

Re: Refresh Label 2

PostPosted: 21 Oct 2015 09:36
by Alexander Bulei
Hi Eric,

I fire a query in the OnGetData event of the scheduler and set the Label. However the label is not refreshed as expected.


You need debug, and check the value setted on label.
Another thing, our IWCGJQLabelEx doesn't need any method or ajaxrerender to set/refresh the value.

Also check the console for js errors.

Best Regards.

Re: Refresh Label 2

PostPosted: 21 Oct 2015 14:33
by etwoss
Hi

You mean that if i use a IWCGJQLabelEx it will be refreshed?

The problem now is that the Timer on the AppForm is enabled but the OnTimer does not kick in.

Eric

Re: Refresh Label 2

PostPosted: 22 Oct 2015 09:39
by Alexander Bulei
Hi Eric,

You mean that if i use a IWCGJQLabelEx it will be refreshed?


Yes.

The problem now is that the Timer on the AppForm is enabled but the OnTimer does not kick in.


Well, check/debug this part by yourself, since the IWTimer is intraweb component :)

Best Regards.

Re: Refresh Label 2

PostPosted: 22 Oct 2015 15:57
by etwoss
Hi

Will try the LabelEx first :-)

Eric

Re: Refresh Label 2

PostPosted: 23 Oct 2015 08:28
by etwoss
Hi

Tried the LabelEx in your demo app,. Just added a labelEx between the buttons set the TextEx to 'Test', in the "OnGetData" i set

Code: Select all
IWCGJQLabelEx1.TextEx.Text := 'Etw';


No change in the text visible.

if i put the statement in the Ajax OnClick event of the first buttom it works fine

What have i missed?

Eric

Re: Refresh Label 2

PostPosted: 27 Oct 2015 11:17
by etwoss
Hi

Can i have a response here

Eric

Re: Refresh Label 2

PostPosted: 27 Oct 2015 15:18
by Jorge Sousa
The purpose of OnGetData is solely to supply data, it will not execute any control update.