details: https://code.openbravo.com/erp/devel/pi/rev/e9d6d5b57fd1 changeset: 26381:e9d6d5b57fd1 user: Carlos Aristu <carlos.aristu <at> openbravo.com> date: Wed Apr 29 08:53:03 2015 +0200 summary: fixes issue 29665: NP Error raised when using HQL Based Tables on a level 2 tab
A unnecessary request was being done when accessing to the HQL query based subtab. This was caused because the tab was not being identified properly as a subtab. The view.parentProperty was used to identify if we are on a child tab. This property could be undefined depending on the configuration of the tab in the application dictionary. Now view.parentView is used instead of view.parentProperty because it does not return undefined in this cases diffstat: modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diffs (16 lines): diff -r b586f2fd789c -r e9d6d5b57fd1 modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js --- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js Wed Apr 29 08:44:27 2015 +0200 +++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js Wed Apr 29 08:53:03 2015 +0200 @@ -1599,7 +1599,11 @@ // do not refresh if the parent is not selected and we have no data // anyway - if (this.view.parentProperty && (!this.data || !this.data.getLength || this.data.getLength() === 0)) { + // we use this.view.parentView to identify if we are on a child tab + // this.view.parentProperty was used before but this value could be + // undefined under some circumstances + // See issue https://issues.openbravo.com/view.php?id=29665 + if (this.view.parentView && (!this.data || !this.data.getLength || this.data.getLength() === 0)) { if (this.view.parentView.isShowingTree) { selectedValues = this.view.parentView.treeGrid.getSelectedRecords(); } else { ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits