Hi,
We are using SmartClient Version: v8.3p_2013-05-14/PowerEdition Deployment (built 2013-05-14) with IE8 and SmartGWT Power Edition 3.1p.
We have a TreeGrid based on a server datasource. When new data arrives, the grid is updated by using UpdateCaches. This construction works fine.
The grid is defined like follows:
treeGrid.setDataFetchMode(FetchMode.LOCAL);
treeGrid.setAutoFetchData(true);
treeGrid.setShowConnectors(true);
treeGrid.setSelectionType(SelectionStyle.SINGLE);
treeGrid.setShowFilterEditor(true);
treeGrid.setLoadDataOnDemand(false);
treeGrid.setKeepParentsOnFilter(true);
treeGrid.setFilterLocalData(true);
When we filter the grid, we'd like to see also the parent nodes, even if they don't meet the filtering criteria (setKeepParentsOnFilter).
However when we use filtering, we have a problem with leaf nodes, namely the grid becomes empty when only leaf nodes meet the filtering criteria after UpdateCashes is performed, as if setKeepParentsOnFilter is not taken into account with UpdateCaches. The SmartGWT debug mode shows the following:
11:43:09.187:INFO:ResultTree:isc_ResultTree_0 (created by: isc_TreeGrid_0):Updating cache: operationType 'update', 1 rows update data:
[
{CMD: "bash",
TIME: "0:01",
PID: 14193,
UID: "trainot",
PPID: 14129,
NODE: "node",
STIME: "09:26:55",
TTY: "pts/46"}
]
11:43:09.187:DEBUG:ResultTree:isc_ResultTree_0 (created by: isc_TreeGrid_0):updated node :
{CMD: "bash",
TIME: "0:01",
PID: 14193,
UID: "trainot",
PPID: 14129,
NODE: "node",
STIME: "09:26:55",
TTY: "pts/46"}
didn't match filter: {UID: "blabla"}
11:43:09.187:DEBUG:ResultTree:isc_ResultTree_0 (created by: isc_TreeGrid_0):updated cache: 0 row(s) added, 0 row(s) updated, 0 row(s) removed.
11:43:09.203:INFO:redraws:isc_TreeGrid_0_body:Scheduling redraw (dataChanged)
[a]MathFunction.getStackTrace(_1=>undef, _2=>undef, _3=>undef, _4=>undef, _5=>undef)
Canvas.$q9(_1=>"dataChanged", _2=>undef)
Canvas.markForRedraw(_1=>"dataChanged", undef, undef, undef, undef)
Array.map(_1=>"markForRedraw", _2=>"dataChanged", _3=>undef, _4=>undef, _5=>undef, _6=>undef)
ListGrid.$25a(_1=>"dataChanged")
ListGrid.redrawForDataChanged()
ListGrid.dataChanged(_1=>undef, _2=>undef, _3=>undef, _4=>undef, _5=>undef)
[a]MathFunction.invokeSuper(_1=>null, _2=>"dataChanged", _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef)
[a]MathFunction.Super(_1=>"dataChanged", _2=>Obj{length:0}, _3=>undef)
TreeGrid.dataChanged()
dataChangedObservation()
ResultTree.handleUpdate(_1=>"update", _2=>Array[1], _3=>false)
ResultTree.dataSourceDataChanged(_1=>Obj, _2=>Obj)
dataChangedObservation(dsResponse=>Obj, dsRequest=>Obj)
DataSource.updateCaches(_1=>Obj, _2=>Obj)
[c]Class.fireCallback(_1=>callback(), _2=>"data", _3=>Array[1], _4=>Obj, _5=>undef) on [Class Messaging]
[c]Messaging._message(message=>Obj{ID:-9223372036854775778_1383907389187})
11:43:09.219:INFO:ResultTree:isc_ResultTree_0 (created by: isc_TreeGrid_0):Updating cache: operationType 'update', 1 rows update data:
[
{CMD: "ps -ef",
TIME: "0:00",
PID: 7726,
UID: "blabla",
PPID: 7399,
NODE: "node",
STIME: "11:05:37",
TTY: "?"}
]
11:43:09.219:DEBUG:ResultTree:isc_ResultTree_0 (created by: isc_TreeGrid_0):updated cache: 0 row(s) added, 1 row(s) updated, 0 row(s) removed.
11:43:09.234:INFO:ResultTree:isc_ResultTree_0 (created by: isc_TreeGrid_0):Updating cache: operationType 'update', 1 rows update data:
[
{CMD: "ps -efblablalablabla",
TIME: "0:00",
PID: 7399,
UID: "trainot",
PPID: 7400,
NODE: "node",
STIME: "13:05:37",
TTY: "?"}
]
11:43:09.234:DEBUG:ResultTree:isc_ResultTree_0 (created by: isc_TreeGrid_0):updated node :
{CMD: "ps -efblablalablabla",
TIME: "0:00",
PID: 7399,
UID: "trainot",
PPID: 7400,
NODE: "node",
STIME: "13:05:37",
TTY: "?"}
didn't match filter: {UID: "blabla"}
11:43:09.234:DEBUG:ResultTree:isc_ResultTree_0 (created by: isc_TreeGrid_0):updated cache: 0 row(s) added, 0 row(s) updated, 1 row(s) removed.
11:43:09.250:INFO:ResultTree:isc_ResultTree_0 (created by: isc_TreeGrid_0):Updating cache: operationType 'update', 1 rows update data:
[
{CMD: "ps -efblablalablabla",
TIME: "0:00",
PID: 14129,
UID: "trainot",
PPID: 1,
NODE: "node",
STIME: "13:05:37",
TTY: "?"}
]
11:43:09.266:DEBUG:ResultTree:isc_ResultTree_0 (created by: isc_TreeGrid_0):updated node :
{CMD: "ps -efblablalablabla",
TIME: "0:00",
PID: 14129,
UID: "trainot",
PPID: 1,
NODE: "node",
STIME: "13:05:37",
TTY: "?"}
didn't match filter: {UID: "blabla"}
11:43:09.266:DEBUG:ResultTree:isc_ResultTree_0 (created by: isc_TreeGrid_0):updated cache: 0 row(s) added, 0 row(s) updated, 1 row(s) removed.
11:43:09.266:INFO:ResultTree:isc_ResultTree_0 (created by: isc_TreeGrid_0):Updating cache: operationType 'update', 1 rows update data:
[
{CMD: "ps -efblablalablabla",
TIME: "0:00",
PID: 7400,
UID: "trainot",
PPID: 14129,
NODE: "node",
STIME: "13:05:37",
TTY: "?"}
]
11:43:09.266:DEBUG:ResultTree:isc_ResultTree_0 (created by: isc_TreeGrid_0):updated node :
{CMD: "ps -efblablalablabla",
TIME: "0:00",
PID: 7400,
UID: "trainot",
PPID: 14129,
NODE: "node",
STIME: "13:05:37",
TTY: "?"}
didn't match filter: {UID: "blabla"}
11:43:09.281:DEBUG:ResultTree:isc_ResultTree_0 (created by: isc_TreeGrid_0):updated cache: 0 row(s) added, 0 row(s) updated, 0 row(s) removed.
11:43:09.281:TMR6:DEBUG:drawing:clearRedrawQueue: [TreeGridBody ID:isc_TreeGrid_0_body]
11:43:09.281:TMR6:DEBUG:recordComponents:isc_TreeGrid_0:updateRecordComponents - old record components before refreshing:[
]
From these messages:
"
didn't match filter: {UID: "blabla"}
11:43:09.234:DEBUG:ResultTree:isc_ResultTree_0 (created by: isc_TreeGrid_0):updated cache: 0 row(s) added, 0 row(s) updated, 1 row(s) removed.
"
we deduct that records which do not meet the criteria are removed from the cache when calling UpdateCaches (didn't match filter: {UID: "blabla"}), but these are parent records of leaf nodes that we want to show in the tree corresponding to the setting setKeepParentsOnFilter.
Our result is that after UpdateCaches, if the filtered records contain leaf nodes, we get warnings similar to:
12:11:15.199:TMR4:WARN:ResultTree:isc_ResultTree_0 (created by: isc_TreeGrid_0):STATE:["/"
] rss?:true
and the tree becomes empty.
Please could you help with this issue ?
Many thanks in advance
Kind regards
We are using SmartClient Version: v8.3p_2013-05-14/PowerEdition Deployment (built 2013-05-14) with IE8 and SmartGWT Power Edition 3.1p.
We have a TreeGrid based on a server datasource. When new data arrives, the grid is updated by using UpdateCaches. This construction works fine.
The grid is defined like follows:
treeGrid.setDataFetchMode(FetchMode.LOCAL);
treeGrid.setAutoFetchData(true);
treeGrid.setShowConnectors(true);
treeGrid.setSelectionType(SelectionStyle.SINGLE);
treeGrid.setShowFilterEditor(true);
treeGrid.setLoadDataOnDemand(false);
treeGrid.setKeepParentsOnFilter(true);
treeGrid.setFilterLocalData(true);
When we filter the grid, we'd like to see also the parent nodes, even if they don't meet the filtering criteria (setKeepParentsOnFilter).
However when we use filtering, we have a problem with leaf nodes, namely the grid becomes empty when only leaf nodes meet the filtering criteria after UpdateCashes is performed, as if setKeepParentsOnFilter is not taken into account with UpdateCaches. The SmartGWT debug mode shows the following:
11:43:09.187:INFO:ResultTree:isc_ResultTree_0 (created by: isc_TreeGrid_0):Updating cache: operationType 'update', 1 rows update data:
[
{CMD: "bash",
TIME: "0:01",
PID: 14193,
UID: "trainot",
PPID: 14129,
NODE: "node",
STIME: "09:26:55",
TTY: "pts/46"}
]
11:43:09.187:DEBUG:ResultTree:isc_ResultTree_0 (created by: isc_TreeGrid_0):updated node :
{CMD: "bash",
TIME: "0:01",
PID: 14193,
UID: "trainot",
PPID: 14129,
NODE: "node",
STIME: "09:26:55",
TTY: "pts/46"}
didn't match filter: {UID: "blabla"}
11:43:09.187:DEBUG:ResultTree:isc_ResultTree_0 (created by: isc_TreeGrid_0):updated cache: 0 row(s) added, 0 row(s) updated, 0 row(s) removed.
11:43:09.203:INFO:redraws:isc_TreeGrid_0_body:Scheduling redraw (dataChanged)
[a]MathFunction.getStackTrace(_1=>undef, _2=>undef, _3=>undef, _4=>undef, _5=>undef)
Canvas.$q9(_1=>"dataChanged", _2=>undef)
Canvas.markForRedraw(_1=>"dataChanged", undef, undef, undef, undef)
Array.map(_1=>"markForRedraw", _2=>"dataChanged", _3=>undef, _4=>undef, _5=>undef, _6=>undef)
ListGrid.$25a(_1=>"dataChanged")
ListGrid.redrawForDataChanged()
ListGrid.dataChanged(_1=>undef, _2=>undef, _3=>undef, _4=>undef, _5=>undef)
[a]MathFunction.invokeSuper(_1=>null, _2=>"dataChanged", _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef)
[a]MathFunction.Super(_1=>"dataChanged", _2=>Obj{length:0}, _3=>undef)
TreeGrid.dataChanged()
dataChangedObservation()
ResultTree.handleUpdate(_1=>"update", _2=>Array[1], _3=>false)
ResultTree.dataSourceDataChanged(_1=>Obj, _2=>Obj)
dataChangedObservation(dsResponse=>Obj, dsRequest=>Obj)
DataSource.updateCaches(_1=>Obj, _2=>Obj)
[c]Class.fireCallback(_1=>callback(), _2=>"data", _3=>Array[1], _4=>Obj, _5=>undef) on [Class Messaging]
[c]Messaging._message(message=>Obj{ID:-9223372036854775778_1383907389187})
11:43:09.219:INFO:ResultTree:isc_ResultTree_0 (created by: isc_TreeGrid_0):Updating cache: operationType 'update', 1 rows update data:
[
{CMD: "ps -ef",
TIME: "0:00",
PID: 7726,
UID: "blabla",
PPID: 7399,
NODE: "node",
STIME: "11:05:37",
TTY: "?"}
]
11:43:09.219:DEBUG:ResultTree:isc_ResultTree_0 (created by: isc_TreeGrid_0):updated cache: 0 row(s) added, 1 row(s) updated, 0 row(s) removed.
11:43:09.234:INFO:ResultTree:isc_ResultTree_0 (created by: isc_TreeGrid_0):Updating cache: operationType 'update', 1 rows update data:
[
{CMD: "ps -efblablalablabla",
TIME: "0:00",
PID: 7399,
UID: "trainot",
PPID: 7400,
NODE: "node",
STIME: "13:05:37",
TTY: "?"}
]
11:43:09.234:DEBUG:ResultTree:isc_ResultTree_0 (created by: isc_TreeGrid_0):updated node :
{CMD: "ps -efblablalablabla",
TIME: "0:00",
PID: 7399,
UID: "trainot",
PPID: 7400,
NODE: "node",
STIME: "13:05:37",
TTY: "?"}
didn't match filter: {UID: "blabla"}
11:43:09.234:DEBUG:ResultTree:isc_ResultTree_0 (created by: isc_TreeGrid_0):updated cache: 0 row(s) added, 0 row(s) updated, 1 row(s) removed.
11:43:09.250:INFO:ResultTree:isc_ResultTree_0 (created by: isc_TreeGrid_0):Updating cache: operationType 'update', 1 rows update data:
[
{CMD: "ps -efblablalablabla",
TIME: "0:00",
PID: 14129,
UID: "trainot",
PPID: 1,
NODE: "node",
STIME: "13:05:37",
TTY: "?"}
]
11:43:09.266:DEBUG:ResultTree:isc_ResultTree_0 (created by: isc_TreeGrid_0):updated node :
{CMD: "ps -efblablalablabla",
TIME: "0:00",
PID: 14129,
UID: "trainot",
PPID: 1,
NODE: "node",
STIME: "13:05:37",
TTY: "?"}
didn't match filter: {UID: "blabla"}
11:43:09.266:DEBUG:ResultTree:isc_ResultTree_0 (created by: isc_TreeGrid_0):updated cache: 0 row(s) added, 0 row(s) updated, 1 row(s) removed.
11:43:09.266:INFO:ResultTree:isc_ResultTree_0 (created by: isc_TreeGrid_0):Updating cache: operationType 'update', 1 rows update data:
[
{CMD: "ps -efblablalablabla",
TIME: "0:00",
PID: 7400,
UID: "trainot",
PPID: 14129,
NODE: "node",
STIME: "13:05:37",
TTY: "?"}
]
11:43:09.266:DEBUG:ResultTree:isc_ResultTree_0 (created by: isc_TreeGrid_0):updated node :
{CMD: "ps -efblablalablabla",
TIME: "0:00",
PID: 7400,
UID: "trainot",
PPID: 14129,
NODE: "node",
STIME: "13:05:37",
TTY: "?"}
didn't match filter: {UID: "blabla"}
11:43:09.281:DEBUG:ResultTree:isc_ResultTree_0 (created by: isc_TreeGrid_0):updated cache: 0 row(s) added, 0 row(s) updated, 0 row(s) removed.
11:43:09.281:TMR6:DEBUG:drawing:clearRedrawQueue: [TreeGridBody ID:isc_TreeGrid_0_body]
11:43:09.281:TMR6:DEBUG:recordComponents:isc_TreeGrid_0:updateRecordComponents - old record components before refreshing:[
]
From these messages:
"
didn't match filter: {UID: "blabla"}
11:43:09.234:DEBUG:ResultTree:isc_ResultTree_0 (created by: isc_TreeGrid_0):updated cache: 0 row(s) added, 0 row(s) updated, 1 row(s) removed.
"
we deduct that records which do not meet the criteria are removed from the cache when calling UpdateCaches (didn't match filter: {UID: "blabla"}), but these are parent records of leaf nodes that we want to show in the tree corresponding to the setting setKeepParentsOnFilter.
Our result is that after UpdateCaches, if the filtered records contain leaf nodes, we get warnings similar to:
12:11:15.199:TMR4:WARN:ResultTree:isc_ResultTree_0 (created by: isc_TreeGrid_0):STATE:["/"
] rss?:true
and the tree becomes empty.
Please could you help with this issue ?
Many thanks in advance
Kind regards
Comment