Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Struts html:radio question

843841Aug 22 2005 — edited Jan 10 2008
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 ?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 7 2008
Added on Aug 22 2005
8 comments
888 views