cancel
Showing results for 
Search instead for 
Did you mean: 

LazyDashborardFilter.java

faisal
Champ in-the-making
Champ in-the-making
Hello

I am trying to modify the LazyDashboardFilter.java. So that it checks which group the user belongs to and creates different set dashboards for different set of user.

To see if that will work or not i did the following tests.

if (userid != null && userid.equals(URLDecoder.decode(matcher.group(1))))
            {
                if (serviceRegistry.getModelObjectService().getPage("user/" + userid + "/dashboard") == null)
                {
                    // no site found! create initial dashboard for this user…
                    Map<String, String> tokens = new HashMap<String, String>();
                    tokens.put("userid", userid);
                    serviceRegistry.getPresetsManager().constructPreset("user-dashboard", tokens);
                }
            }


To

if (userid != null && userid.equals(URLDecoder.decode(matcher.group(1))))
            {
                if (serviceRegistry.getModelObjectService().getPage("user/" + userid + "/dashboard") == null)
                {
                    // no site found! create initial dashboard for this user…
                    Map<String, String> tokens = new HashMap<String, String>();
                    tokens.put("userid", userid);
                    serviceRegistry.getPresetsManager().constructPreset("user-dashboard-2", tokens);
                }
            }

And then i added a preset with preset ID user-dashboard-2 in presets.xml. It did not work it still used the old user-dashboard preset.

I am a little confused about what is going on in here. I thought when a user is created in alfresco its dashboard is set to null. When the user first logs in to share the LazyDashboardFilter constructs the dashboard. The test result proves me wrong though.

Can any body tell me any other way of doing this.

Thanks in advance

Faisal
1 REPLY 1

dward
Champ on-the-rise
Champ on-the-rise
LazyDashboardFilter is just something I cooked up to solve the problem of getting share user pages to display inside portlets. It's not used when accessing share in full screen mode as far as I know.

Do not rely on LazyDashboardFilter continuing to exist. It is likely to get refactored into something else in a future release.

If you want to customize the landing page behaviour, have a look at site-index.jsp.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.