Hi,
I'm using SmartClient Version: v9.1p_2015-09-16/Pro Development Only (built 2015-09-16)
and I am seeing a peculiar behaviour whenever I add a new column to the listGrid.
The setup:
I have a listGrid with a filterEditor and an advancedCriteria on a hidden column (i.e.: I am filtering on a particular column which is hidden). The list grid is not live (no auto polling).
The weird behaviour:
Whenever a new column is added, this "hidden" advanced criteria is wiped out, which causes the listGrid to show all, unfiltered, data.
Details:
what I have observed is the following:
- if I overwrite the showField() routine in order to set a breakpoint and validate data I see the following
-- calling this.filterEditor.getEditForm()._hasAdvancedCriteria() BEFORE calling super returns true
-- calling this.filterEditor.getEditForm()._hasAdvancedCriteria() right AFTER calling super returns false.
After doing some more debugging, it would seem that the filter editor is hidden (via hideInlineEditor) and re-shown (showInlineEditor) inside ISC_Grids.setFields(), at which point its internal _extraAdvancedCriteria is no longer present, and this.filterEditor.getEditForm().getValuesAsCriteria(null, "substring"); returns an empty criteria.
I was unable to reproduce this problem on your showcase (https://www.smartclient.com/#filter) even after modifying the example to fit my use case. I am wondering if this is potentially a bug that was later fixed in Version 10.X?
One workaround is to do the following:
But since the issue occurs inside smartclient code, I am hoping that a fix is available.
I'm using SmartClient Version: v9.1p_2015-09-16/Pro Development Only (built 2015-09-16)
and I am seeing a peculiar behaviour whenever I add a new column to the listGrid.
The setup:
I have a listGrid with a filterEditor and an advancedCriteria on a hidden column (i.e.: I am filtering on a particular column which is hidden). The list grid is not live (no auto polling).
The weird behaviour:
Whenever a new column is added, this "hidden" advanced criteria is wiped out, which causes the listGrid to show all, unfiltered, data.
Details:
what I have observed is the following:
- if I overwrite the showField() routine in order to set a breakpoint and validate data I see the following
-- calling this.filterEditor.getEditForm()._hasAdvancedCriteria() BEFORE calling super returns true
-- calling this.filterEditor.getEditForm()._hasAdvancedCriteria() right AFTER calling super returns false.
After doing some more debugging, it would seem that the filter editor is hidden (via hideInlineEditor) and re-shown (showInlineEditor) inside ISC_Grids.setFields(), at which point its internal _extraAdvancedCriteria is no longer present, and this.filterEditor.getEditForm().getValuesAsCriteria(null, "substring"); returns an empty criteria.
I was unable to reproduce this problem on your showcase (https://www.smartclient.com/#filter) even after modifying the example to fit my use case. I am wondering if this is potentially a bug that was later fixed in Version 10.X?
One workaround is to do the following:
Code:
showField: function(aInField) { var lForm = this.filterEditor.getEditForm(); var lCurrentCriteria = lForm.getValuesAsCriteria(null, this.autoFetchTextMatchStyle); this.Super("showField", arguments); lForm.setValuesAsCriteria(lCurrentCriteria); }
Comment