NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Niels Larsen on May 22, 2019, 01:16:23 AM

Title: How to skip net refresh
Post by: Niels Larsen on May 22, 2019, 01:16:23 AM
Hi Bruce

This is a followup on my subject:"NTWS - NETREFRESH - GROUPING UPDATES"
My question is how do I prevent a browse to update from a NetRefresh. Anywhere to insert some code that, if a flag (host value) is set, the browse does'nt refresh.

Regards Niels
Title: Re: How to skip net refresh
Post by: Bruce on May 22, 2019, 06:57:15 AM
It gets complicated because the refresh is done from the client side.
In other words;
a) Table changes - sends NetRefresh.Send
b) This changes a session value that the browser is "watching".
c) the browse sees the table change and so does a refresh
d) this comes into the server as a normal "refresh" command.

I have tweaked it a bit so it passes in a parameter you can detect, and hence then alter the reply if you like. The Value name is _netRefresh_ and you can access it with SetValue
 if p_web.GetValue('_netRefresh_') = 1
   ...
 end

You'd want to follow the code through the TakeEvent routine to see how it flows when a refresh event comes in...

cheers
Bruce
Title: Re: How to skip net refresh
Post by: Niels Larsen on May 22, 2019, 10:14:16 PM
Hi Bruce

Thanks for the feedback.
That's exactly what I need!

I suppose you mean "GetValue", otherwise there's something I don't understand ...
Is this tweak included in 11.11?

Regards Niels
Title: Re: How to skip net refresh
Post by: Bruce on May 22, 2019, 11:07:39 PM
>> I suppose you mean "GetValue", otherwise there's something I don't understand ...

I do - post edited to reflect this.

>> Is this tweak included in 11.11?

yes.

cheers
Bruce