<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to get current node object from node id in javascript in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-current-node-object-from-node-id-in-javascript/m-p/45379#M25238</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can use the return-page parameter tospecify which page to return to after executing the script.&amp;nbsp;&amp;nbsp;&amp;nbsp; eg:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://localhost:8080/alfresco/" rel="nofollow noopener noreferrer"&gt;http://localhost:8080/alfresco/&lt;/A&gt;&lt;SPAN&gt;&amp;lt;normal script url stuff&amp;gt;?paramA=lalalalalala&amp;amp;paramB=qwerty&amp;amp;return-page=/alfresco/faces/jsp/browse/browse.jsp&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Nov 2006 11:21:35 GMT</pubDate>
    <dc:creator>ajshaw</dc:creator>
    <dc:date>2006-11-08T11:21:35Z</dc:date>
    <item>
      <title>How to get current node object from node id in javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-current-node-object-from-node-id-in-javascript/m-p/45374#M25233</link>
      <description>Hi all,I was trying to implement action on forum. For that I have configured "web-client-config-forum-actions.xml" and written following code&amp;lt;action id="create_summary"&amp;gt;&amp;nbsp; &amp;lt;label&amp;gt;Create Summary&amp;lt;/label&amp;gt; &amp;nbsp; &amp;lt;image&amp;gt;/images/icons/recover.gif&amp;lt;/image&amp;gt;&amp;nbsp; &amp;lt;script&amp;gt;/Company Ho</description>
      <pubDate>Mon, 06 Nov 2006 11:26:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-current-node-object-from-node-id-in-javascript/m-p/45374#M25233</guid>
      <dc:creator>miteshpanchal</dc:creator>
      <dc:date>2006-11-06T11:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to get current node object from node id in javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-current-node-object-from-node-id-in-javascript/m-p/45375#M25234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all I have used following code to get current node &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Following code I am using for forums actions. In the following code &lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;args["id"] is actionContext.id.&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt; On which i have executed a javascript as an action which is configured in web-client-config-forum-actions.xml.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;var curForum;&lt;BR /&gt;forums = companyhome.childByNamePath("Forums");&lt;BR /&gt;logger.log(forums.name);&lt;BR /&gt;forumsChildren =forums.children;&lt;BR /&gt;&lt;BR /&gt;for(i=0;i&amp;lt;forumsChildren .length;i++)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; child =forumsChildren[i];&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(child.id.equals(args["id"]))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; curForum = child;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; logger.log("Current Forum Name : " + curForum .name);&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;}&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So by using above code &lt;/SPAN&gt;&lt;STRONG&gt;curForum &lt;/STRONG&gt;&lt;SPAN&gt;is my node on which i have clicked and executed a javascript action.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there any alternate way .????????&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have one more dought&amp;nbsp; regarding &lt;/SPAN&gt;&lt;STRONG&gt;Forums&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;—&amp;gt; I can get Forums' children by using children property. I can get topics of the Forum by using children property of the Forum. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; But I am not able to get posts of the topic by using children property of topic. &lt;/SPAN&gt;&lt;STRONG&gt;So which property can give me all the posts of topics &lt;/STRONG&gt;&lt;SPAN&gt;??????&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Waiting for the reply….&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Nov 2006 05:39:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-current-node-object-from-node-id-in-javascript/m-p/45375#M25234</guid>
      <dc:creator>miteshpanchal</dc:creator>
      <dc:date>2006-11-07T05:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to get current node object from node id in javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-current-node-object-from-node-id-in-javascript/m-p/45376#M25235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I have used parametes like &lt;BR /&gt;1. SpaceDetailsBean.space - to get current forum as space -&amp;nbsp; Got Exceptions&lt;BR /&gt;2. ForumBean.forum - to get all children of the forum - Throws Exception in ArrayList&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;The script URLs only support simple string arguments at present (as they have to be appended to the URL that calls the script). So actionContext.id will work as you have found, but trying to pass objects like SpaceDetailsBean.space won't - however you can pass the ID for the space e.g. SpaceDetailsBean.space.id should work ok. Of course SpaceDetailsBean.space.id is only valid when in the context of the Space Details dialog page. Generally the "current" space can be found using:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NavigationBean.currentNodeId&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Which you can pass to your script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kevin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Nov 2006 10:25:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-current-node-object-from-node-id-in-javascript/m-p/45376#M25235</guid>
      <dc:creator>kevinr</dc:creator>
      <dc:date>2006-11-07T10:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to get current node object from node id in javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-current-node-object-from-node-id-in-javascript/m-p/45377#M25236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are you sure you can't get the topics from the forum? As looking at the code they are just child nodes like any other (they use the same association name so node.children should work). Remember that topics themselves a sub-type of folder which then have child nodes which represent the posts…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kevin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Nov 2006 10:27:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-current-node-object-from-node-id-in-javascript/m-p/45377#M25236</guid>
      <dc:creator>kevinr</dc:creator>
      <dc:date>2006-11-07T10:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to get current node object from node id in javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-current-node-object-from-node-id-in-javascript/m-p/45378#M25237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes as&amp;nbsp; children of topic I am able to get all posts. and now it works fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But after executing the same script I want that it will show me the current jsp page but it doesnt?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So pls tell me which parameter in javascript i have to set so it shows me the same page ???&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Nov 2006 11:16:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-current-node-object-from-node-id-in-javascript/m-p/45378#M25237</guid>
      <dc:creator>miteshpanchal</dc:creator>
      <dc:date>2006-11-07T11:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to get current node object from node id in javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-current-node-object-from-node-id-in-javascript/m-p/45379#M25238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can use the return-page parameter tospecify which page to return to after executing the script.&amp;nbsp;&amp;nbsp;&amp;nbsp; eg:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://localhost:8080/alfresco/" rel="nofollow noopener noreferrer"&gt;http://localhost:8080/alfresco/&lt;/A&gt;&lt;SPAN&gt;&amp;lt;normal script url stuff&amp;gt;?paramA=lalalalalala&amp;amp;paramB=qwerty&amp;amp;return-page=/alfresco/faces/jsp/browse/browse.jsp&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Nov 2006 11:21:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-current-node-object-from-node-id-in-javascript/m-p/45379#M25238</guid>
      <dc:creator>ajshaw</dc:creator>
      <dc:date>2006-11-08T11:21:35Z</dc:date>
    </item>
  </channel>
</rss>

