NetTalk Central

Author Topic: Refresh child browse - Checkbox doesn't work - NT 11.33  (Read 5175 times)

Graham

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Refresh child browse - Checkbox doesn't work - NT 11.33
« Reply #1 on: April 07, 2020, 11:10:26 PM »
hi Graham,

check the browser console to see if any errors are reported.
Make sure the checkbox is not set as "immediate validation : OFF "
Other than that post an example.

cheers
Bruce

Graham

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: Refresh child browse - Checkbox doesn't work - NT 11.33
« Reply #2 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

Graham

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: Refresh child browse - Checkbox doesn't work - NT 11.33
« Reply #3 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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Refresh child browse - Checkbox doesn't work - NT 11.33
« Reply #4 on: April 08, 2020, 09:53:30 PM »
Hi Graham,

ok, your example is "wrong" in so many ways that I'm going to let you fix that before we even go to the next step.

a) you're using something called gsDebug? use
p_web.Trace('whatever')
if you want to send things to debugview...
Not critical, but saves me having to comment out all your code.

b) you have set your browse filter to
my:filter
but then you assign my:filter far away from where it is actually used. (You are calling BuildFilter from IndexPage, and then assigning my:filter in a single event embed point in ChildBrowse.)
You would be better just calling BuildFilter, and assigning my:Filter in the embed directly before my:filer is USED in the browse.

Fix the example, then post it again, and let's see how we get on...

Cheers
Bruce





Graham

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: Refresh child browse - Checkbox doesn't work - NT 11.33
« Reply #5 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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Refresh child browse - Checkbox doesn't work - NT 11.33
« Reply #6 on: April 09, 2020, 07:34:11 PM »
In the parent form (Indexpage) you need to set the fields (RadioOptions and Check1) to "reset the browse".
This is done by going to each field, to the Client-Side tab, and adding the browse to the rest list there.

cheers
Bruce

PS you don't have to add a manual TRACE to the filter value - there's a template option on the browse for that.

Graham

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: Refresh child browse - Checkbox doesn't work - NT 11.33
« Reply #7 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