• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

The dot operator doubt?

 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

On page 368 of HFSJ, it says that "When the variable is on the left side of the dot, it's either a Map (something with keys) or a bean (something with properties). This is true regardless of wether the variable is an implicit object or an attribute."

So can I imagine this situation like this?? Map == Implicit Object and attribute == bean?? Help me guys!
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stella, so according to your first line all implicit objects are Maps and anything to the left of the dot operator is a Map.
 
Stella Kim
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry, i mistyped by deleting my reply post..

quote:
-------------------------------------------------------------------------
Stella, so according to your first line all implicit objects are Maps and anything to the left of the dot operator is a Map.
---------------------------------------------------------------------
Except 'pageContext', all EL implicit objects are Map, so you can use it to the left of the dot operator.
You can also use Bean to the left of the dot operator, like I wrote in the deleted reply post.

example)

setAttribute("bean", theBeanObject) --> ${bean.beanProperty}
setAttribute("map", theMapObject) --> ${map.theKey}

Also with EL implicit object;
${param.name}
[ January 23, 2007: Message edited by: Stella Kim ]
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks stella!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic