Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EL Expressions

 
Nikhil Jain
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In HFS Page 366, the following EL Expression
${person.dog.name}

how do we write the above with [] operator
${person[dog["name"]]} ??, I got blank when I used this....
 
Niranjan Deshpande
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
u can write it coz the "." (dot operator) can be equivalently replace by a [] (Array operator).

u can do a bit google using this search string -

"EL equivalence between . and [] operator"
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Try this .

${person["dog"]["name"]}

Thanks
 
Gaurav Gambhir
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try

${person["dog"].name}
${person.dog["name"]}
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic