• 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

html:select indexed - idexes the formbean i.s.o. the property

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I already searched the forum for comparable topics, but in none of them was a solution available.

I'm generating an indexed selectbox for every item in a list (of users). By doing this I want to be able to "evaluate" every user according to the selected values from their respective selectbox.
So far I am able to generate the select boxes, but somehow it doesn't see the property (for the selectbox) as the indexed attribute. The followinng code generates the required list with the selectboxes.

The only problem is that the selectboxes are not correctly indexed. Normally you would expect something like this:
html:select property="formbean.evalId[i]" where evalId contains the index number.
But what I get is html:select property="formbean[0].evalId" where in this case the formbean itself gets indexed.
I implemented the property in the formbean as well as a String[] as a List but I haven't solved the problem yet.
Any ideas on this?
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<bean:define name="formbean" property="evalId" id="evalId"/>
<c:forEach....
...
<html:select name="evalId" indexed="true">
...
 
Ergin Er
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Marc Peabody:
<bean efine name="formbean" property="evalId" id="evalId"/>
<c:forEach....
...
<html:select name="evalId" indexed="true">
...



Thanks for your reply Marc. One problem: html:select property is required attribute. so what do I put there then?

Update:
When I use nested tag for selectbox, it's getting rendered as <select name="evalId"> where evalId gets filled with all the values gathered from all the selectboxes that are generated. So this way I can go further.
And the problem I had with indexed formbean appears to be the normal outcome when using indexed selectbox. The question remains on getting the data if it's supposed to be that way (since evalId returns null).
[ September 29, 2005: Message edited by: Ergin Er ]
 
I got this tall by not having enough crisco in my diet as a kid. This ad looks like it had plenty of shortening:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic