- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2016 10:51 AM
I want to use one folder in shared repository as target location in association.ftl . Please advice how to make it .
Path as below
Shared/Folder1/Folder2
I had tried by putting the noderef . its working fine. I need to make it with by specifying path. or is there any way to make it dynamically assign the target location?
- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-07-2016 03:52 PM
It sounds like you know how to create an association using a node ref as the target. But what you'd like to do is use the path instead. So all you have to do is get the folder by path, then get that folder's node ref and then you know how to create the association from there.
Probably the easiest way to get something by path is to use search, like this:
SearchService.query(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, SearchService.LANGUAGE_XPATH, "/app:company_home/cm:path/cm:to/cm:Folder1/cm:Folder2")
That returns a result set, then you can get the node from the result set and ask it for its node ref.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-07-2016 03:52 PM
It sounds like you know how to create an association using a node ref as the target. But what you'd like to do is use the path instead. So all you have to do is get the folder by path, then get that folder's node ref and then you know how to create the association from there.
Probably the easiest way to get something by path is to use search, like this:
SearchService.query(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, SearchService.LANGUAGE_XPATH, "/app:company_home/cm:path/cm:to/cm:Folder1/cm:Folder2")
That returns a result set, then you can get the node from the result set and ask it for its node ref.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2016 07:06 AM
Thanks Jeff. Let me try