<?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: Custom default dashboard (preset) depending on group in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/custom-default-dashboard-preset-depending-on-group/m-p/283129#M236259</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;As per my knowledge, you will have to define your custom presets. Like in your&amp;nbsp; case, one custom preset for each group. Because dashboard layout depends on the presets only.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In order to make it working, you can check the Groups of logged in user with the groups you desire the user to be. Based on that, you can pass the preset id to be picked.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Jan 2014 13:12:47 GMT</pubDate>
    <dc:creator>anshu_kumar</dc:creator>
    <dc:date>2014-01-02T13:12:47Z</dc:date>
    <item>
      <title>Custom default dashboard (preset) depending on group</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-default-dashboard-preset-depending-on-group/m-p/283127#M236257</link>
      <description>Hello Alfresco Team and All,currently I have the following problem: Afaik preset.xml is used to generate the default dashboard for new users. I know how I can extend description file with my own presets and change the dashboard for all existing users or all new users. I would like now to change the</description>
      <pubDate>Wed, 18 Dec 2013 15:27:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-default-dashboard-preset-depending-on-group/m-p/283127#M236257</guid>
      <dc:creator>tetsubo</dc:creator>
      <dc:date>2013-12-18T15:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: Custom default dashboard (preset) depending on group</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-default-dashboard-preset-depending-on-group/m-p/283128#M236258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Nobody has an idea?..&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Dec 2013 14:01:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-default-dashboard-preset-depending-on-group/m-p/283128#M236258</guid>
      <dc:creator>tetsubo</dc:creator>
      <dc:date>2013-12-20T14:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: Custom default dashboard (preset) depending on group</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-default-dashboard-preset-depending-on-group/m-p/283129#M236259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;As per my knowledge, you will have to define your custom presets. Like in your&amp;nbsp; case, one custom preset for each group. Because dashboard layout depends on the presets only.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In order to make it working, you can check the Groups of logged in user with the groups you desire the user to be. Based on that, you can pass the preset id to be picked.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jan 2014 13:12:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-default-dashboard-preset-depending-on-group/m-p/283129#M236259</guid>
      <dc:creator>anshu_kumar</dc:creator>
      <dc:date>2014-01-02T13:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: Custom default dashboard (preset) depending on group</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-default-dashboard-preset-depending-on-group/m-p/283130#M236260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;There are a few ways to do this, but it depends on which approach you take - at what moment are you aware of which dashboard you need? When user is created? Sometime after?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Depending on that, you can select the preset which you'd like to use when creating the new user.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another option would be to programatically access alfresco store where Share keeps all the configurations (in the manner of XML files), where you can shuffle stuff around, add new components or change existing etc. This one is a bit of work though.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You'd also have to use the later approach when you want to change the dashboard for existing users.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jan 2014 14:36:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-default-dashboard-preset-depending-on-group/m-p/283130#M236260</guid>
      <dc:creator>zladuric</dc:creator>
      <dc:date>2014-01-02T14:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Custom default dashboard (preset) depending on group</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-default-dashboard-preset-depending-on-group/m-p/283131#M236261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for the replies. I wanted to try to change the default user dashboard on or immediately after creation on a new user. Currently, I think the best approach would be using the customise-dashboard web script. &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jan 2014 18:16:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-default-dashboard-preset-depending-on-group/m-p/283131#M236261</guid>
      <dc:creator>tetsubo</dc:creator>
      <dc:date>2014-01-02T18:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: Custom default dashboard (preset) depending on group</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-default-dashboard-preset-depending-on-group/m-p/283132#M236262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The presets.xml file is only used to generate and persist a users dashboard the first time that they log into Share. Once the dashboard is created it is accessed from a hidden location in the Repository - these files are then updated as the user customizes their dashboard. If you want to dynamically control the behaviour of a user dashboard based on group membership then I'd suggest that you set up some extension modules that are evaluated according to group membership and you can then dynamically alter the users dashboard. However, it is worth bearing in mind that the dashboards are configured using a grid-style named regions and that you may want to add custom regions into the template to avoid overriding user changes (…because it could be potentially confusing for a user to not see their dashboard customization reflected in on their dashboard).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jan 2014 09:16:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-default-dashboard-preset-depending-on-group/m-p/283132#M236262</guid>
      <dc:creator>ddraper</dc:creator>
      <dc:date>2014-01-03T09:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: Custom default dashboard (preset) depending on group</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-default-dashboard-preset-depending-on-group/m-p/283133#M236263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the reply, Dave! It is what I really want to do, as you describe: "set up some extension modules that are evaluated according to group membership". Now, I have a custom dashlet which is used to create new user. Immediately after that I want to use "customise-dashboard" with POST to change the default dashboard of that new user. The only problem is, that there is no such dashboard for that user in the AVM store and customise-dashboard throws error 500. So my question is: HOW to create an initial (even "dummy") dashboard for the user, so I can use customise-dashboard after that? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;P.S. I know, that the initialisation is done through site-index.jsp when the user logs in for first time, but I need javascript code to talk to the PresetsManager in my case.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PLEASE, HELP!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jan 2014 15:26:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-default-dashboard-preset-depending-on-group/m-p/283133#M236263</guid>
      <dc:creator>tetsubo</dc:creator>
      <dc:date>2014-01-13T15:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: Custom default dashboard (preset) depending on group</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-default-dashboard-preset-depending-on-group/m-p/283134#M236264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Noone knows?..&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jan 2014 15:30:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-default-dashboard-preset-depending-on-group/m-p/283134#M236264</guid>
      <dc:creator>tetsubo</dc:creator>
      <dc:date>2014-01-15T15:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: Custom default dashboard (preset) depending on group</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-default-dashboard-preset-depending-on-group/m-p/283135#M236265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;And why is it important that you set up this before the user has logged in for the first time? You'd get the same result if you just choose a preset for this user on creation and if you used a preset then created the dashboard based on this preset. In both cases the user would log in first time to his dashboard with the preset you chose.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Based on your comments:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- you have a dashlet for creating users&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- when you're creating them, you also assign them to a group&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- based on the group, you want that custom dashboard.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That can be done:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- look at the presets.xml file and search "user-dashboard" preset. Copy-paste that one (and rename each node) as many times as you have groups. In each group, add-remove components (future dashlets) for this preset.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- your user creation script does not create this user immediately, just keeps the data&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- then you select the user group&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- now you can select a preset for that user and create the user with a custom preset.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Jan 2014 17:08:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-default-dashboard-preset-depending-on-group/m-p/283135#M236265</guid>
      <dc:creator>zladuric</dc:creator>
      <dc:date>2014-01-18T17:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: Custom default dashboard (preset) depending on group</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-default-dashboard-preset-depending-on-group/m-p/283136#M236266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;@Zlatko: that was my initial plan. The problem is in "- now you can select a preset for that user and create the user with a custom preset." How can I do this, when there is NO dashboard created for that user at that point?! I get error, when I try that. The presets.xml is called from site-index.jsp on first login of user, when there is no dashboard for that user. You see, the crushing point (and the answer to your question) is that when the user logs in for first time, that is the time where the dashboard is being initialised. AFTER THAT I can use customise-dashboard and use custom preset (e.g. from presets.xml). And that is too late, because the user has to see the customised dashboard when he logs in for first time (and later), based on group.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How to set the dashboard before the new user logs in (for first time)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Or if not possible - how can I ask the group of the logging in user in site-index.jsp?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jan 2014 10:54:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-default-dashboard-preset-depending-on-group/m-p/283136#M236266</guid>
      <dc:creator>tetsubo</dc:creator>
      <dc:date>2014-01-20T10:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: Custom default dashboard (preset) depending on group</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-default-dashboard-preset-depending-on-group/m-p/283137#M236267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've just remembered how I have solved this. But that comes later, first, another approach. I'm now looking at site-index.jsp, there's this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;// no user dashboard page found! create initial dashboard for this user…&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Map&amp;lt;String, String&amp;gt; tokens = new HashMap&amp;lt;String, String&amp;gt;();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tokens.put("userid", userid);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FrameworkUtil.getServiceRegistry().getPresetsManager().constructPreset("user-dashboard", tokens);&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, one way to create this dashboard would be to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- extend the SlingshotUserFactory to add this group on the session object. Now you can get it just like the userid:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;String userid = (String)session.getAttribute(SlingshotUserFactory.SESSION_ATTRIBUTE_KEY_USER_ID);&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;So now you can use some logic in tthe &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;constructPreset()&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt; method call to adjust to this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But the other way I have been doing this, it was a long time ago (share 3.0 or something), was dealt within Share controllers. I had to create custom (additional) site dashboards dynamically. It was done with siteData.newPage(), siteData.createComponents() and similar. I don't have the code, it was an old project, and the code is not mine, but I remember that there was a method that created new alfresco pages, page components. And I think this is what Alfresco does anyway - just automatizes the process.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Check the siteData object here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://docs.alfresco.com/4.2/index.jsp?topic=%2Fcom.alfresco.enterprise.doc%2Freferences%2FAPISurf-rootscoped.html" rel="nofollow noopener noreferrer"&gt;http://docs.alfresco.com/4.2/index.jsp?topic=%2Fcom.alfresco.enterprise.doc%2Freferences%2FAPISurf-rootscoped.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jan 2014 22:24:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-default-dashboard-preset-depending-on-group/m-p/283137#M236267</guid>
      <dc:creator>zladuric</dc:creator>
      <dc:date>2014-01-23T22:24:07Z</dc:date>
    </item>
    <item>
      <title>Re: Custom default dashboard (preset) depending on group</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-default-dashboard-preset-depending-on-group/m-p/283138#M236268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, Zlatko, I will try that out! Extending SlingshotUserFactory is something I have never done, don't know how to do that right, so I am gonna try the "trick" with sitedata and init the dashboard for the new user right after he is created. I need further details how and where to store the dashboard, any idea? At least I got new spot to work on!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jan 2014 14:06:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-default-dashboard-preset-depending-on-group/m-p/283138#M236268</guid>
      <dc:creator>tetsubo</dc:creator>
      <dc:date>2014-01-24T14:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: Custom default dashboard (preset) depending on group</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-default-dashboard-preset-depending-on-group/m-p/283139#M236269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, this didn't really helped. Now I would like to create the USER dashboard from a dashlet (that I use to create the user). Afaik there are two parts of that procedure - backend and web tier. In share I would do this with with sitedata.newPreset(…). But what about the back-end? How to do that? Plase, help!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2014 13:42:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-default-dashboard-preset-depending-on-group/m-p/283139#M236269</guid>
      <dc:creator>tetsubo</dc:creator>
      <dc:date>2014-01-29T13:42:40Z</dc:date>
    </item>
  </channel>
</rss>

