• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EL :: calling functions on attributes

 
Shiraz Khan
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HFSJ 2nd edition mock exam Page 848 question number 41

<c:if test="${account.personalChecking}">Checking that fits your lifestyle</c:if>

As far as I understand the above EL will call getPersonalChecking() function rather than isPersonalChecking()
And I think there is no way to access any functions other than getters on attributes/Properties, when we use EL ??
 
Remko Strating
Ranch Hand
Posts: 893
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's an interesting question. I would say it also will work when having isPersonalChecking() when it will return a boolean.

The interesting part is what will be the case when you have getPersonelChecking() and isPersonalChecking() defined. This could raise a conflict.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is personalChecking ? If it's a boolean (as it is used in the if tag, I suppose it is), in order to be JavaBeans friendly, isPersonalChecking() should exist.
 
dhwani mathur
Ranch Hand
Posts: 621
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!!

i dont have much idea onto it but what
i think is isPersonalChecking() must exist which returns boolean and
on the other side i would say if we consider getPersonalChecking()
then it must have a boolean return type so as to satisfy
the if condition.

SCJP(1.5),SCWCD(On the Way...)
Dhwani:>Winning is not important but it is the only thing.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic