I have a table I am displaying using the displaytag library. In each row I have a radio button. I would like to trigger a JavaScript function when the radio button is clicked, and I would like to send a row identifier to that JavaScript function.
My question is : how can I specify a value in the HTML for that JavScript functin call using the Struts stuff ? The code looks like this :
<display:column title="" class="idcol">
<html:radio property="ID" idName="row" value="ID" onclick="setButtons('Stuff')"/>
</display:column>
Instead of hard-coding 'Stuff' I would like to dynamically place a value there based on the data in the row I am displaying. But if I write
<display:column title="" class="idcol">
<html:radio property="ID" idName="row" value="ID" onclick="setButtons('<c:out value="status"/>')"/>
</display:column>
where
status
is a value in the bean over which I am iterating, I get a syntax error. I also cannot use the standard JSP syntax <%=status%> I'm not sure there is a way to do this - can anyone help ?
On a side note, does anyone besides myself fell that Struts is needlessly complicated and restrictive ?