Configuration added for web-client to setup default dashlets shown in a user Dashboard on first login

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5979 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2007-06-15 15:07:36 +00:00
parent 3131468788
commit 1883c7b020
4 changed files with 63 additions and 11 deletions

View File

@@ -46,6 +46,7 @@ public class DashboardsElementReader implements ConfigElementReader
public static final String ELEMENT_DASHLETS = "dashlets";
public static final String ELEMENT_DASHLET = "dashlet";
public static final String ELEMENT_GUESTCONFIG = "allow-guest-config";
public static final String ELEMENT_DEFAULTDASHLETS = "default-dashlets";
public static final String ATTR_ID = "id";
public static final String ATTR_COLUMNS = "columns";
public static final String ATTR_COLUMNLENGTH = "column-length";
@@ -95,6 +96,17 @@ public class DashboardsElementReader implements ConfigElementReader
}
}
Element defaultDashletsElement = element.element(ELEMENT_DEFAULTDASHLETS);
if (defaultDashletsElement != null)
{
Iterator<Element> dashletsItr = defaultDashletsElement.elementIterator(ELEMENT_DASHLET);
while (dashletsItr.hasNext())
{
String id = getMandatoryDashletAttributeValue(dashletsItr.next(), ATTR_ID);
configElement.addDefaultDashlet(id);
}
}
Element guestConfigElement = element.element(ELEMENT_GUESTCONFIG);
if (guestConfigElement != null)
{