cancel
Showing results for 
Search instead for 
Did you mean: 

how to copy search contents to another space

su2007
Champ in-the-making
Champ in-the-making
Hi,

I am trying to copy search contents to 'Guest Home' space. I edited browse.jsp to add a new actionlink. I want to execute a javascript when the link was clicked and javascript should copy all contents to 'Guest Home'. Nothing happens when the link is clicked. The line I added to create a link is shown below.

<nobr><h:commandLink value="Copy Search Contents" style="white-space:nowrap" onkeypress="javascript:copySearchContents();" action="advSearch" id="link22" /></nobr>

I guess, it treats it as client side script. Any suggestion?

Is there any other way to do this?

Help is really appreciated.
2 REPLIES 2

kevinr
Star Contributor
Star Contributor
I assume you mean you want to execute a server-side Alfresco javascript. Here is how we configure in menu items and actions:
http://wiki.alfresco.com/wiki/Externalised_Client_Actions
In specifically this section:
http://wiki.alfresco.com/wiki/Externalised_Client_Actions#Action_Definition_Config_Elements
I mention an attribute 'script' that can be configured to point to a javascript to execute when the action is clicked.

Hope this helps,

Kevin

su2007
Champ in-the-making
Champ in-the-making
Kevin,

Thanks for your reply. I have already got it working by adding an action method in BrowseBean. Still, I started to do the same using javascript after reading your post. Is there a way to pass the search results back to my javascript so that I can copy them where ever I want. I tried using search API. May be I am not doing something right, so far no luck.  Let me know

Thanks,