• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Radio Button Group

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I have the same problem as the question below. Anyone has the solution other than using plain JSTL two <c:Foreach>?



I have a nested loop using nested:iterate. Inside the inner loop I have a
radio button. I want to group the radio buttons based on the index of the
outer loop. How can I do it?



Here's the code snapshot:



<nested:iterate property="outerProp" > OuterProperty:

<nested:iterate id="row" property="innerProp"
type="java.my.someType"> InnerProperty:

<nested:radio name="row" property="selectedId"
value="myId" indexed="true" /> My Radio Property

</nested:iterate>

<nested:iterate>





With the indexed="true", my radio buttons are being rendered, for example,
like this:



OuterPropety0:

InnerProperty0: row[0].selectedId

InnerProperty1: row[1].selectedId

InnerProperty2: row[2].selectedId

OuterPropety1:

InnerProperty0: row[0].selectedId

InnerProperty1: row[1].selectedId

InnerProperty2: row[2].selectedId



Whereas, I want it to be like this:



OuterPropety0:

InnerProperty0: row[0].selectedId

InnerProperty1: row[0].selectedId

InnerProperty2: row[0].selectedId

OuterPropety1:

InnerProperty0: row[1].selectedId

InnerProperty1: row[1].selectedId

InnerProperty2: row[1].selectedId



Thanks,
Andy
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic