Hi,
I am using SmartGWT 3.0. I have a ListGrid where I have overriden getExpansionComponent(). The current implementation will create a new Canvas each time it will be called.
When I expand a record getExpansionComponent() will be called as expected. When I collapse it onDestroy() of the created Canvas will not be called. When I expand it again getExpansionComponent() will be called again (the created Canvas will not be reused) Due to my implementation another Canvas will be created. The old Canvas will not be destroyed at this time.
Is there a way control the lifecycle of the canvas. I would like them to be destroyed on collapse and whenever the corresponding record will be removed from the listgrid (e.g.after data update). If not: Is it safe to save the Canvas e.g. as an attribute of the record an reuse it in the following calls of getExpansionComponent()?
Thank you!
I am using SmartGWT 3.0. I have a ListGrid where I have overriden getExpansionComponent(). The current implementation will create a new Canvas each time it will be called.
When I expand a record getExpansionComponent() will be called as expected. When I collapse it onDestroy() of the created Canvas will not be called. When I expand it again getExpansionComponent() will be called again (the created Canvas will not be reused) Due to my implementation another Canvas will be created. The old Canvas will not be destroyed at this time.
Is there a way control the lifecycle of the canvas. I would like them to be destroyed on collapse and whenever the corresponding record will be removed from the listgrid (e.g.after data update). If not: Is it safe to save the Canvas e.g. as an attribute of the record an reuse it in the following calls of getExpansionComponent()?
Thank you!
Comment