Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

iterator and <s:radio /> question

 
Jordan Smith
Ranch Hand
Posts: 89
  • 0
  • Mark post as helpful
  • send pies
  • 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?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks!!
you are a master, David!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic