commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitri Plotnikov" <dmi...@apache.org>
Subject Re: [jxpath] conflict with Map and accessors
Date Mon, 19 Jan 2004 22:30:53 GMT
At some point in the past I tried to add support for these hybrids to
JXPath, but it was causing many problems, so I gave up.  And that's where it
stands at this point, unfortunately.  If you have a JavaBean that implements
the Map interface, it is treated as a Map and its bean-style properties are
inaccessible via JXPath.  The only solution I can propose is to modify the
get(String) method of the bean so it returns values of its bean-style
properties.

- Dmitri

----- Original Message ----- 
From: "Yann Duponchel" <ydu@zurich.ibm.com>
To: <commons-user@jakarta.apache.org>
Sent: Wednesday, November 26, 2003 12:39 PM
Subject: [jxpath] conflict with Map and accessors


> Hi,
>
> Assume I have a class Tree which looks like that:
>
> public class Test implements Map {
>    [...]
>    public Object getFoo();
> }
>
> I would expect that xpath such as "foo" would try to evaluate getFoo()
> instead of trying get("foo") which might not exist. Because, the problem
> is that I can't figure out how to retrieve nodes which are children of
> getFoo().
>
> Is this the desired behavior?
> Is there a workaround to force the evaluation of getFoo() instead of
> get("foo")?
>
> Thanks,
>
> Yann.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>
>



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


Mime
View raw message