Skip to Content
0
Former Member
Nov 05, 2014 at 12:41 PM

UI5 Trying to Remove TreeTable object

26 Views

Hi All,

I am adding a treetable to my view via some logic in a method. This method is triggered when selecting an IconTabFilter button

The problem I am having is that if you select the same IconTabFilter button. Then it adds another treetable. I know that I need to remove the existing treetable but I am having difficulty in doing this.

When I inspect the treetable in Chrome it has the ID '__table0'.

I must also point out that this is a split view hence the following ID value.

I am adding the treetable using this code: -

oTable.placeAt("idViewRoot--idViewDetail--toolBar-content");

The logic I have tried so far is this: -

$("idViewRoot--idViewDetail--toolBar-content-__table0").remove(); $("__table0").remove();

None of which are working.

I would be grateful if someone could point out what I may be doing wrong.

Thanks

Martin