02-07-2013 06:01 AM
Hello,
I currently make a table layout to display some search results.
/>
But in this results, I want to display metadata which can be find in a parent document of the one which is displayed. How, in a widget, I can access to this data?
/>
I saw that it is possible to use a EL expression in a widget layout editor but i didn't find the good one.
/>
I managed to get the parent document Ref with this : #{document.getData().getParentRef().reference()} but I can't go further.
Somebody can help me?
thanks,
02-19-2013 03:03 PM
#{documentManager.getDocument(document.getData().getParentRef()).getPropertyValue("dc:title")}
Note that this won't handle the case where user does not have enough rights to access the parent. And as you're in a result layout, there's a good chance that this is bad for perfs.
An alternative (and more efficient) way of doing this would be to retrieve the property on the parent, and update it on the document, whenever it is created/moved.
02-07-2013 09:26 AM
Ok, I find the good expression :
" #{
(document.getData().getCoreSession().getDocument(document.getData().getParentRef())).getProperty("dc:title").getValue()
} "
But it isn't very friendly. Maybe someone knows something more easy?
02-13-2013 12:50 PM
How did you get it to work? On my side, It shows me a list of dc metadata (ie Nature
02-14-2013 04:07 AM
Use a generic widget set his type to "text", Add a custom property in the widget editor, id
02-19-2013 03:03 PM
#{documentManager.getDocument(document.getData().getParentRef()).getPropertyValue("dc:title")}
Note that this won't handle the case where user does not have enough rights to access the parent. And as you're in a result layout, there's a good chance that this is bad for perfs.
An alternative (and more efficient) way of doing this would be to retrieve the property on the parent, and update it on the document, whenever it is created/moved.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.