cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Document Library Action and to get current node the user is in

sihnu
Champ in-the-making
Champ in-the-making
Hi,

I'm working on a custom document library action. The action itself should be quite simple at least as an idea. The purpose is to copy some nodes behind absolute path to the current space the user is in. I've created a webscript that handles the copying of nodes and I've managed to call the webscript when the button is clicked. However, I've problems with finding the node the current user is in. There are two possibilities. To get the node from webscript. But is this even possible? Does webscript have any relations to the user or rather the current space the user is in? Other choice would be to pass the space reference as a parameter and use Lucene to search for the space. But how could I find the space reference? I've searched it from Alfresco object but it seems like it is not holding information about current space.

Any thoughts would be appreciated.

Oops.. this should be under development forum. Sorry.
1 REPLY 1

sihnu
Champ in-the-making
Champ in-the-making
Thanks for the help… once again.

Anyway, I was able to solve the problem on my own but I don't know if this is the proper way. If anyone else happens to be struggling with the same problem here is my solution: I parsed the path parameter from URL. I had to use some dirty regex to accomplish this but at least it works. Sometimes the ugly way is the only way. However if someone is willing to tell me a proper way to get current node I would be grateful (wishful thinking i suppose).