How to display table content dynamically in jira plugin webwork module?
<p>I am creating a jira plugin, and I currently have a webwork module. I have the following class to represent the webwork:</p>

<pre><code>public class ReportWebworkAction extends JiraWebActionSupport {

    private ArrayList&lt;String&gt; dataList = new ArrayList&lt;String&gt;();
    private String temp;

    //setters and getters for all varaibles

    @Override
    public String doDefault() throws Exception {
         //1) make http request
         //2) parse json data
         //3) display list of data in html table using velocity.vm

          return super.doDefault();
    }
}
</code></pre>

<p>Right now I am able to successfully make the http request and parse the data into a list of java objects. How can I look through that list in my velocity page and for each item create a  element to display the data.</p>

<p>This is what I want to do:</p>

<pre><code>#foreach($item in $dataList) {
    &lt;tr&gt;
          &lt;td&gt;$item.key&lt;/td&gt;
          &lt;td&gt;$item.name&lt;/td&gt;
          &lt;td&gt;$item.value&lt;/td&gt;
    &lt;/tr&gt;
}
#end
</code></pre>

<p>My velocity page can't seem to recognize the $dataList item which is an ArrayList variable in my ReportWebworkAction class. It can access the string variable temp however.</p>

<p>I read that I need to use the Content Provider and the getContextMap() method, but I am confused of how to use that in a separate class. Can someone show me the correct way to do this? Thanks. </p>