• 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

iterator and <s:radio /> question

 
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi!

I was half answered in the past and am still stuck.

i have list of qustions, and have to iterate over them. for each one to display the possible answers, and to save what the user have chose.

so i wrote:


1. how can i save what the user chose?
i tried to declare in my action class:
List<String> answer;

but it's null.

I have to know which answers where chosen.

2. <s:property value="%{pos.count}" />. is empty. i would like to display the iterator value like 1,2,3 etc.

How can i do it?
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The name should use array notation; put the index inside square brackets ([]).

Try %{#pos.count}.
 
Jordan Smith
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks!!
you are a master, David!
 
reply
    Bookmark Topic Watch Topic
  • New Topic