This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EL evaluation  RSS feed

 
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 ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!