NetTalk Central

Author Topic: Trouble with an EIP checkbox and child browse disappearing  (Read 6038 times)

Stu

  • Hero Member
  • *****
  • Posts: 510
    • View Profile
    • Email
Trouble with an EIP checkbox and child browse disappearing
« on: March 28, 2016, 04:16:42 PM »
Hi Folks,

Nettalk 9 (latest)
Clarion 10 (11975)
MSSQL driver

Am experiencing the following issue:

A parent and child browse, where the parent has a checkbox EIP field (local variable). When the user clicks on the checkbox in the parent browse (and does nothing else, doesn't click on the row itself except for the checkbox) the child browse disappears.

Clicking on the row (not the checkbox) will bring the child browse back.

First things - I can't replicate this in an example (tried Accounts). The process works fine with the Accounts example.

So it might, possibly, be an MSSQL thing. Not sure yet.

Testing further, I turned on the debug options for both the browses. The two browse names are w_InvoiceLoads_Browse and w_InvoiceLoads_Items_Browse.

First attachment image is the debug log for when the checkbox is ticked.

Second image is the debug log for when the row is clicked.

There is the obvious difference of the EIPAccepted call, but there's also a (ParentSilent=1) log. Might be something.

Any ideas what might be happening?
« Last Edit: March 28, 2016, 04:54:04 PM by Stu »
Cheers,

Stu Andrews

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11239
    • View Profile
Re: Trouble with an EIP checkbox and child browse disappearing
« Reply #1 on: March 29, 2016, 11:26:28 PM »
Hi Stu,

my guess is the child is set to be invisible, or becomes empty, under the after-click.
An example would be easiest to comment on here, but in lieu of that it should be easy to debug what is happening.

check
a) the event into the browse when the EIP box is checked
b) the result sent back to the browser (ie inspect the result in the firebug console.)
c) the Filter value of the child browse after the click.

By inspecting the result, and following the code, it should be clear where it is diverging from what you expect.

cheers
Bruce


Stu

  • Hero Member
  • *****
  • Posts: 510
    • View Profile
    • Email
Re: Trouble with an EIP checkbox and child browse disappearing
« Reply #2 on: March 31, 2016, 05:25:37 PM »
Okay, so having a look at the responses in firebug, for the problem system (missing child browse) and the accounts example (works fine).

1. Accounts example, EIP Checkbox response:

Code: [Select]
<?xml version="1.0" encoding="iso-8859-1"?>
<ajax-response>
<response type="element" id="browselineitems_browseinvoices_header_div">
<div id="browselineitems_browseinvoices_header_div"  class="nt-header nt-browse-header"></div>
</response>
<response type="element" id="browselineitems_browseinvoices_table_div">
<div id="browselineitems_browseinvoices_table_div"  class="ui-widget">
</div><!-- BrowseLineItems_table_div -->

</response>
<response type="script">
document.title = &quot;Invoices&quot;;
$('#browselineitems_browseinvoices_div').ntbrowse('hideLocator');
$('#browselineitems_browseinvoices_div').ntbrowse('hideNav');
$('#browselineitems_browseinvoices_div').ntbrowse('hideFormButtons',true);
$('#browselineitems_browseinvoices_div').ntbrowse('refresh',&quot;&quot;);
$('#browselineitems_browseinvoices_div').ntbrowse('hide');
</response>
</ajax-response>

2. Problem system, EIP Checkbox response:

Code: [Select]
<?xml version="1.0" encoding="utf-8"?>
<ajax-response>
<response type="element" id="w_invoiceloads_items_browse_w_invoiceloads_browse_table_div">
<div id="w_invoiceloads_items_browse_w_invoiceloads_browse_table_div"  class="ui-widget">
</div><!-- w_InvoiceLoads_Items_Browse_table_div -->

</response>
<response type="script">
$('#w_invoiceloads_items_browse_w_invoiceloads_browse_div').ntbrowse('hideLocator');
$('#w_invoiceloads_items_browse_w_invoiceloads_browse_div').ntbrowse('hideNav');
$('#w_invoiceloads_items_browse_w_invoiceloads_browse_div').ntbrowse('hideFormButtons',true);
$('#w_invoiceloads_items_browse_w_invoiceloads_browse_div').ntbrowse('refresh',&quot;&quot;);
$('#w_invoiceloads_items_browse_w_invoiceloads_browse_div').ntbrowse('hide');
$('#w_InvoiceLoads_Search_frm').ntform('ready');
</response>
</ajax-response>

