This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
1
Web Server - Ask For Help / Re: Sessions timout problem
« on: May 15, 2020, 09:16:58 PM »
Add a Timer to the WebServer window properties - I use a timer value of 300
If server is idle, the timer will trigger WebServer event handling, Session Expiry etc.
If server is idle, the timer will trigger WebServer event handling, Session Expiry etc.
2
Web Server - Ask For Help / Re: From Login to diffrent pages
« on: May 07, 2020, 08:40:10 PM »
Hi
I have the same situation - there may be other ways to do this but approach that is working for me:
Login page template settings, I leave "URL on Save" and "URL on Cancel" blank
In Login ValidateUpdate Routine, set a local variable to establish User Type then:
If LoginValid then
p_web.SetSessionLoggedIn (1)
case loc:UserType
of 1
p_web.Script( p_web.WindowOpen( 'PageUser1'))
of 2
p_web.Script( p_web.WindowOpen( 'PageUser2'))
of 3
p_web.Script( p_web.WindowOpen( 'PageUser3'))
end
end
I have the same situation - there may be other ways to do this but approach that is working for me:
Login page template settings, I leave "URL on Save" and "URL on Cancel" blank
In Login ValidateUpdate Routine, set a local variable to establish User Type then:
If LoginValid then
p_web.SetSessionLoggedIn (1)
case loc:UserType
of 1
p_web.Script( p_web.WindowOpen( 'PageUser1'))
of 2
p_web.Script( p_web.WindowOpen( 'PageUser2'))
of 3
p_web.Script( p_web.WindowOpen( 'PageUser3'))
end
end
3
Web Server - Ask For Help / Re: Session Variable not displaying when using the Net:s tag (11.35)
« on: April 30, 2020, 01:05:13 AM »
Sorry, spoke to soon - that's what quick glances tend to do...
4
Web Server - Ask For Help / Re: Session Variable not displaying when using the Net:s tag (11.35)
« on: April 29, 2020, 11:29:54 PM »
A quick glance - seems the code to handle Session Value tags has been commented out in 11.35...?
In Netweb.clw - "_HandleTag" procedure
Bruce will have to chip in on this...
In Netweb.clw - "_HandleTag" procedure
Bruce will have to chip in on this...
5
Web Server - Ask For Help / Re: Memory issue - Solved?
« on: April 27, 2020, 10:29:47 PM »
Hi Don
Good to hear your issue resolved - just happy to have found a solution for my own sanity <g>
A few months ago, I posted re: Connections growing issue I was seeing - http://www.nettalkcentral.com/forum/index.php?topic=8434.msg34352#msg34352
Updated this app with this change and so far, so good.
Graham
Good to hear your issue resolved - just happy to have found a solution for my own sanity <g>
A few months ago, I posted re: Connections growing issue I was seeing - http://www.nettalkcentral.com/forum/index.php?topic=8434.msg34352#msg34352
Updated this app with this change and so far, so good.
Graham
6
Web Server - Ask For Help / Re: conditionally hide a button on Menu Extension(3)
« on: April 27, 2020, 01:18:36 AM »
Hi Richard
Off the top of my head, Security Tab, check "User must be logged in" - that will hide the button until User Logged in
After Login, can use a Session Variable eg. 'ShowMyMenuButton' then on Menu, General Tab, "Menu Condition" you could then do: p_web.GSV('ShowMyMenuButton')
To provide a bit more certainty, an option would be to create a standard Clarion Source procedure with p_web as parameter
Procedure MenuButtonTest (NetWebServerWorker p_web), byte
code
if p_web.IfExistsSessionValue('ShowMyMenuButton')
return p_web.GSV('ShowMyMenuButton')
else
return false
end
then on Menu, General Tab, "Menu Condition": MenuButtonTest(p_web)
In your code, do p_web.SSV('ShowMyMenuButton', 0) to hide button and p_web.SSV('ShowMyMenuButton', 1) to show button.
May be a few other ways to do this but hope that gives you some ideas
Cheers
Graham
Off the top of my head, Security Tab, check "User must be logged in" - that will hide the button until User Logged in
After Login, can use a Session Variable eg. 'ShowMyMenuButton' then on Menu, General Tab, "Menu Condition" you could then do: p_web.GSV('ShowMyMenuButton')
To provide a bit more certainty, an option would be to create a standard Clarion Source procedure with p_web as parameter
Procedure MenuButtonTest (NetWebServerWorker p_web), byte
code
if p_web.IfExistsSessionValue('ShowMyMenuButton')
return p_web.GSV('ShowMyMenuButton')
else
return false
end
then on Menu, General Tab, "Menu Condition": MenuButtonTest(p_web)
In your code, do p_web.SSV('ShowMyMenuButton', 0) to hide button and p_web.SSV('ShowMyMenuButton', 1) to show button.
May be a few other ways to do this but hope that gives you some ideas
Cheers
Graham
7
Web Server - Ask For Help / Re: Cant Hide browse buttos using loc:viewonly
« on: April 26, 2020, 09:10:58 AM »
Hi Alberto
I'm on NT 11.35 - had a quick look at this...
I just set this template option to TRUE and had a look at the generated code - seems you may need to do an override in the embed after this section to get the desired result...
Generated code:
loc:viewonly = Choose(not(TRUE),0,1)
if p_web.IfExistsValue('_viewonly_')
loc:viewonly = p_web.GetValue('_viewonly_')
p_web.SetSessionValue(clip(loc:divname)&'_viewonly_' & loc:RandomBrowseId,loc:viewonly)
else
loc:viewonly = choose(p_web.GetSessionValue(clip(loc:divname)&'_viewonly_' & loc:RandomBrowseId)=1,1,loc:viewonly)
end
p_web.SetValue('_viewonly_',loc:viewonly)
One option in embed: "2 End of SetBrowseOptions routine" - this hides Insert/Change/Delete buttons if condition is TRUE
if MyViewOnlyTest then ! Your condition
loc:viewonly = true
p_web.SetValue('_viewonly_',loc:viewonly)
p_web.SetSessionValue(clip(loc:divname)&'_viewonly_' & loc:RandomBrowseId,loc:viewonly)
end
You may have to check other ViewOnly configs that you may have in the browse but hope this helps
Cheers
Graham
I'm on NT 11.35 - had a quick look at this...
I just set this template option to TRUE and had a look at the generated code - seems you may need to do an override in the embed after this section to get the desired result...
Generated code:
loc:viewonly = Choose(not(TRUE),0,1)
if p_web.IfExistsValue('_viewonly_')
loc:viewonly = p_web.GetValue('_viewonly_')
p_web.SetSessionValue(clip(loc:divname)&'_viewonly_' & loc:RandomBrowseId,loc:viewonly)
else
loc:viewonly = choose(p_web.GetSessionValue(clip(loc:divname)&'_viewonly_' & loc:RandomBrowseId)=1,1,loc:viewonly)
end
p_web.SetValue('_viewonly_',loc:viewonly)
One option in embed: "2 End of SetBrowseOptions routine" - this hides Insert/Change/Delete buttons if condition is TRUE
if MyViewOnlyTest then ! Your condition
loc:viewonly = true
p_web.SetValue('_viewonly_',loc:viewonly)
p_web.SetSessionValue(clip(loc:divname)&'_viewonly_' & loc:RandomBrowseId,loc:viewonly)
end
You may have to check other ViewOnly configs that you may have in the browse but hope this helps
Cheers
Graham
8
Web Server - Ask For Help / Re: Memory issue - Solved?
« on: April 23, 2020, 04:35:44 AM »
Hi Jeff
Yip, that's what I was running into and it only happens if you touch the POST with thread number 0 which is the POST Header
App appears to lock up but if you leave it long enough, it comes back (sort of) but Ram used has gone thru the roof and impossible to use after that.
Think its actually a <10> - this is the code:
x = instring ('<13,10><13,10>', self._ConnectionDataQueue.Data[1 : self._ConnectionDataQueue.DataLen], 1, pos) ! Look for request terminating character
if x > 0
! Found Header End Marker
self._ConnectionDataQueue.HeaderEndPosition = x + 3
Cheers
Graham
Yip, that's what I was running into and it only happens if you touch the POST with thread number 0 which is the POST Header
App appears to lock up but if you leave it long enough, it comes back (sort of) but Ram used has gone thru the roof and impossible to use after that.
Think its actually a <10> - this is the code:
x = instring ('<13,10><13,10>', self._ConnectionDataQueue.Data[1 : self._ConnectionDataQueue.DataLen], 1, pos) ! Look for request terminating character
if x > 0
! Found Header End Marker
self._ConnectionDataQueue.HeaderEndPosition = x + 3
Cheers
Graham
9
Web Server - Ask For Help / Re: Memory issue - Solved?
« on: April 19, 2020, 03:44:26 AM »
Hi Bruce
Correct, I am clicking on the WebServer window - I would like to see the POST data
Specifically, it only happens when I click on a POST log entry where the _thread_ is 0 - believe this is just the POST Header.
In Netweb.clw, around line 686
self.AddLog(self._ConnectionDataQueue.Data[1:x],self.packet.FromIP)
Problem goes away if I change this line with this: "[1:x-1]"
self.AddLog(self._ConnectionDataQueue.Data[1:x-1],self.packet.FromIP)
Not sure if that will break something further along - doesn't appear to...?
Have no idea what is at the end of the string to cause it to lose it's marbles like that
Cheers
Graham
Correct, I am clicking on the WebServer window - I would like to see the POST data
Specifically, it only happens when I click on a POST log entry where the _thread_ is 0 - believe this is just the POST Header.
In Netweb.clw, around line 686
self.AddLog(self._ConnectionDataQueue.Data[1:x],self.packet.FromIP)
Problem goes away if I change this line with this: "[1:x-1]"
self.AddLog(self._ConnectionDataQueue.Data[1:x-1],self.packet.FromIP)
Not sure if that will break something further along - doesn't appear to...?
Have no idea what is at the end of the string to cause it to lose it's marbles like that
Cheers
Graham
10
Web Server - Ask For Help / Memory issue - Solved?
« on: April 15, 2020, 01:32:51 AM »
Hi All
NT 11.35, StringTheory 3.21
Books Example Web71 - In the browser, app works fine...
Select WebServer App window:
- click on a GET item in log - no problem
- click on a POST item a few times, memory use goes thru the roof
See video: https://youtu.be/oPaN4feq3v8
Anyone else see this...
Thanks
Graham
NT 11.35, StringTheory 3.21
Books Example Web71 - In the browser, app works fine...
Select WebServer App window:
- click on a GET item in log - no problem
- click on a POST item a few times, memory use goes thru the roof
See video: https://youtu.be/oPaN4feq3v8
Anyone else see this...
Thanks
Graham
11
Web Server - Ask For Help / Re: Refresh child browse - Checkbox doesn't work - NT 11.33
« on: April 09, 2020, 09:48:05 PM »
Eish (FacePalm)
Of course - did this for the Radio - that's why it worked but missed for the Checkbox
Too much going on
Thank you
Of course - did this for the Radio - that's why it worked but missed for the Checkbox
Too much going on
Thank you
12
Web Server - Ask For Help / Re: Refresh child browse - Checkbox doesn't work - NT 11.33
« on: April 08, 2020, 11:56:00 PM »
Hi Bruce
Thanks for your input - have "fixed" app as per your suggestions
Would be great if you can find out what I might be doing wrong to cause the browse not to refresh
As always, thanks for your time
Cheers
Graham
Thanks for your input - have "fixed" app as per your suggestions
Would be great if you can find out what I might be doing wrong to cause the browse not to refresh
As always, thanks for your time
Cheers
Graham
13
Web Server - Ask For Help / Re: Refresh child browse - Checkbox doesn't work - NT 11.33
« on: April 08, 2020, 05:32:04 AM »
Hi Bruce
Here's an example.
Funny thing with this sample: Cannot get Radio or Checkbox to update browse - confused to say the least.
Hope you can figure out if I missed something
Thanks
Graham
Here's an example.
Funny thing with this sample: Cannot get Radio or Checkbox to update browse - confused to say the least.
Hope you can figure out if I missed something
Thanks
Graham
14
Web Server - Ask For Help / Re: Refresh child browse - Checkbox doesn't work - NT 11.33
« on: April 08, 2020, 03:15:29 AM »
Hi Bruce
No errors in Browser Console
"Immediate Validation" was set to Default - changed to YES - no change
Will put together an example
In the meantime, here's a debug log:
[1192] WMWEB: Update Filter - Radio Option: 0 - Radio Option chg
[1192] WMWEB: BrowseHistory - PARENT UPDATED Fired... - Browse update
[1192] WMWEB: Update Filter - CheckBox - SMS: 1 - CheckBox change
--- No Browse Update ---
[1192] WMWEB: Update Filter - CheckBox - SMS: 0
[1192] WMWEB: Update Filter - CheckBox - Operator: 1
[1192] WMWEB: Update Filter - CheckBox - Operator: 0
[1192] WMWEB: Update Filter - Radio Option: 1
[1192] WMWEB: BrowseHistory - PARENT UPDATED Fired...
Thanks
Graham
No errors in Browser Console
"Immediate Validation" was set to Default - changed to YES - no change
Will put together an example
In the meantime, here's a debug log:
[1192] WMWEB: Update Filter - Radio Option: 0 - Radio Option chg
[1192] WMWEB: BrowseHistory - PARENT UPDATED Fired... - Browse update
[1192] WMWEB: Update Filter - CheckBox - SMS: 1 - CheckBox change
--- No Browse Update ---
[1192] WMWEB: Update Filter - CheckBox - SMS: 0
[1192] WMWEB: Update Filter - CheckBox - Operator: 1
[1192] WMWEB: Update Filter - CheckBox - Operator: 0
[1192] WMWEB: Update Filter - Radio Option: 1
[1192] WMWEB: BrowseHistory - PARENT UPDATED Fired...
Thanks
Graham
15
Web Server - Ask For Help / Refresh child browse - Checkbox doesn't work - NT 11.33
« on: April 07, 2020, 10:03:23 AM »
Hi All
Have a Memory form with a child Browse.
On the form I have a set of Radio buttons and a number of CheckBox's which alters the filter on the Browse.
Using the Browse PARENT UPDATED Embed to set filter.
Radio buttons work great, ie. ParentUpdated event fires, filter is updated, Browse responds with new filter.
CheckBox doesn't - ParentUpdated is not fired when changing any of the CheckBox's
Checked code a number of times, done debug trace etc.
Thanks
Graham
Have a Memory form with a child Browse.
On the form I have a set of Radio buttons and a number of CheckBox's which alters the filter on the Browse.
Using the Browse PARENT UPDATED Embed to set filter.
Radio buttons work great, ie. ParentUpdated event fires, filter is updated, Browse responds with new filter.
CheckBox doesn't - ParentUpdated is not fired when changing any of the CheckBox's
Checked code a number of times, done debug trace etc.
Thanks
Graham