use of org.alfresco.web.config.SidebarConfigElement in project acs-community-packaging by Alfresco.
the class SidebarBean method getSidebarConfig.
// ------------------------------------------------------------------------------
// Helper methods
/**
* Returns the SidebarConfigElement for the application
*
* @param context Faces context
* @return The SidebarConfigElement object or null if it's not found
*/
public static SidebarConfigElement getSidebarConfig(FacesContext context) {
SidebarConfigElement config = null;
Config cfg = Application.getConfigService(context).getConfig("Sidebar");
if (cfg != null) {
config = (SidebarConfigElement) cfg.getConfigElement(SidebarConfigElement.CONFIG_ELEMENT_ID);
}
return config;
}
use of org.alfresco.web.config.SidebarConfigElement in project acs-community-packaging by Alfresco.
the class UISidebar method setupActionGroupId.
/**
* Sets up the corrent actions config group id on the given actions
* component.
*
* @param context Faces context
* @param actionsComponent The actions component to set the group id for
*/
protected void setupActionGroupId(FacesContext context, UIActions actionsComponent) {
String actionsGroupId = null;
SidebarConfigElement config = SidebarBean.getSidebarConfig(context);
if (config != null) {
SidebarPluginConfig plugin = config.getPlugin(getActivePlugin());
if (plugin != null) {
actionsGroupId = plugin.getActionsConfigId();
}
}
actionsComponent.setValue(actionsGroupId);
}
Aggregations