On Thu, 5 Sep 2002, Thomas Colin de Verdi�re wrote:

> But you can write a JavaBean Info. You define a property 'size' and
> you call its read method size() which EL will find (am i right or not)

You can do this on your own custom objects.  When encountering a
Collection, however, the JSTL EL (and the preliminary JSP 2.0 EL) treats
it as a Collection, not a JavaBean.  Thus, the JavaBean properties you add
to the Collection via a BeanInfo class have no effect on the EL.

The ideal thing to do, if you're designing your own data model, is to
provide a wrapper for the Collection that looks something like this:

  public Collection getItems();
  public int getSize();

-- 
Shawn Bayern
"JSTL in Action"   http://www.jstlbook.com


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to