• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EL Map Doubt

 
Sandeep Vaid
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assume musicMap is a map and Genre is an attribtue
${musicMap[Genre]} ----- Evaluates To ---> ${musicMap["Ambient"]}

Then
${musicMap[1]} --> If i have set "1" as an attribtue. Why it doesn't gets evalutes to it's value ?

Is it because [1] is only applicable in case of collection (arraytc) and not for bean and map?
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See me answer here
 
Sandeep Vaid
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your Solution ;

try ${requestScope["1"]}

Works BUT what is the wrong when i say ${1}. Why it doesn't treat as an attribute in say request scope as it does for ${abc}

Refer to p-367 and 368
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please continue the discussion there. You are spreading the same question among different threads which make it difficult to follow.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic