struts-tag property in javascript
Ute Kaiser <[email protected]> Fri, 6 Jun 2025 13:14:17 +0000
| Newsgroups | gmane.comp.jakarta.struts.user |
|---|---|
| Message-ID | <trinity-e42ede12-0e5f-46c8-b03d-720bd8a09e8b-1749215657544@trinity-msg-rest-webde-webde-live-c88f569c-8mrc8> |
Hi,
migrating from Struts1 I encounter in a jsp the error "Equal symbol expected" at the "onclick" row.
I think my old quotes do not work any more with Struts2.
Struts1:
<logic:iterate id="b" name="blabla" scope="request">
<input type="button" value="Delete"
onclick="javascript:if(confirmDelete()){document.getElementById('deleteid').value='<bean:write name="b" property="id" />';}"/>
Struts2:
<s:iterator value="blabla">
<s:submit type="input" value="Delete"
onclick="javascript:if(confirmDelete()){document.getElementById('deleteid').value='<s:property value="id"/>';}"/>
I tried 'id', \"id\", \'id\' "id" but nothing worked out
Any advice appreciated (hopefully not too complicated since I have this row in many jsp files)
Ute