java - Javax JCR Node getProperties and Titles -


i given node , request form node.

node nn = node.getnode("jcr:content"); 

from here can following value of

nn.getproperty("cq:lastmodified") 

what trying properties without asking each 1 name.

node nn = node.getnode("jcr:content"); propertyiterator pi = nn.getproperties(); 

now can iterate on properties , print values so:

while(pi.hasnext()) {    property p = pi.nextproperty();    string val = p.getstring(); } 

but how can find title of property?

i not sure can try getname() method because property interface subinterface of item interface. can try below :

while(pi.hasnext()) {    property p = pi.nextproperty();    string name = p.getname();    string val = p.getstring(); } 

Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -