You have posted exactly the same qustion as a comment to the LibAddonMenu. I was looking into the library code before and I have looked now, but I still didn't find line where is "buttonData.func" called in the code except of "OnClicked" handler:
Lua Code:
button:SetHandler("OnClicked", function(self, ...)
buttonData.func(self, ...)
if control.panel.data.registerForRefresh then
cm:FireCallbacks("LAM-RefreshPanel", control)
end
end)
Maybe if you post a code which you use we can find what is going on.