Destroying Dynamically created ui elements
We are generating labels at runtime in doModify method ,when view is loaded.
(we are able to do this)
IWDLabel Label = (IWDLabel)view.createElement
IWDLabel.class, "Label" );
There is button in a view .
Requirment is to replace labels in the same container on click of button.
but before replacing labels we have to remove initially generated labels from container .
We are using followin code to remove elements from the container
After this When we are regenerating labels on click of button
it gives an exception
+Cannot add element with duplicate ID "Label" of type com.sap.tc.webdynpro.clientserver.uielib.standard.impl.TextView
Please let us know the solutions.