How to add multivalue property to jcr node through java code?
问题 According this answer https://stackoverflow.com/a/18726682/2674303 I see that I can add property to node in crxde. But I don't understand how can I add multivalue property(array) to node. Please, help. 回答1: You have to create an array of values: ValueFactory valueFactory = session.getValueFactory(); Node node = session.getNode("/content/path/to/my/node"); Value[] values = new Value[3]; values[0] = valueFactory.createValue("First value"); values[1] = valueFactory.createValue("Second value");