Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Query Related to Bean's property

 
Amit Tayal
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have a query related to EL and Bean Properties.

Query is
If I try to access property (using EL) that is not there in bean itself, whether exception will be thrown.

Eg. Bean Person has property name,age and i am trying to access class, so will there be an exception?

I am asking this question as it is mentioned in HFSJ (Page 447) that EL will just return NULL but no exception will be raised.

Thanks in advance
Amit
 
Martyn Clark
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Amit
if you are accessing say ${person.class} on the bean there is no exception and the fully qualified name of the bean is diplayed, but if you try to access something like ${person.address} and that property is not is the bean then you will get an error.
 
Amit Tayal
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Martyn
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic