<?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: accessing content model in javascript. in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/accessing-content-model-in-javascript/m-p/195311#M148441</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think i understand the source of confusion here.&amp;nbsp; There are two types of JavaScipt that are possible - serverside javascript and client side.&amp;nbsp; I thought you were talking about server side, where the person object should be available, and it seems like you are talking about client side.&amp;nbsp; In that case, the person object is not available unless you make it available.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In 3.0, there is a REST API which you could call from your client-side javascript in order to get the data you need (many of these web scripts return JSON, so it should be quite easy).&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://wiki.alfresco.com/wiki/Repository_RESTful_API_Reference" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/Repository_RESTful_API_Reference&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://wiki.alfresco.com/wiki/3.0_REST_API" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/3.0_REST_API&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Pre 3.0, there is no standard API available, but you could write one yourself to expose the person object through web scripts (possibly even backport some of the webscripts from 3.0).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Dec 2008 05:21:05 GMT</pubDate>
    <dc:creator>jbarmash</dc:creator>
    <dc:date>2008-12-30T05:21:05Z</dc:date>
    <item>
      <title>accessing content model in javascript.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/accessing-content-model-in-javascript/m-p/195308#M148438</link>
      <description>Hi,Hi im new to alfresco. how can we access the Node refference by using java script.i download source file from Alfresco SVN. i modified something. i that i need access the costom content model&amp;nbsp; by using the java script. i read that alfresco API available. but i dont know.. how to use that directly</description>
      <pubDate>Mon, 22 Dec 2008 14:09:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/accessing-content-model-in-javascript/m-p/195308#M148438</guid>
      <dc:creator>lmanoh</dc:creator>
      <dc:date>2008-12-22T14:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: accessing content model in javascript.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/accessing-content-model-in-javascript/m-p/195309#M148439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The content model you define should automatically be available to the JavaScript.&amp;nbsp; For the example you mention, it should probably be something closer to: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var name=person.properties["userName"];&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Take a look at a few script examples in Data Dictionary for inspiration.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are also some good examples in JavaScript Cookbook:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://wiki.alfresco.com/wiki/JavaScript_API_Cookbook" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/JavaScript_API_Cookbook&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Dec 2008 18:47:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/accessing-content-model-in-javascript/m-p/195309#M148439</guid>
      <dc:creator>jbarmash</dc:creator>
      <dc:date>2008-12-29T18:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: accessing content model in javascript.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/accessing-content-model-in-javascript/m-p/195310#M148440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thanks&amp;nbsp; jbarmash,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is person object is not regaganised. it shows&amp;nbsp; like unidentified object person, can 't be resolved.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;shall i need to include any packages to execute this special&amp;nbsp; Javascript API ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i have been called method in onclick function in document-details.jsp. its been called, but not execute the javascript stattement like&amp;nbsp; &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;var name=person.properties["userName"];&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;it would be a greate help.! thanks in advance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-Lenin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Dec 2008 05:11:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/accessing-content-model-in-javascript/m-p/195310#M148440</guid>
      <dc:creator>lmanoh</dc:creator>
      <dc:date>2008-12-30T05:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: accessing content model in javascript.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/accessing-content-model-in-javascript/m-p/195311#M148441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think i understand the source of confusion here.&amp;nbsp; There are two types of JavaScipt that are possible - serverside javascript and client side.&amp;nbsp; I thought you were talking about server side, where the person object should be available, and it seems like you are talking about client side.&amp;nbsp; In that case, the person object is not available unless you make it available.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In 3.0, there is a REST API which you could call from your client-side javascript in order to get the data you need (many of these web scripts return JSON, so it should be quite easy).&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://wiki.alfresco.com/wiki/Repository_RESTful_API_Reference" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/Repository_RESTful_API_Reference&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://wiki.alfresco.com/wiki/3.0_REST_API" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/3.0_REST_API&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Pre 3.0, there is no standard API available, but you could write one yourself to expose the person object through web scripts (possibly even backport some of the webscripts from 3.0).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Dec 2008 05:21:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/accessing-content-model-in-javascript/m-p/195311#M148441</guid>
      <dc:creator>jbarmash</dc:creator>
      <dc:date>2008-12-30T05:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: accessing content model in javascript.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/accessing-content-model-in-javascript/m-p/195312#M148442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The content model you define should automatically be available to the JavaScript.&amp;nbsp; For the example you mention, it should probably be something closer to: &lt;BR /&gt;&lt;BR /&gt;var name=person.properties["userName"];&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;What is the easiest way to get more informations about the available properties of a certain content model, e.g. "person"? Or to be more precise: how do I know, which&amp;nbsp; properties a certain content model has?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Markus&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Apr 2011 13:51:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/accessing-content-model-in-javascript/m-p/195312#M148442</guid>
      <dc:creator>mpeters</dc:creator>
      <dc:date>2011-04-08T13:51:57Z</dc:date>
    </item>
    <item>
      <title>Re: accessing content model in javascript.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/accessing-content-model-in-javascript/m-p/195313#M148443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Now I think that the Javascript API of Alfresco doesn't expose any methods for that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For the Javascript API you can expose the DictionaryService of Alfresco extending the Mozilla Rhino engine:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://wiki.alfresco.com/wiki/3.4_JavaScript_API#Adding_Custom_Script_APIs" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/3.4_JavaScript_API#Adding_Custom_Script_APIs&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In this way you have to extend the Alfresco Javascript API with a new Javascript object available in the scope of the script that is the following service:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://dev.alfresco.com/resource/docs/java/repository/org/alfresco/service/cmr/dictionary/DictionaryService.html" rel="nofollow noopener noreferrer"&gt;http://dev.alfresco.com/resource/docs/java/repository/org/alfresco/service/cmr/dictionary/DictionaryService.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As you can see the DictionaryService allows you to get all the information that you need&amp;nbsp; :wink: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Apr 2011 13:58:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/accessing-content-model-in-javascript/m-p/195313#M148443</guid>
      <dc:creator>openpj</dc:creator>
      <dc:date>2011-04-08T13:58:45Z</dc:date>
    </item>
  </channel>
</rss>

