Poppe, Troy wrote:
I've got a collection of a JavaBeans, it could be a plain-old-Java collection or
a Commons-Collection... Not really a concern...
I'm trying to find a way to provide the ability to write a JEXL-like expression
that would be applied against the collection of JavaBeans, and be able to
retrieve all of the JavaBeans that match that JEXL-like expression.
So far, looking at JEXL, it looks like it requires a JexlContext, but I don't
see
or know how I would adapt my JavaBean properties to this.
Is there an out-of-the-binary way of filtering through my JavaBeans, and giving
me access to those that match some expression?
With commons-collections, the best approach is to write a Predicate
instance (typcially an inner class), and use CollectionUtils.filter or
PredicateCollection to do the filtering. No specific JEXL handling though.
Stephen
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]