If a property in a bean I'm trying to manipulate with jxpath is a List, how do 
I set a value in an entry of that list?

I read the info at "Modifying Object Graphs", but it's still not clear from 
this how I would do this.

I've figured out how to get the list created, either with an explicit 
"setValue()", or with a "createPathAndSetValue()" along with a factory and 
createObject() method set to look for that property, but if I try to set a 
value into the list, it fails apparently because the list is still zero size.

The only way I can hack this to work is to initialize the list property to an 
ArrayList with the required number of dummy elements already added to it, so 
the subscript reference works.

I'm using JXPath so that I can write tests with a little less boilerplate and 
focus on pure business logic.  Ideally, I'd like JXPath (or perhaps a factory) 
to do the "obvious stuff".


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

Reply via email to