JavaScriptResolution property exclusion doesn't work correctly with lists of
objects
------------------------------------------------------------------------------------
Key: STS-735
URL: http://www.stripesframework.org/jira/browse/STS-735
Project: Stripes
Issue Type: Bug
Affects Versions: Release 1.5.2
Reporter: Paulo Silva
I'm trying to do (please note this is an example, excuse any compilation typos):
List<MyPoint> pointsList= new ArrayList<MyPoint>();
pointsList.add(new MyPoint(1,2));
pointsList.add(new MyPoint(3,4));
return new JavaScriptResolution(pointsList, "x");
The object MyPoint has 2 fields: x and y.
The exclusion of properties doesn't work correctly in this case. If I try to
use JavascriptResolution in my object, not in the list it works OK.
Looking at the JavascriptBuilder code, the problem seems to be around line 407
in the way that Stripes gets the fullPropertyName. When using a list, the
fullPropertyName is "[0].x", "[1].x", etc, which means I can't use property
exclusion to exclude the X property from all my elements.
When we're dealing with a list I don't think anyone wants to target any
specified element, like "[3].x ", so maybe it would be more useful to just
"cut" the array index information from the fullPropertyName.
If i'm using JavascriptResolution incorrectly please excuse me, but there
aren't any examples provided anywhere...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://www.stripesframework.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development