7.1.5.1 Example

To change the price of a rhombus to 200 we might do the following:

String path = "products/rhombus/jcr:content/myapp:price";

root.getProperty(path).setValue(200);


or, alternatively

String path = "products/rhombus/jcr:content";

Node rhombus = root.getNode(path);

rhombus.setProperty("myapp:price", 200);