-

So the first thing I see is that the encoding is different. Seems strange, I haven't touched anything to do with encoding. Would this make any difference? [Edit: Changed to the iso charset, didn't change anything here in this issue]

Second thing is that yes, there is a "browselineitems_browseinvoices_header_div" <response> and <div> in the working example that isn't in the not-working example.

However, the commented <!-- w_InvoiceLoads_Items_Browse_table_div --> line is in the not-working, as the counterpart in the working example.

-

Any thoughts on where to go from here?
« Last Edit: March 31, 2016, 05:28:54 PM by Stu »
Cheers,

Stu Andrews

Stu

  • Hero Member
  • *****
  • Posts: 510
    • View Profile
    • Email
Re: Trouble with an EIP checkbox and child browse disappearing
« Reply #3 on: April 06, 2016, 01:17:18 PM »
Bump.

Looking at this again, the problem seems to be that the <response> element for the browse doesn't appear where it should (according to the working example response).

It's working out _why_ it's not appearing that has got me stumped. The browse is a child browse. No special filters on it except that of the parent guid.

As was in the original post (the pictures I think) the browse gets run (debug logged the browse filter), but then gets hidden.

So need to work out how it is being hidden (via some template option or possibility?).

Any ideas on that would be really helpful.

Thanks.
Cheers,

Stu Andrews

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11239
    • View Profile
Re: Trouble with an EIP checkbox and child browse disappearing
« Reply #4 on: April 06, 2016, 10:55:26 PM »
see if you can construct the same problem in an example.
that would be most helpful in understanding what is happening.

cheers
Bruce

Stu

  • Hero Member
  • *****
  • Posts: 510
    • View Profile
    • Email
Re: Trouble with an EIP checkbox and child browse disappearing
« Reply #5 on: April 07, 2016, 03:32:45 AM »
Am just looking for some idea, some direction. I can't get it to happen in an example as said above.

I guess it's just something I'll have to work around.
Cheers,

Stu Andrews

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11239
    • View Profile
Re: Trouble with an EIP checkbox and child browse disappearing
« Reply #6 on: April 11, 2016, 12:45:48 AM »
If you can't duplicate in an example then you don't (yet) (fully) understand the problem <g>.

The idea behind examining the response in firebug is to see what part of the response behaves differently to the way one would expect.

If an example app behaves well, then this provides a baseline for what one "should expect". Then by comparing the response to one that does not work you can try and narrow down either the difference between the example and the real one, and also the way in which the real one is deviating from what you would expect.

For example, if the child browse disappears then it's because the response either told it to hide itself, or activly removed the HTML from the existing div. Understanding what it did, and then working back from there to the "why" becomes the primary debugging approach.

cheers
Bruce

Stu

  • Hero Member
  • *****
  • Posts: 510
    • View Profile
    • Email
Re: Trouble with an EIP checkbox and child browse disappearing
« Reply #7 on: May 27, 2016, 07:46:56 PM »
Hi Bruce,

I've managed to replicate in Accounts (31).

With my code it happens reliably every time. With the example there were some clicks that the child browse appears for, some it doesn't.

Attached.

Instructions:

1. Go to Invoices.
2. Click the mouse on the checkbox in the Invoices browse.
3. Child browse should disappear.
4. Repeat 2. a few times.
5. In my code (and in the example when it breaks), click on the row anywhere else (not the checkbox) to bring back the child browse.

Cheers.
Cheers,

Stu Andrews

Stu

  • Hero Member
  • *****
  • Posts: 510
    • View Profile
    • Email
Re: Trouble with an EIP checkbox and child browse disappearing
« Reply #8 on: June 02, 2016, 03:04:22 PM »
Little friendly bump for Bruce!
Cheers,

Stu Andrews

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11239
    • View Profile
Re: Trouble with an EIP checkbox and child browse disappearing
« Reply #9 on: June 07, 2016, 01:53:41 AM »
ok, so it's a combination of settings that leads to this outcome.
I've tweaked the 9.10 build to fix it.

cheers
Bruce

Stu

  • Hero Member
  • *****
  • Posts: 510
    • View Profile
    • Email
Re: Trouble with an EIP checkbox and child browse disappearing
« Reply #10 on: June 09, 2016, 02:03:50 AM »
Champion! Thank you sir.
Cheers,

Stu Andrews