• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt in EL Implicit Objects

 
sakthikumaran navakumar
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • 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?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • 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]}
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • 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.
 
Michael Ku
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The order should be preserved in the posting of the name/value pairs
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic