We have nodetypes inside document, now while updating i need to get those handy

Hi Guys,

We have nodetypes inside document, now while updating i need to get those handy…
could you please help me out, i tired with getNodes(). But it doesn’t help

Please find the screen shot for the same.

thanks & regards

thanks & regards

That information is part of the type configuration and not part of any instance. This configuration can be found in the editor:templates.


What is it you are trying to achieve?

Hello Jasper.Floor,

thanks for your time and reply.

we have document (called A as example) which is having attribute Product, like above.
which can take input as another document (called B as example).

if add the document B in document A, then A document id should get updated in B.

thanks & regards

So you don’t need to know the nodetypes allowed on the type definition but the actual value of an instance. That should be possible.

Document A should have a subnode Product which has a property hippo:docbase. That is the property you are looking for. If you are working from a bean you should have a getter for the subnode, getProduct, or in your case more likely getproducts as it is a multiple (so you will get a List). From that bean you can get the property with bean.getSingleProperty(“hippo:docbase”).

In terms of nodes it will be similar. You’d do something like


though again, you have a multiple, so you would use getNodes(“myproject:Product”), which returns an iterator.