• 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

Multiple Instances of a field in a single FORM

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a FORM which can have multiple instances of a single field. Each of those fields can have a different value.Now when I submit the form, I will get those attribute values as an array.For eg if I have a field say Owner which is present multiple times on my Form, when I submit FORM then I will get an array of OWNER attribute values in my Java file.

My question is: Is it guaranteed that the array of OWNER attribute values will contain values in the same index order as is the order of the OWNER attribute on the form. I have been told that this is not a guarantee. Has anybody experienced such a thing before.

Any help would be greatly appreciated.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Puneet,
That is correct. The order is not guaranteed. What are you trying to do that would rely on the order?
 
Puneet Agarwal
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jeanne,

Thanks for the answer.Is this a recent development.Can you point me to some documentation on this stuff. I need to retrieve the fields exactly in the order in which they were entered in the FORM.
 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Puneet,

Is this a recent development.


No. It's been like that for a few years if not since the beginning.

Can you point me to some documentation on this stuff.


I don't remember where I read this.

I need to retrieve the fields exactly in the order in which they were entered in the FORM.


You can use different field names to accomplish this. For example field1, field2, field3, ... Then in your java code you can loop through them until you run out.
 
reply
    Bookmark Topic Watch Topic
  • New Topic