• 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

Doubt in EL Implicit Objects

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

Name: <input type = "text" name = "name">

FirstFood: <input type = "text" name = "food">
SecondFood:<input type = "text" name = "food">

Can you clarify me whether the EL representation is possible using [] in the above given food case using paramValues.

Please also let me know the equivalent for ${param.name} and ${paramValues.food[0]} using [] representation?
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Can you clarify me whether the EL representation is possible using [] in the above given food case using paramValues.


Yes, it's possible, but I'm not sure that the order will be guaranteed. So paramValues.food[0] does not necesseraly return FirstFood's value. You'll have to check that.

Please also let me know the equivalent for ${param.name} and ${paramValues.food[0]} using [] representation?


${param["name"]} and ${paramValues["food"][0]}
 
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

Yes, it's possible, but I'm not sure that the order will be guaranteed. So paramValues.food[0] does not necesseraly return FirstFood's value. You'll have to check that.


I'm pretty sure you are correct, Christophe.

It's typically a bad idea to have textfields with the same name.
 
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The order should be preserved in the posting of the name/value pairs
reply
    Bookmark Topic Watch Topic
  • New Topic