Correct way to use dynamic tables in an app


I use ScriptRunner a lot, did a couple of small apps too, but without major UI conception. I’m looking at AUI, and other things, and I’m not sure how to start correctly.

In the app I’m working on, I need to display a list of custom fields definition. The list would be available as a REST endpoint (GET only) and inside a view in the app. I was thinking the best would be to reuse the REST endpoint and have a Velocity template that would fetch the data with a Ajax call to display it in a HTML table.

I can use jQuery to get the data and display it, but since I’m building the table dynamically, the AUI stuff is not working correctly. For example, the table header columns have the “aui-table-column-issue-key” class, but sorting is not visibile in the page. Using is partly working, the dialog is always displayed at the first line of the table, not where it was clicked.

In short, what is the correct path to use AUI with dynamic content?