• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EL evaluation

 
maih fhil
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it true that when an EL expression is used as a value of the attribute in a tag, then it is treated as an Object/primitive but when not inside the tag, it is treated as a String and if it is not a String, it is converted to a String
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it true that when an EL expression is used as a value of the attribute in a tag, then it is treated as an Object/primitive but when not inside the tag, it is treated as a String and if it is not a String, it is converted to a String

Yes. For example, look at c:forEach's items attribute. You can pass a collection, like ${scopeSession.listOfSomething}. However, in template text, it will be coerced to String and displayed in the page.
[ December 19, 2007: Message edited by: Christophe Verre ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic