struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hary <>
Subject Re: radio buttons in dynamic forms
Date Tue, 19 Aug 2003 19:25:52 GMT
I had a similar problem and this is how I fixed it.

Define a new variable somedata in your parent form
because you want to tie this to one of the values from
your child

e.g OrderForm 
      private String selected;
      private ArrayList orderList;

      OID, price, .... 

<c:set var="selectedOID"
<c:forEach var="lines"
<tr height="25" class="TableCellBackground"> 
<td><div class="ListBoxText" nowrap>
<html:radio property="selected" value="${lines.OID}"
<c:out value="${}" />

Hope this helps.
If you find a better way let me know.


--- Claire Suttle <> wrote:
> Hi,
> I am dynamically creating a form, by preopulating a
> DynaActionForm. The form is made from an ArrayList,
> and each object in the array contains the data for
> one row of a table. I need the user, looking at this
> page, to be able to select one and only one row in
> the table - which I am trying to do using radio
> buttons.
> So my table looks something like:
> radiobutton    somedata    sometext (All from
> ArrayList[0])
> radiobutton    somedata    sometext (All from
> ArrayList[1])
> radiobutton    somedata    sometext (All from
> ArrayList[2])
> and I need all these radio buttons to be part of the
> same group, however they are expanded in the jsp
> page to each be in their own group:
> <input type="radio" name="currentUsers[0].change">
> <input type="radio" name="currentUsers[1].change">
> <input type="radio" name="currentUsers[2].change">
> Does anyone know of a way to place all these radio
> buttons in one group? I also somehow need to
> preserve the relationship between each radio button
> and its row of data, so that I know which row has
> been selected.
> Thanks,
> Claire

Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message