Model driven listpage and temp table

Does anybody know how to combine the two concepts in the title?

I’d like to build a temp table (which is part of the datasource for the model driven list page) during initiation of the list page (or some other time, for that matter).

Can this be done, or is there no way to access the datasource of the listpage in the controller?

This would greatly reduce development in many cases, as this presents an easy way to create many useful pages on the enterprise portal without much effort.

I’ve gotten quite a bit further, though I’m still not there.

I wish somebody had told me before that when you add a method to a query in the AOT, that method is actually a QueryRun method.

Now that I’ve discovered this, linking the Query to my inmemory table of choice is not so much of a problem anymore: I just overrode init on the QueryRun and used setCursor to do the trick (although I have no clue whether I should do that before or after the “super” call in init; for safety, I did both).

Unfortunately, although I can check that the temp table I pass to setCursor does contain records, it looks like the grid on the listpage is not connected to this new instance of the table: it continues to show no records.

Does anybody have a suggestion on what to try next?

  • might I have more success by using a tempdb table instead of an inmemory one? (note: because of some details in the construction, this would actually require quite a bit of work, so I’m somewhat hesitant)

  • should I move the setCursor call to somewhere else?

  • is there some magic call to make the grid “update” itself to the new table instance?

  • other suggestions?