You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2006/05/02 16:28:50 UTC
DO NOT REPLY [Bug 39465] New: - Property "name" of a bean-array can't be reached due to special handling with Maps
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39465>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39465
Summary: Property "name" of a bean-array can't be reached due to
special handling with Maps
Product: Commons
Version: 1.2 Final
Platform: Other
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: JXPath
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: mirko.richter@compago.de
Pointing to the sample at
http://jakarta.apache.org/commons/jxpath/users-guide.html#Map%20Element%20Access:
<code>
public class Employee {
private Map addressMap = new HashMap();
{
addressMap.put("home", new Address(...));
addressMap.put("office", new Address(...));
}
public Map getAddresses(){
return addressMap;
}
...
}
[...]
String homeZipCode = (String)context.
getValue("addresses[@name='home']/zipCode");
</code>
i realised that if "addresses" was an array of beans which contain the property
"name", the getter isn't called properly if evaluating
"addresses[@name='home']/zipCode".
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
DO NOT REPLY [Bug 39465] - [jxpath] Property "name" of a bean-array can't be reached due to special handling with Maps
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39465>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39465
dmitri@plotnix.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WONTFIX
------- Additional Comments From dmitri@plotnix.com 2006-05-05 00:52 -------
This question has been raised before. This is not really a bug, but a documented
feature of JXPath. See
http://jakarta.apache.org/commons/jxpath/users-guide.html#Map%20Element%20Access
The specific paragraph discussing the issue: 'The attribute "name" can be used
not only with Maps, but with JavaBeans as well. The value of this attribute
represents the name of a property.'
Thus, it is a good idea to treat bean properties as entities rather than
attributes: "foo/@name" will not work as expected, but "foo/name" will.
This feature has been out there for years, and I would be hesitant to change its
behavior.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
DO NOT REPLY [Bug 39465] - [jxpath] Property "name" of a bean-array can't be reached due to special handling with Maps
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39465>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39465
gudnabrsam@yahoo.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Property "name" of a bean- |[jxpath] Property "name" of
|array can't be reached due |a bean-array can't be
|to special handling with |reached due to special
|Maps |handling with Maps
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org