commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: [JXPath][BeanUtils] External Bean PropertyDescriptor?
Date Tue, 17 Mar 2009 16:11:34 GMT

Possibly you can get some love registering a DynamicPropertyHandler class via JXPathIntrospector.registerDynamicClass(...).

-Matt

--- On Mon, 3/16/09, Andrew Hughes <ahhughes@gmail.com> wrote:

> From: Andrew Hughes <ahhughes@gmail.com>
> Subject: [JXPath][BeanUtils] External Bean PropertyDescriptor?
> To: "Commons Users List" <user@commons.apache.org>
> Date: Monday, March 16, 2009, 9:53 PM
> Hi,
> I am trying to use JXPath on a not-so-bean complient
> "Something.java" class.
> The JXBeanInfo<http://commons.apache.org/jxpath/apidocs/org/apache/commons/jxpath/JXPathBeanInfo.html#getDynamicPropertyHandlerClass()>
> method
> getPropertyDescriptor stipulates that I return a
> PropertyDescriptor<http://java.sun.com/j2se/1.3/docs/api/java/beans/PropertyDescriptor.html>
> in
> order to allow JXPath to get/set the properties within
> "Something.java". The
> problem is that the not-so-bean-complient "Something.java"
> class doesn't
> have get/set equivalent methods. It actually has iterator()
> and from that
> you can then iterate over all "properties" and work with
> them directly.
> 
> Can I somehow inject a method implementation or proxy
> object outside of
> "Something.java" that will provide the required logic/code
> to perform the
> get/set operation on Something.java's properties?
> 
> Any help would be much appreciated :)
> 


      

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message