<?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 How to structure share dashlets that use the repository in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-structure-share-dashlets-that-use-the-repository/m-p/275900#M229030</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm building a dashlet that lets users search for folders. It correctly works, but now my aim is to make it a simple package. To learn how to create dashlets, I initially just created the files in the Alfresco source. I ended up having to create an Alfresco web script and a Share web script, since I wasn't able to access repository functions from within the dashlet. These were the locations of the scripts:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;C:\Alfresco\tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\dashlets&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\templates\webscripts\foldersearch&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Based on the share examples &lt;/SPAN&gt;&lt;A href="http://code.google.com/p/share-extras/" rel="nofollow noopener noreferrer"&gt;I've seen&lt;/A&gt;&lt;SPAN&gt;, I was able to construct and build a jar, which I placed into the WEB-INF/lib directory of the share.jar file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The dashlet came up correctly, and I can place it on my dashboard (once integrated into share.war), but it doesn't work correctly. I get these errors:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;2011-09-26 20:50:59,309&amp;nbsp; ERROR [extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 0826&lt;BR /&gt;0004 Read-Write transaction started within read-only transaction&lt;BR /&gt;org.alfresco.error.AlfrescoRuntimeException: 08260004 Read-Write transaction started within read-only transaction&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:309)&lt;BR /&gt;&lt;BR /&gt;2011-09-26 20:51:06,434&amp;nbsp; ERROR [extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 08260001 Script url /inteldocs/folder-search does not map to a Web Script.&lt;BR /&gt;org.springframework.extensions.webscripts.WebScriptException: 08260001 Script url /inteldocs/folder-search does not map to a Web Script.&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;My guess is because I'm placing the Alfresco web script in the Share war (in the \templates\webscripts\foldersearch path) . The simple solution is to have the build.xml file output two jars (one to integrate into alfresco.war and one to integrate into share.war). However, I don't see any other projects structured like this. Am I missing something (my alfresco webscript makes use of search.luceneSearch), or do people typically not structure the alfresco webscript part of their dashlet with the share part?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, my main question is to make sure I'm developing this correctly. I can create two jars and add them into the different wars, but since I don't see anyone else doing that, I want to make sure I'm not doing something wrong.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- Pat&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Sep 2011 21:22:50 GMT</pubDate>
    <dc:creator>patorjk</dc:creator>
    <dc:date>2011-09-26T21:22:50Z</dc:date>
    <item>
      <title>How to structure share dashlets that use the repository</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-structure-share-dashlets-that-use-the-repository/m-p/275900#M229030</link>
      <description>I'm building a dashlet that lets users search for folders. It correctly works, but now my aim is to make it a simple package. To learn how to create dashlets, I initially just created the files in the Alfresco source. I ended up having to create an Alfresco web script and a Share web script, since I</description>
      <pubDate>Mon, 26 Sep 2011 21:22:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-structure-share-dashlets-that-use-the-repository/m-p/275900#M229030</guid>
      <dc:creator>patorjk</dc:creator>
      <dc:date>2011-09-26T21:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to structure share dashlets that use the repository</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-structure-share-dashlets-that-use-the-repository/m-p/275901#M229031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In case anyone stumbles across this with the same question, what I ended up doing:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;UL&gt;&lt;LI&gt;I created a separate workspace for Alfresco modules (currently using Eclipse) and created a "search" webscript that allows for parameters which restrict searching on just folders.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;In my Dashlet workspace I left the module mostly as is, but removed the Alfresco web script portion.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Each module has its own build.xml which creates its own jar, and then a separate build script merges them into the correct war file (either alfresco.war or share.war).&lt;/LI&gt;&lt;/UL&gt;&lt;SPAN&gt;I like this approach in that the Alfresco part is reusable in other web scripts, though it feels wrong to have a share webscript that requires on the custom Alfresco one already being installed. It works though. However, I did notice this in the share web script example build.xml:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Assemble the configuration and resource files in a JAR file structure. This mechanism &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; was introduced in Alfresco 3.3 and allows Share extensions containing both repository and &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; web-tier web scripts, Spring/Surf configuration and static assets to be added to the servlet &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; container as a single library.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Which seems to indicate that what I previously wanted to do was possible, though I was unable to get it working.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- Pat&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 19:19:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-structure-share-dashlets-that-use-the-repository/m-p/275901#M229031</guid>
      <dc:creator>patorjk</dc:creator>
      <dc:date>2011-09-28T19:19:47Z</dc:date>
    </item>
  </channel>
</rss>

