mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
. Fix for http://issues.alfresco.com/browse/AWC-1038 . Fix for http://issues.alfresco.com/browse/AWC-1072 . Encapsulation of NavigationBean toolbar location constants and I18N toolbar location labels git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4900 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -87,6 +87,10 @@ import org.apache.log4j.Priority;
|
||||
*/
|
||||
public class BrowseBean implements IContextListener
|
||||
{
|
||||
/** Public JSF Bean name */
|
||||
public static final String BEAN_NAME = "BrowseBean";
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
// Construction
|
||||
|
||||
|
@@ -35,7 +35,6 @@ import org.alfresco.service.cmr.security.AuthenticationService;
|
||||
import org.alfresco.service.cmr.security.PersonService;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.app.servlet.AuthenticationHelper;
|
||||
import org.alfresco.web.app.servlet.FacesHelper;
|
||||
import org.alfresco.web.bean.repository.Repository;
|
||||
import org.alfresco.web.bean.repository.User;
|
||||
import org.alfresco.web.ui.common.Utils;
|
||||
@@ -276,17 +275,8 @@ public class LoginBean
|
||||
}
|
||||
else
|
||||
{
|
||||
// setup the current location with the NavigationBean
|
||||
String location = this.preferences.getStartLocation();
|
||||
NavigationBean navBean = (NavigationBean)FacesHelper.getManagedBean(
|
||||
fc, "NavigationBean");
|
||||
if (navBean != null)
|
||||
{
|
||||
navBean.setToolbarLocation(location);
|
||||
}
|
||||
|
||||
// special case to handle jump to My Alfresco page initially
|
||||
if (NavigationBean.LOCATION_MYALFRESCO.equals(location))
|
||||
if (NavigationBean.LOCATION_MYALFRESCO.equals(this.preferences.getStartLocation()))
|
||||
{
|
||||
return "myalfresco";
|
||||
}
|
||||
|
@@ -44,7 +44,6 @@ import org.alfresco.service.cmr.security.PermissionService;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.app.context.UIContextService;
|
||||
import org.alfresco.web.app.servlet.FacesHelper;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
import org.alfresco.web.bean.repository.Repository;
|
||||
import org.alfresco.web.bean.repository.User;
|
||||
@@ -66,8 +65,6 @@ public class NavigationBean
|
||||
/** Public JSF Bean name */
|
||||
public static final String BEAN_NAME = "NavigationBean";
|
||||
|
||||
private static final String OUTCOME_MYALFRESCO = "myalfresco";
|
||||
private static final String OUTCOME_BROWSE = "browse";
|
||||
|
||||
/**
|
||||
* Default constructor
|
||||
@@ -190,7 +187,7 @@ public class NavigationBean
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the toolbar Location.
|
||||
* @return Returns the toolbar Location - initially set from the user preferences.
|
||||
*/
|
||||
public String getToolbarLocation()
|
||||
{
|
||||
@@ -198,17 +195,30 @@ public class NavigationBean
|
||||
{
|
||||
// if the toolbar location has not been set yet, try and get the
|
||||
// default via the user preferences object
|
||||
UserPreferencesBean prefsBean = (UserPreferencesBean)FacesHelper.getManagedBean(
|
||||
FacesContext.getCurrentInstance(), "UserPreferencesBean");
|
||||
if (prefsBean != null)
|
||||
this.toolbarLocation = this.preferences.getStartLocation();
|
||||
|
||||
// test that the user still has access to the specified location
|
||||
// the location will need to be reset if the user permissions are no longer valid
|
||||
if (NavigationBean.LOCATION_COMPANY.equals(this.toolbarLocation))
|
||||
{
|
||||
this.toolbarLocation = prefsBean.getStartLocation();
|
||||
if (getCompanyHomeVisible() == false)
|
||||
{
|
||||
this.toolbarLocation = null;
|
||||
}
|
||||
}
|
||||
else if (NavigationBean.LOCATION_GUEST.equals(this.toolbarLocation))
|
||||
{
|
||||
if (getGuestHomeVisible() == false)
|
||||
{
|
||||
this.toolbarLocation = null;
|
||||
}
|
||||
}
|
||||
|
||||
// if we still haven't found a location default to my home
|
||||
// if don't have a valid start location default to My Home
|
||||
if (this.toolbarLocation == null)
|
||||
{
|
||||
this.toolbarLocation = LOCATION_HOME;
|
||||
this.preferences.setStartLocation(this.toolbarLocation);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -560,7 +570,7 @@ public class NavigationBean
|
||||
if (this.location == null)
|
||||
{
|
||||
// get the initial location from the user preferences
|
||||
processToolbarLocation(this.preferences.getStartLocation(), false);
|
||||
processToolbarLocation(getToolbarLocation(), false);
|
||||
}
|
||||
|
||||
return this.location;
|
||||
@@ -850,7 +860,14 @@ public class NavigationBean
|
||||
public static final String LOCATION_GUEST = "guesthome";
|
||||
public static final String LOCATION_MYALFRESCO = "myalfresco";
|
||||
|
||||
private static final String MSG_MYALFRESCO = "my_alfresco";
|
||||
/** constant value representing the display lables for toolbar locations */
|
||||
public static final String MSG_MYALFRESCO = "my_alfresco";
|
||||
public static final String MSG_MYHOME = "my_home";
|
||||
public static final String MSG_COMPANYHOME = "company_home";
|
||||
public static final String MSG_GUESTHOME = "guest_home";
|
||||
|
||||
private static final String OUTCOME_MYALFRESCO = "myalfresco";
|
||||
private static final String OUTCOME_BROWSE = "browse";
|
||||
|
||||
private static final String ERROR_DELETED_FOLDER = "error_deleted_folder";
|
||||
|
||||
|
@@ -28,6 +28,7 @@ import org.alfresco.config.Config;
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.i18n.I18NUtil;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.app.servlet.FacesHelper;
|
||||
import org.alfresco.web.bean.repository.PreferencesService;
|
||||
import org.alfresco.web.config.LanguagesConfigElement;
|
||||
|
||||
@@ -39,10 +40,6 @@ import org.alfresco.web.config.LanguagesConfigElement;
|
||||
public class UserPreferencesBean
|
||||
{
|
||||
private static final String PREF_STARTLOCATION = "start-location";
|
||||
private static final String MSG_MYALFRESCO = "my_alfresco";
|
||||
private static final String MSG_MYHOME = "my_home";
|
||||
private static final String MSG_COMPANYHOME = "company_home";
|
||||
private static final String MSG_GUESTHOME = "guest_home";
|
||||
|
||||
private static final String PREF_CONTENTFILTERLANGUAGE = "content-filter-language";
|
||||
private static final String MSG_CONTENTALLLANGUAGES = "content_all_languages";
|
||||
@@ -53,33 +50,9 @@ public class UserPreferencesBean
|
||||
/** content language locale selection */
|
||||
private String contentFilterLanguage = null;
|
||||
|
||||
private SelectItem[] getLanguageItems(boolean includeAllLanguages)
|
||||
{
|
||||
Config config = Application.getConfigService(FacesContext.getCurrentInstance()).getConfig("Languages");
|
||||
LanguagesConfigElement langConfig = (LanguagesConfigElement)config.getConfigElement(
|
||||
LanguagesConfigElement.CONFIG_ELEMENT_ID);
|
||||
|
||||
List<String> languages = langConfig.getLanguages();
|
||||
List<SelectItem> items = new ArrayList<SelectItem>(20);
|
||||
if (includeAllLanguages)
|
||||
{
|
||||
ResourceBundle msg = Application.getBundle(FacesContext.getCurrentInstance());
|
||||
String allLanguagesStr = msg.getString(MSG_CONTENTALLLANGUAGES);
|
||||
items.add(new SelectItem(MSG_CONTENTALLLANGUAGES, allLanguagesStr));
|
||||
}
|
||||
for (String locale : languages)
|
||||
{
|
||||
// get label associated to the locale
|
||||
String label = langConfig.getLabelForLanguage(locale);
|
||||
items.add(new SelectItem(locale, label));
|
||||
}
|
||||
|
||||
SelectItem[] result = new SelectItem[items.size()];
|
||||
return items.toArray(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the available languages
|
||||
* @return the list of available languages
|
||||
*/
|
||||
public SelectItem[] getLanguages()
|
||||
{
|
||||
@@ -124,6 +97,9 @@ public class UserPreferencesBean
|
||||
Application.setLanguage(FacesContext.getCurrentInstance(), this.language);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return current content filter language
|
||||
*/
|
||||
public String getContentFilterLanguage()
|
||||
{
|
||||
if (this.contentFilterLanguage == null)
|
||||
@@ -161,6 +137,9 @@ public class UserPreferencesBean
|
||||
PreferencesService.getPreferences().setValue(PREF_CONTENTFILTERLANGUAGE, language);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return list of items for the content filtering language selection
|
||||
*/
|
||||
public SelectItem[] getContentFilterLanguages()
|
||||
{
|
||||
// Get the item selection list
|
||||
@@ -169,7 +148,39 @@ public class UserPreferencesBean
|
||||
return items;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper to return the available language items
|
||||
*
|
||||
* @param includeAllLanguages True to include a marker item for "All Languages"
|
||||
* @return
|
||||
*/
|
||||
private static SelectItem[] getLanguageItems(boolean includeAllLanguages)
|
||||
{
|
||||
FacesContext fc = FacesContext.getCurrentInstance();
|
||||
Config config = Application.getConfigService(fc).getConfig("Languages");
|
||||
LanguagesConfigElement langConfig = (LanguagesConfigElement)config.getConfigElement(
|
||||
LanguagesConfigElement.CONFIG_ELEMENT_ID);
|
||||
|
||||
List<String> languages = langConfig.getLanguages();
|
||||
List<SelectItem> items = new ArrayList<SelectItem>(10);
|
||||
if (includeAllLanguages)
|
||||
{
|
||||
String allLanguagesStr = Application.getMessage(fc, MSG_CONTENTALLLANGUAGES);
|
||||
items.add(new SelectItem(MSG_CONTENTALLLANGUAGES, allLanguagesStr));
|
||||
}
|
||||
for (String locale : languages)
|
||||
{
|
||||
// get label associated to the locale
|
||||
String label = langConfig.getLabelForLanguage(locale);
|
||||
items.add(new SelectItem(locale, label));
|
||||
}
|
||||
|
||||
return items.toArray(new SelectItem[items.size()]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the start location for this user (@see NavigationBean)
|
||||
*/
|
||||
public String getStartLocation()
|
||||
{
|
||||
String location = (String)PreferencesService.getPreferences().getValue(PREF_STARTLOCATION);
|
||||
@@ -181,18 +192,47 @@ public class UserPreferencesBean
|
||||
return location;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param location The current start location for this user (@see NavigationBean)
|
||||
*/
|
||||
public void setStartLocation(String location)
|
||||
{
|
||||
PreferencesService.getPreferences().setValue(PREF_STARTLOCATION, location);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the list of available start locations
|
||||
*/
|
||||
public SelectItem[] getStartLocations()
|
||||
{
|
||||
ResourceBundle msg = Application.getBundle(FacesContext.getCurrentInstance());
|
||||
return new SelectItem[] {
|
||||
new SelectItem(NavigationBean.LOCATION_MYALFRESCO, msg.getString(MSG_MYALFRESCO)),
|
||||
new SelectItem(NavigationBean.LOCATION_HOME, msg.getString(MSG_MYHOME)),
|
||||
new SelectItem(NavigationBean.LOCATION_COMPANY, msg.getString(MSG_COMPANYHOME)),
|
||||
new SelectItem(NavigationBean.LOCATION_GUEST, msg.getString(MSG_GUESTHOME))};
|
||||
FacesContext fc = FacesContext.getCurrentInstance();
|
||||
NavigationBean navigator = (NavigationBean)FacesHelper.getManagedBean(fc, "NavigationBean");
|
||||
ResourceBundle msg = Application.getBundle(fc);
|
||||
|
||||
List<SelectItem> locations = new ArrayList<SelectItem>(4);
|
||||
|
||||
// add My Alfresco location
|
||||
locations.add(new SelectItem(
|
||||
NavigationBean.LOCATION_MYALFRESCO, msg.getString(NavigationBean.MSG_MYALFRESCO)));
|
||||
|
||||
// add My Home location
|
||||
locations.add(new SelectItem(
|
||||
NavigationBean.LOCATION_HOME, msg.getString(NavigationBean.MSG_MYHOME)));
|
||||
|
||||
// add Company Home location if visible
|
||||
if (navigator.getCompanyHomeVisible())
|
||||
{
|
||||
locations.add(new SelectItem(
|
||||
NavigationBean.LOCATION_COMPANY, msg.getString(NavigationBean.MSG_COMPANYHOME)));
|
||||
}
|
||||
|
||||
// add Guest Home location if visible
|
||||
if (navigator.getGuestHomeVisible())
|
||||
{
|
||||
locations.add(new SelectItem(
|
||||
NavigationBean.LOCATION_GUEST, msg.getString(NavigationBean.MSG_GUESTHOME)));
|
||||
}
|
||||
|
||||
return locations.toArray(new SelectItem[locations.size()]);
|
||||
}
|
||||
}
|
||||
|
@@ -46,8 +46,6 @@ public class UINavigator extends SelfRenderingComponent
|
||||
protected String activeArea;
|
||||
|
||||
private static final Log logger = LogFactory.getLog(UINavigator.class);
|
||||
private static final String NAVIGATION_BEAN = "NavigationBean";
|
||||
private static final String BROWSE_BEAN = "BrowseBean";
|
||||
private static final String AJAX_URL_START = "/ajax/invoke/" + NavigatorPluginBean.BEAN_NAME;
|
||||
private static final String PANEL_ACTION = "panel:";
|
||||
private static final int PANEL_SELECTED = 1;
|
||||
@@ -130,7 +128,7 @@ public class UINavigator extends SelfRenderingComponent
|
||||
// a panel was selected, setup the context to make the panel
|
||||
// the focus
|
||||
NavigationBean nb = (NavigationBean)FacesHelper.getManagedBean(
|
||||
context, NAVIGATION_BEAN);
|
||||
context, NavigationBean.BEAN_NAME);
|
||||
if (nb != null)
|
||||
{
|
||||
try
|
||||
@@ -163,7 +161,7 @@ public class UINavigator extends SelfRenderingComponent
|
||||
|
||||
// setup the context to make the node the current node
|
||||
BrowseBean bb = (BrowseBean)FacesHelper.getManagedBean(
|
||||
context, BROWSE_BEAN);
|
||||
context, BrowseBean.BEAN_NAME);
|
||||
if (bb != null)
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
@@ -193,7 +191,7 @@ public class UINavigator extends SelfRenderingComponent
|
||||
|
||||
ResponseWriter out = context.getResponseWriter();
|
||||
NavigationBean navBean = (NavigationBean)FacesHelper.getManagedBean(
|
||||
context, NAVIGATION_BEAN);
|
||||
context, NavigationBean.BEAN_NAME);
|
||||
NavigatorPluginBean navPluginBean = (NavigatorPluginBean)FacesHelper.getManagedBean(
|
||||
context, NavigatorPluginBean.BEAN_NAME);
|
||||
|
||||
@@ -204,22 +202,22 @@ public class UINavigator extends SelfRenderingComponent
|
||||
if (NavigationBean.LOCATION_COMPANY.equals(area))
|
||||
{
|
||||
rootNodesForArea = navPluginBean.getCompanyHomeRootNodes();
|
||||
areaTitle = Application.getMessage(context, "company_home");
|
||||
areaTitle = Application.getMessage(context, NavigationBean.MSG_COMPANYHOME);
|
||||
}
|
||||
else if (NavigationBean.LOCATION_HOME.equals(area))
|
||||
{
|
||||
rootNodesForArea = navPluginBean.getMyHomeRootNodes();
|
||||
areaTitle = Application.getMessage(context, "my_home");
|
||||
areaTitle = Application.getMessage(context, NavigationBean.MSG_MYHOME);
|
||||
}
|
||||
else if (NavigationBean.LOCATION_GUEST.equals(area))
|
||||
{
|
||||
rootNodesForArea = navPluginBean.getGuestHomeRootNodes();
|
||||
areaTitle = Application.getMessage(context, "guest_home");
|
||||
areaTitle = Application.getMessage(context, NavigationBean.MSG_GUESTHOME);
|
||||
}
|
||||
else
|
||||
{
|
||||
treePanel = false;
|
||||
areaTitle = Application.getMessage(context, "my_alfresco");
|
||||
areaTitle = Application.getMessage(context, NavigationBean.MSG_MYALFRESCO);
|
||||
}
|
||||
|
||||
// main container div
|
||||
@@ -243,8 +241,7 @@ public class UINavigator extends SelfRenderingComponent
|
||||
|
||||
// generate the active panel containing the tree
|
||||
out.write("<div class=\"navigatorPanelBody\">");
|
||||
UITree tree = (UITree)context.getApplication().createComponent(
|
||||
UITree.COMPONENT_TYPE);
|
||||
UITree tree = (UITree)context.getApplication().createComponent(UITree.COMPONENT_TYPE);
|
||||
tree.setId("tree");
|
||||
tree.setRootNodes(rootNodesForArea);
|
||||
tree.setRetrieveChildrenUrl(AJAX_URL_START + ".retrieveChildren?area=" + area);
|
||||
@@ -260,56 +257,50 @@ public class UINavigator extends SelfRenderingComponent
|
||||
if (NavigationBean.LOCATION_COMPANY.equals(area) == false &&
|
||||
navBean.getCompanyHomeVisible())
|
||||
{
|
||||
out.write("<div class=\"sidebarButton\" ");
|
||||
out.write(sideBarStyle);
|
||||
out.write("><a class='sidebarButtonLink' onclick=\"");
|
||||
out.write(Utils.generateFormSubmit(context, this, getClientId(context),
|
||||
PANEL_ACTION + NavigationBean.LOCATION_COMPANY));
|
||||
out.write("\" href=\"#\">");
|
||||
out.write(Application.getMessage(context, "company_home"));
|
||||
out.write("</a></div>");
|
||||
encodeSidebarButton(context, out, sideBarStyle, NavigationBean.LOCATION_COMPANY, NavigationBean.MSG_COMPANYHOME);
|
||||
}
|
||||
|
||||
if (NavigationBean.LOCATION_HOME.equals(area) == false)
|
||||
{
|
||||
out.write("<div class=\"sidebarButton\" ");
|
||||
out.write(sideBarStyle);
|
||||
out.write("><a class='sidebarButtonLink' onclick=\"");
|
||||
out.write(Utils.generateFormSubmit(context, this, getClientId(context),
|
||||
PANEL_ACTION + NavigationBean.LOCATION_HOME));
|
||||
out.write("\" href=\"#\">");
|
||||
out.write(Application.getMessage(context, "my_home"));
|
||||
out.write("</a></div>");
|
||||
encodeSidebarButton(context, out, sideBarStyle, NavigationBean.LOCATION_HOME, NavigationBean.MSG_MYHOME);
|
||||
}
|
||||
|
||||
if (NavigationBean.LOCATION_GUEST.equals(area) == false &&
|
||||
navBean.getIsGuest() == false && navBean.getGuestHomeVisible())
|
||||
{
|
||||
out.write("<div class=\"sidebarButton\" ");
|
||||
out.write(sideBarStyle);
|
||||
out.write("><a class='sidebarButtonLink' onclick=\"");
|
||||
out.write(Utils.generateFormSubmit(context, this, getClientId(context),
|
||||
PANEL_ACTION + NavigationBean.LOCATION_GUEST));
|
||||
out.write("\" href=\"#\">");
|
||||
out.write(Application.getMessage(context, "guest_home"));
|
||||
out.write("</a></div>");
|
||||
encodeSidebarButton(context, out, sideBarStyle, NavigationBean.LOCATION_GUEST, NavigationBean.MSG_GUESTHOME);
|
||||
}
|
||||
|
||||
if (NavigationBean.LOCATION_MYALFRESCO.equals(area) == false)
|
||||
{
|
||||
out.write("<div class=\"sidebarButton\" ");
|
||||
out.write(sideBarStyle);
|
||||
out.write("><a class='sidebarButtonLink' onclick=\"");
|
||||
out.write(Utils.generateFormSubmit(context, this, getClientId(context),
|
||||
PANEL_ACTION + NavigationBean.LOCATION_MYALFRESCO));
|
||||
out.write("\" href=\"#\">");
|
||||
out.write(Application.getMessage(context, "my_alfresco"));
|
||||
out.write("</a></div>");
|
||||
encodeSidebarButton(context, out, sideBarStyle, NavigationBean.LOCATION_MYALFRESCO, NavigationBean.MSG_MYALFRESCO);
|
||||
}
|
||||
|
||||
out.write("</div>");
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode a Sidebar Button DIV with selectable button link
|
||||
*
|
||||
* @param context FacesContext
|
||||
* @param out ResponseWriter
|
||||
* @param sideBarStyle Inline CSS style to apply to the sidebar button
|
||||
* @param location Toolbar location id
|
||||
* @param labelId Label I18N message id
|
||||
*/
|
||||
private void encodeSidebarButton(FacesContext context, ResponseWriter out, String sideBarStyle,
|
||||
String location, String labelId)
|
||||
throws IOException
|
||||
{
|
||||
out.write("<div class=\"sidebarButton\" ");
|
||||
out.write(sideBarStyle);
|
||||
out.write("><a class='sidebarButtonLink' onclick=\"");
|
||||
out.write(Utils.generateFormSubmit(context, this, getClientId(context), PANEL_ACTION + location));
|
||||
out.write("\" href=\"#\">");
|
||||
out.write(Application.getMessage(context, labelId));
|
||||
out.write("</a></div>");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void encodeChildren(FacesContext context) throws IOException
|
||||
{
|
||||
|
@@ -24,10 +24,17 @@
|
||||
<%@ page isELIgnored="false" %>
|
||||
<%@ page import="org.alfresco.web.app.Application" %>
|
||||
<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
|
||||
<%@ page import="javax.faces.context.FacesContext" %>
|
||||
|
||||
<r:page titleId="title_my_alfresco">
|
||||
|
||||
<f:view>
|
||||
<%
|
||||
FacesContext fc = FacesContext.getCurrentInstance();
|
||||
|
||||
// set locale for JSF framework usage
|
||||
fc.getViewRoot().setLocale(Application.getLanguage(fc));
|
||||
%>
|
||||
|
||||
<%-- load a bundle of properties with I18N strings --%>
|
||||
<f:loadBundle basename="alfresco.messages.webclient" var="msg"/>
|
||||
|
@@ -23,10 +23,18 @@
|
||||
<%@ page buffer="64kb" contentType="text/html;charset=UTF-8" %>
|
||||
<%@ page isELIgnored="false" %>
|
||||
<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
|
||||
<%@ page import="org.alfresco.web.app.Application" %>
|
||||
<%@ page import="javax.faces.context.FacesContext" %>
|
||||
|
||||
<r:page titleId="title_file_details">
|
||||
|
||||
<f:view>
|
||||
<%
|
||||
FacesContext fc = FacesContext.getCurrentInstance();
|
||||
|
||||
// set locale for JSF framework usage
|
||||
fc.getViewRoot().setLocale(Application.getLanguage(fc));
|
||||
%>
|
||||
|
||||
<%-- load a bundle of properties with I18N strings --%>
|
||||
<f:loadBundle basename="alfresco.messages.webclient" var="msg"/>
|
||||
|
@@ -23,10 +23,18 @@
|
||||
<%@ page buffer="64kb" contentType="text/html;charset=UTF-8" %>
|
||||
<%@ page isELIgnored="false" %>
|
||||
<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
|
||||
<%@ page import="org.alfresco.web.app.Application" %>
|
||||
<%@ page import="javax.faces.context.FacesContext" %>
|
||||
|
||||
<r:page titleId="title_space_details">
|
||||
|
||||
<f:view>
|
||||
<%
|
||||
FacesContext fc = FacesContext.getCurrentInstance();
|
||||
|
||||
// set locale for JSF framework usage
|
||||
fc.getViewRoot().setLocale(Application.getLanguage(fc));
|
||||
%>
|
||||
|
||||
<%-- load a bundle of properties with I18N strings --%>
|
||||
<f:loadBundle basename="alfresco.messages.webclient" var="msg"/>
|
||||
|
Reference in New Issue
Block a user