• 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
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

How to generate dynamic list of checkboxlist selection

 
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In Action class [ActionSupport extended]
1. equipmentSpeed is object (with get & set method in Action Class), which has getDiscreteConstrains() method which returns List<DiscreteConstrain> object.
DiscreteConstrain has getPossibleValues() method which returns List<String>

2. There is one more object limitPossibleConstrains of class DiscreteConstrain in Action.

I want to iterate over equipmentSpeed.discreteConstrains and get possibleValues which should be selected [checkboxes] and parent set(items of checkbox) should be limitPossibleConstrains[i].possibleValues value


Please identify why following code is not working... [OR Suggest alternative solution..]
 
Sheriff
Posts: 9697
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you iterate over a list, items in the list are placed on top of the value stack. Your iterator tag is useless. You are only using it like a for loop to get index locations. You should use the element i.e. DiscreteContrain elements placed on top of the value stack by the iterator. This code should work but I've not tried it (I don't understand your problem correctly so my code might not be according to what you want)



Also please go through the iterator tag reference and checkboxlist tag reference once.
reply
    Bookmark Topic Watch Topic
  • New Topic