I'm facing the following problem: I've created a widget to add graphical layers and buffers to the main map. After the user marks the point on the map, I run a query that returns the results of that query and throws its contents into a new tab of the AttributeTable widget. The first time, a new tab is created at the beginning of the widget, and the other tabs, which have layers enabled by default, are in sequence.
The problem is that if the user performs a new query, the attributetable widget is not updated. To update it, the user needs to open the layerlist widget, and click on the option to view in the attribute table of the new layer. I do not understand why it does not work with a "publishData" command. Is there any way to run the Send function from the layer to the attribute table, which is inside the layerlist widget?
Note: I am Brazilian, and my English is not very good. I hope I have managed to express myself well.