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
Saloon Keeper
Posts: 3097
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
 
I'm so happy! And I wish to make this tiny ad happy too:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!