Win a copy of Java by Comparison (eBook) this week in the Java in General forum!
    Bookmark Topic Watch Topic
  • New Topic

Using EL with [] and . operator  RSS feed

 
Ranch Hand
Posts: 634
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
MyBean is a java bean with property param that is of type Map.
a is on of the element of this property.

then,


Is ${mybean.["param"].a} correct ?

where mybean is attribute of type of MyBean.

i think it incorrect and the correct El should be ${mybean.param.["a"]}

 
Creator of Enthuware JWS+ V6
Bartender
Posts: 3086
255
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Report post to moderator

i think it incorrect and the correct El should be ${mybean.param.["a"]}


No, both are ok, but be carefull with the "." it should be like this:


Regards,
Frits
 
It means our mission is in jeapordy! Quick, read this tiny ad!
Thread Boost - a very different sort of advertising
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!