Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Replacing contents of a container

    If I replace the contents of an HLayout, for example, with another component do I need to clear() or destroy() the original contents?

    For example, I have an HLayout containing a ListGrid and a DynamicForm.
    When the user clicks a button I want to replace the contents of the HLayout with a TileGrid.
    Do I need to clean up the ListGrid and DynamicForm objects, or does SmartGWT do that automatically?

    #2
    Yes, you need to destroy() them if you are done with them permanently but you do not plan to destroy() their container (destroy is recursive). If you destroy() the members, they will be automatically removed as members, so there is never a need to both call removeMember() and destroy().

    Comment

    Working...
    X