Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Expression Language, Autoboxing and Boolean getter name

843838Aug 15 2006 — edited Aug 15 2006
Hi,

We're using expression language to access properties of our beans like so: -

${activity.enabled}

However we've hit a problem with the autoboxing support. The bean 'activity' is defined like: -
public interface Activity {
    public Boolean isEnabled();
}
However because the type is not the primitive 'boolean', the EL parser tries to find a method called getEnabled (not isEnabled). The interpreter then throws an error (it can't find the 'enabled' property).
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 12 2006
Added on Aug 15 2006
1 comment
251 views