title: How to pass dynamically generated IDs to s:url in Struts2?
body: <p>I am dynamically populating a table. And I would like to allow the user to delete individual rows using AJAX.</p>
  
  <p>I am using Struts2, jQuery 1.5.x and Struts-JQuery Plugin.</p>
  
  <p>The code in question looks like:</p>
  
  <pre><code>&lt;s:url id="delete#{stat.index}" value="delete.action"&gt; 
    &lt;s:param name="id" value="myRowId"&gt;&lt;/s:param&gt; 
  &lt;/s:url&gt; 
  &lt;sj:a id="deleteRowLink" href="%{delete#{stat.index}}" targets="targetDiv" button="true"&gt; 
    Delete 
  &lt;/sj:a&gt;
  </code></pre>
  
  <p>The s:url tag's id attribute does not allow me to pass the dynamic index. And if I don't do that, then the generated code is effective only on the last row of data.</p>
  
  <p>Please advise.</p>
  
  <p>Best Regards,</p>
  
  <p>Ashish.</p>