. Dashboards impl checkpoint

- configurable JSP layouts
  - configurable "dashlets" (JSP snipets)
  - page config (de)serialisation per user

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3347 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2006-07-18 17:37:24 +00:00
parent 02790a7b4a
commit 6919d55f1a
16 changed files with 486 additions and 177 deletions

View File

@@ -62,6 +62,10 @@ import org.apache.log4j.Logger;
*/
public class NavigationBean
{
private static final String OUTCOME_MYALFRESCO = "myalfresco";
private static final String OUTCOME_BROWSE = "browse";
/**
* Default constructor
*/
@@ -587,6 +591,9 @@ public class NavigationBean
elements.add(new NavigationBreadcrumbHandler(companyHome.getNodeRef(), companyHome.getName()));
setLocation(elements);
setCurrentNodeId(companyHome.getId());
// we need to force a navigation to refresh the browse screen breadcrumb
context.getApplication().getNavigationHandler().handleNavigation(context, null, OUTCOME_BROWSE);
}
else if (LOCATION_HOME.equals(location))
{
@@ -597,6 +604,9 @@ public class NavigationBean
elements.add(new NavigationBreadcrumbHandler(homeSpaceRef, homeSpaceName));
setLocation(elements);
setCurrentNodeId(homeSpaceRef.getId());
// we need to force a navigation to refresh the browse screen breadcrumb
context.getApplication().getNavigationHandler().handleNavigation(context, null, OUTCOME_BROWSE);
}
else if (LOCATION_GUEST.equals(location))
{
@@ -605,10 +615,31 @@ public class NavigationBean
elements.add(new NavigationBreadcrumbHandler(guestHome.getNodeRef(), guestHome.getName()));
setLocation(elements);
setCurrentNodeId(guestHome.getId());
// we need to force a navigation to refresh the browse screen breadcrumb
context.getApplication().getNavigationHandler().handleNavigation(context, null, OUTCOME_BROWSE);
}
else if (LOCATION_DASHBOARD.equals(location))
{
List<IBreadcrumbHandler> elements = new ArrayList<IBreadcrumbHandler>(1);
elements.add(new IBreadcrumbHandler()
{
public String navigationOutcome(UIBreadcrumb breadcrumb)
{
setLocation( (List)breadcrumb.getValue() );
return OUTCOME_MYALFRESCO;
};
public String toString()
{
return Application.getMessage(FacesContext.getCurrentInstance(), MSG_MYALFRESCO);
};
});
setLocation(elements);
// we need to force a navigation to refresh the browse screen breadcrumb
context.getApplication().getNavigationHandler().handleNavigation(context, null, OUTCOME_MYALFRESCO);
}
// we need to force a navigation to refresh the browse screen breadcrumb
context.getApplication().getNavigationHandler().handleNavigation(context, null, "browse");
}
catch (InvalidNodeRefException refErr)
{
@@ -711,7 +742,7 @@ public class NavigationBean
}
else
{
return "browse";
return OUTCOME_BROWSE;
}
}
@@ -734,6 +765,9 @@ public class NavigationBean
private static final String LOCATION_COMPANY = "company";
private static final String LOCATION_HOME = "home";
private static final String LOCATION_GUEST = "guest";
private static final String LOCATION_DASHBOARD = "dashboard";
private static final String MSG_MYALFRESCO = "my_alfresco";
private static final String ERROR_DELETED_FOLDER = "error_deleted_folder";