title: How to Set Generated RowAction Template to sap.ui.table.TreeTable
body: <p>I would like to generate a <a href="https://ui5.sap.com/#/api/sap.ui.table.RowAction" rel="nofollow noreferrer">RowAction</a> with JS dynamically in a surrounding <code>sap.ui.table.TreeTable</code>.</p>
  
  <p>I would like to have a similar structure according to a (working) XML view as follows:</p>
  
  <pre><code>&lt;t:TreeTable id="tree" rowActionCount="1"&gt;
      &lt;t:columns&gt;
          &lt;t:Column&gt;
              &lt;t:label&gt;
                  &lt;Label text="{i18n&gt;ServicesTree_Name}"/&gt;
              &lt;/t:label&gt;
              &lt;t:template&gt;
                  &lt;Label text="{Description}" /&gt;
              &lt;/t:template&gt;
          &lt;/t:Column&gt;
      &lt;/t:columns&gt;
      &lt;t:rowActionTemplate&gt;
          &lt;t:RowAction&gt;
              &lt;t:RowActionItem 
              type="Delete"
              icon="sap-icon://delete"
              press=".onDelete" /&gt;
          &lt;/t:RowAction&gt;
      &lt;/t:rowActionTemplate&gt;
  &lt;/t:TreeTable&gt;
  </code></pre>
  
  <p>I have a controller which generates a RowAction with RowActionItem (see below code snippet), but how to put this into the TreeTable? </p>
  
  <pre><code>const oRowActionItem = new sap.ui.table.RowActionItem({
      type: sap.ui.table.RowActionType.Delete,
      icon: "sap-icon://delete"
  });
  const oRowAction = new sap.ui.table.RowAction();
  oRowAction.addItem(oRowActionItem);
  </code></pre>