Table with a PopupButton lazy loaded contents - suggestions?

I am using a Table to create a user-specified report listing. That is, the user defines the fields and order they will appear in the Table.

This is working great, but now I have a requirement for one of the fields not be a simple value, but to be a PopupButton that I’d like to be lazy-loaded (since the report may have 100 rows, for example, but more often than not, none of the PopupButtons will be clicked).

Will the PopupButton be a generated column?

I am wondering how do I still put a column header and alignment and position for this type of field since it seems like before this was done by my Container setup?

When the Table is filled based on its Container, how will my generated cells be told what its data is?

I’d like it so that when a PopupButton is pressed, I can check to see if I’ve set up it’s contents. If so, then I’m done, but if not, I’d like to then add more Buttons with click handlers at that time.

Are there any good examples of this?

I didn’t resolve the lazy loading of the popup button (yet?!), but I did find that I could stay with more standard code rather than doing any generateColumn/generateCell work.

I basically set the Table’s Container’s property for that field to be PopupButton.class, and then we setting the values for that field, I create the PopupButton and set it’s value into the Table’s Item property.

It seems to work well enough. I think I may be able to put a click listener on the popup button (not sure if I can get to it before the button itself does), check if it’s loaded, and if not, load it then.