Reputation: 13
Trying to render a list, each of which has an ajax form to get further information. The ajax call is being made, however, the results are not being placed in the target div. Can anyone give me any tips or suggestions on this? Thanks.
<table>
<tr>
<th>Details</th>
</tr>
<s:iterator value="userList" status="itStatus">
<tr>
<td>
<s:form id="detailsSubmitForm%{#itStatus.count}" action="users">
<s:hidden name="id"/>
<sj:a formIds="detailsSubmitForm%{#itStatus.count}"
targets="detailsDisplay"
button="true"
type="submit"
class="anchor-details"> Details
</sj:a>
</s:form>
</td>
</tr>
</s:iterator>
</table>
<div id="detailsDisplay"></div>
Upvotes: 1
Views: 418
Reputation: 160191
Is this rendering as you expect? In other words, do you get multiple forms with the count rendered as part of the id?
In any case, rather than using multiple forms, I'd just generate <sj:a>
tags with an id appended onto an "href" attribute. You don't really need to submit a form for this--you only need to pass an ID.
Upvotes: 1