aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Using EL with [] and . operator Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply locked New topic
Author

Using EL with [] and . operator

Mohit G Gupta
Ranch Hand

Joined: May 18, 2010
Posts: 634

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"]}


OCPJP 6.0 93%
OCPJWCD 5.0 98%
Frits Walraven
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1672
    
  25

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 agree. Here's the link: http://aspose.com/file-tools
 
subject: Using EL with [] and . operator