Jeffrey Porter wrote:
It would be nice to add in more control, just like in JSP's.
e.g. <%if (myObject.getName().equalsIgnoreCase("BOB")) {/**something**/}
Having code in your presentation page is a *very bad idea* for large
projects with long lifetimes. That's why JSP is such garbage for large
projects, and why something like Facelets is so much better; JSP tempts
people to put code like the above in pages instead of putting that code
where it belongs.
For small projects or temporary projects it *can* be convenient to put
logic in the page - but IMHO those sorts of projects are probably better
off being built in PHP or Ruby-on-rails than a heavyweight setup such as
java/jsf/ejb.
Re the original issue of bean properties with unusual names (isXYZ): the
java spec is very clear about what is a bean property and what its
accessor methods should be called: if the property is XYZ then the
accessors are "getXYZ(), setXYZ(val)". But EL uses *property names* not
method names. There is a way to customise this though; write a BeanInfo
class:
http://java.sun.com/j2se/1.4.2/docs/api/java/beans/BeanInfo.html
You can then call your properties whatever you want, and specify what
methods are the accessors for that property. But in the EL, you still
use the *property name* not the accessor method.
Regards,
Simon