Fixing the translation problem in the content center (see #1630).
git-svn-id: https://svn.libreccm.org/ccm/trunk@2085 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
de925fdb3b
commit
9b263bec1a
|
|
@ -1113,3 +1113,10 @@ cms.ui.clear=Clear
|
||||||
cms.ui.item_search.create.folder_missing=No folder selected
|
cms.ui.item_search.create.folder_missing=No folder selected
|
||||||
cms.ui.images_links=
|
cms.ui.images_links=
|
||||||
cms.contenttypes.ui.person.alias.delete.label=Delete
|
cms.contenttypes.ui.person.alias.delete.label=Delete
|
||||||
|
cms.ui.contentcenter.mainpage.search=Search
|
||||||
|
cms.ui.contentcenter.mainpage.taskssections=Tasks/Sections
|
||||||
|
cms.ui.contentcenter.section=Section
|
||||||
|
cms.ui.contentcenter.action=Action
|
||||||
|
cms.ui.set_home_folder=Set as home folder
|
||||||
|
cms.ui.go_to_home_folder=Go to home folder
|
||||||
|
cms.ui.no_home_folder_selected=No home folder selected
|
||||||
|
|
|
||||||
|
|
@ -845,7 +845,7 @@ cms.ui.workflow.tasks=Aufgaben
|
||||||
cms.ui.workflow.task.view_locked=Reservierte Aufgaben anzeigen
|
cms.ui.workflow.task.view_locked=Reservierte Aufgaben anzeigen
|
||||||
cms.ui.workflow.task.view_unlocked=Freigegebene Aufgaben anzeigen
|
cms.ui.workflow.task.view_unlocked=Freigegebene Aufgaben anzeigen
|
||||||
cms.ui.workflow.task.view_all=Alle Aufgaben anzeigen
|
cms.ui.workflow.task.view_all=Alle Aufgaben anzeigen
|
||||||
cms.ui.workflow.task.item_title=Item Title
|
cms.ui.workflow.task.item_title=Titel des Dokuments
|
||||||
cms.ui.workflow.task.locking_user=Reserviert von\:
|
cms.ui.workflow.task.locking_user=Reserviert von\:
|
||||||
cms.ui.workflow.unlock_tasks=Alle meine Aufgaben f\u00fcr diesen Typ freigeben
|
cms.ui.workflow.unlock_tasks=Alle meine Aufgaben f\u00fcr diesen Typ freigeben
|
||||||
cms.ui.workflow.your_tasks=Zugewiesene Aufgaben
|
cms.ui.workflow.your_tasks=Zugewiesene Aufgaben
|
||||||
|
|
@ -1105,4 +1105,11 @@ cms.ui.type.minimum_number_of_values_bigger_than_maximum_number_of_values=Maxima
|
||||||
cms.ui.type.minimummaximum_number_of_values_cannot_be_negative=Keine negativen Werte erlaubt
|
cms.ui.type.minimummaximum_number_of_values_cannot_be_negative=Keine negativen Werte erlaubt
|
||||||
cms.ui.item_search.create.folder_missing=kein Ordner ausgew\u00e4hlt
|
cms.ui.item_search.create.folder_missing=kein Ordner ausgew\u00e4hlt
|
||||||
cms.ui.images_links=
|
cms.ui.images_links=
|
||||||
cms.contenttypes.ui.person.alias.delete.label=
|
cms.contenttypes.ui.person.alias.delete.label=L\u00f6schen
|
||||||
|
cms.ui.contentcenter.mainpage.search=Suche
|
||||||
|
cms.ui.contentcenter.mainpage.taskssections=Aufgaben/Content Sections
|
||||||
|
cms.ui.contentcenter.section=Content Section
|
||||||
|
cms.ui.contentcenter.action=Aktion
|
||||||
|
cms.ui.set_home_folder=Als Start-Ordner festlegen
|
||||||
|
cms.ui.go_to_home_folder=Zum Start-Ordner
|
||||||
|
cms.ui.no_home_folder_selected=Kein Start-Ordner festgelegt
|
||||||
|
|
|
||||||
|
|
@ -52,3 +52,10 @@ cms.ui.clear=
|
||||||
cms.ui.item_search.create.folder_missing=
|
cms.ui.item_search.create.folder_missing=
|
||||||
cms.ui.images_links=
|
cms.ui.images_links=
|
||||||
cms.contenttypes.ui.person.alias.delete.label=
|
cms.contenttypes.ui.person.alias.delete.label=
|
||||||
|
cms.ui.contentcenter.mainpage.search=
|
||||||
|
cms.ui.contentcenter.mainpage.taskssections=
|
||||||
|
cms.ui.contentcenter.section=
|
||||||
|
cms.ui.contentcenter.action=
|
||||||
|
cms.ui.set_home_folder=
|
||||||
|
cms.ui.go_to_home_folder=
|
||||||
|
cms.ui.no_home_folder_selected=
|
||||||
|
|
|
||||||
|
|
@ -583,3 +583,10 @@ cms.ui.clear=
|
||||||
cms.ui.item_search.create.folder_missing=
|
cms.ui.item_search.create.folder_missing=
|
||||||
cms.ui.images_links=
|
cms.ui.images_links=
|
||||||
cms.contenttypes.ui.person.alias.delete.label=
|
cms.contenttypes.ui.person.alias.delete.label=
|
||||||
|
cms.ui.contentcenter.mainpage.search=
|
||||||
|
cms.ui.contentcenter.mainpage.taskssections=
|
||||||
|
cms.ui.contentcenter.section=
|
||||||
|
cms.ui.contentcenter.action=
|
||||||
|
cms.ui.set_home_folder=
|
||||||
|
cms.ui.go_to_home_folder=
|
||||||
|
cms.ui.no_home_folder_selected=
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@
|
||||||
*/
|
*/
|
||||||
package com.arsdigita.cms.ui;
|
package com.arsdigita.cms.ui;
|
||||||
|
|
||||||
|
|
||||||
import com.arsdigita.bebop.ActionLink;
|
import com.arsdigita.bebop.ActionLink;
|
||||||
import com.arsdigita.bebop.Form;
|
import com.arsdigita.bebop.Form;
|
||||||
import com.arsdigita.bebop.FormProcessException;
|
import com.arsdigita.bebop.FormProcessException;
|
||||||
|
|
@ -92,34 +91,27 @@ public class FlatItemList extends SegmentedPanel
|
||||||
private static final String CMS_PRIVILEGES = "com.arsdigita.cms.getPrivileges";
|
private static final String CMS_PRIVILEGES = "com.arsdigita.cms.getPrivileges";
|
||||||
private static final String PRIVILEGE = "privilege";
|
private static final String PRIVILEGE = "privilege";
|
||||||
private static final String PRIVILEGE_NAME = "prettyName";
|
private static final String PRIVILEGE_NAME = "prettyName";
|
||||||
|
|
||||||
// The folder selectors
|
// The folder selectors
|
||||||
private FolderSelectionModel m_folderSel;
|
private FolderSelectionModel m_folderSel;
|
||||||
private FolderRequestLocal m_folder;
|
private FolderRequestLocal m_folder;
|
||||||
|
|
||||||
private NewItemForm m_newItem;
|
private NewItemForm m_newItem;
|
||||||
private SingleSelectionModel m_typeSel;
|
private SingleSelectionModel m_typeSel;
|
||||||
private CreationSelector m_selector;
|
private CreationSelector m_selector;
|
||||||
private FolderManipulator m_folderManip;
|
private FolderManipulator m_folderManip;
|
||||||
|
|
||||||
private FolderCreator m_folderCreator;
|
private FolderCreator m_folderCreator;
|
||||||
private ActionLink m_setHomeFolderAction;
|
private ActionLink m_setHomeFolderAction;
|
||||||
private ActionLink m_createFolderAction;
|
private ActionLink m_createFolderAction;
|
||||||
private ActionLink m_togglePrivateAction;
|
private ActionLink m_togglePrivateAction;
|
||||||
private Label m_homeFolderLabel;
|
private Label m_homeFolderLabel;
|
||||||
|
|
||||||
private Segment m_browseSeg;
|
private Segment m_browseSeg;
|
||||||
private Segment m_newItemSeg;
|
private Segment m_newItemSeg;
|
||||||
private Segment m_newFolderSeg;
|
private Segment m_newFolderSeg;
|
||||||
private Segment m_editFolderSeg;
|
private Segment m_editFolderSeg;
|
||||||
private Segment m_permissionsSeg;
|
private Segment m_permissionsSeg;
|
||||||
private CMSPermissionsPane m_permPane;
|
private CMSPermissionsPane m_permPane;
|
||||||
|
|
||||||
// Folder edit/rename functionality.
|
// Folder edit/rename functionality.
|
||||||
private ActionLink m_editFolderAction;
|
private ActionLink m_editFolderAction;
|
||||||
private FolderEditor m_folderEditor;
|
private FolderEditor m_folderEditor;
|
||||||
|
|
||||||
|
|
||||||
private Label m_contentLabel;
|
private Label m_contentLabel;
|
||||||
private ItemPath m_itemPath;
|
private ItemPath m_itemPath;
|
||||||
private Label m_chooseLabel;
|
private Label m_chooseLabel;
|
||||||
|
|
@ -139,6 +131,7 @@ public class FlatItemList extends SegmentedPanel
|
||||||
PageState s = e.getPageState();
|
PageState s = e.getPageState();
|
||||||
reset(s);
|
reset(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
setIdAttr("flat-item-list");
|
setIdAttr("flat-item-list");
|
||||||
|
|
@ -189,7 +182,7 @@ public class FlatItemList extends SegmentedPanel
|
||||||
m_editFolderAction.addActionListener(this);
|
m_editFolderAction.addActionListener(this);
|
||||||
browseActions.addAction(m_editFolderAction);
|
browseActions.addAction(m_editFolderAction);
|
||||||
|
|
||||||
m_setHomeFolderAction = new ActionLink(new Label("Set as home folder"));
|
m_setHomeFolderAction = new ActionLink(new Label(globalize("cms.ui.set_home_folder")));
|
||||||
m_setHomeFolderAction.addActionListener(this);
|
m_setHomeFolderAction.addActionListener(this);
|
||||||
browseActions.addAction(m_setHomeFolderAction);
|
browseActions.addAction(m_setHomeFolderAction);
|
||||||
|
|
||||||
|
|
@ -200,13 +193,21 @@ public class FlatItemList extends SegmentedPanel
|
||||||
|
|
||||||
Folder folder = Folder.getUserHomeFolder(user, CMS.getContext().getContentSection());
|
Folder folder = Folder.getUserHomeFolder(user, CMS.getContext().getContentSection());
|
||||||
if (folder != null) {
|
if (folder != null) {
|
||||||
String url = folder.getContentSection().getURL() + PageLocations.SECTION_PAGE + "?" + ContentSectionPage.SET_FOLDER + "=" + folder.getID();
|
String url = folder.getContentSection().getURL() + PageLocations.SECTION_PAGE + "?"
|
||||||
label.setLabel("Go to home folder: <a href=\"" + url + "\">" + folder.getLabel() + "</a>");
|
+ ContentSectionPage.SET_FOLDER + "=" + folder.getID();
|
||||||
|
//label.setLabel("Go to home folder: <a href=\"" + url + "\">" + folder.getLabel() + "</a>");
|
||||||
|
label.setLabel(String.format("%s: <a href=\"%s\">%s</a>",
|
||||||
|
(String) globalize("cms.ui.go_to_home_folder").localize(),
|
||||||
|
url,
|
||||||
|
folder.getLabel()));
|
||||||
} else {
|
} else {
|
||||||
label.setLabel("<font color=\"red\">No home folder selected</font>");
|
//label.setLabel("<font color=\"red\">No home folder selected</font>");
|
||||||
|
label.setLabel(String.format("<span style=\"color: red\">%s</span>",
|
||||||
|
(String)globalize("cms.ui.no_home_folder_selected").localize()));
|
||||||
}
|
}
|
||||||
label.setOutputEscaping(false);
|
label.setOutputEscaping(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
browseActions.addAction(m_homeFolderLabel);
|
browseActions.addAction(m_homeFolderLabel);
|
||||||
|
|
||||||
|
|
@ -236,9 +237,8 @@ public class FlatItemList extends SegmentedPanel
|
||||||
}
|
}
|
||||||
query.close();
|
query.close();
|
||||||
|
|
||||||
m_permPane = new CMSPermissionsPane
|
m_permPane =
|
||||||
((PrivilegeDescriptor[]) privs.toArray
|
new CMSPermissionsPane((PrivilegeDescriptor[]) privs.toArray(new PrivilegeDescriptor[privs.size()]),
|
||||||
(new PrivilegeDescriptor[privs.size()]),
|
|
||||||
privNameMap,
|
privNameMap,
|
||||||
m_folderSel);
|
m_folderSel);
|
||||||
permActions.setSubject(m_permPane);
|
permActions.setSubject(m_permPane);
|
||||||
|
|
@ -253,11 +253,13 @@ public class FlatItemList extends SegmentedPanel
|
||||||
// ACSObject parent = currentFolder.getParent();
|
// ACSObject parent = currentFolder.getParent();
|
||||||
DataObject context = PermissionService.getContext(currentFolder);
|
DataObject context = PermissionService.getContext(currentFolder);
|
||||||
if (context == null) {
|
if (context == null) {
|
||||||
target.setLabel( (String) GlobalizationUtil.globalize("cms.ui.restore_default_permissions").localize());
|
target.setLabel((String) GlobalizationUtil.globalize("cms.ui.restore_default_permissions").
|
||||||
|
localize());
|
||||||
} else {
|
} else {
|
||||||
target.setLabel((String) GlobalizationUtil.globalize("cms.ui.use_custom_permissions").localize());
|
target.setLabel((String) GlobalizationUtil.globalize("cms.ui.use_custom_permissions").localize());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}));
|
}));
|
||||||
m_togglePrivateAction.addActionListener(this);
|
m_togglePrivateAction.addActionListener(this);
|
||||||
permActions.addAction(m_togglePrivateAction);
|
permActions.addAction(m_togglePrivateAction);
|
||||||
|
|
@ -311,6 +313,7 @@ public class FlatItemList extends SegmentedPanel
|
||||||
showHideSegments(state);
|
showHideSegments(state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -436,8 +439,7 @@ public class FlatItemList extends SegmentedPanel
|
||||||
} else if (source == m_editFolderAction) {
|
} else if (source == m_editFolderAction) {
|
||||||
m_permissionsSeg.setVisible(s, false);
|
m_permissionsSeg.setVisible(s, false);
|
||||||
m_editFolderSeg.setVisible(s, true);
|
m_editFolderSeg.setVisible(s, true);
|
||||||
}
|
} else if (source == m_togglePrivateAction) {
|
||||||
else if (source == m_togglePrivateAction) {
|
|
||||||
togglePermissions(s);
|
togglePermissions(s);
|
||||||
} else if (source == m_setHomeFolderAction) {
|
} else if (source == m_setHomeFolderAction) {
|
||||||
User user = Web.getContext().getUser();
|
User user = Web.getContext().getUser();
|
||||||
|
|
@ -470,8 +472,8 @@ public class FlatItemList extends SegmentedPanel
|
||||||
if (section != null) {
|
if (section != null) {
|
||||||
PermissionService.setContext(currentFolder, section);
|
PermissionService.setContext(currentFolder, section);
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalStateException("Cannot set the context for a folder with " +
|
throw new IllegalStateException("Cannot set the context for a folder with "
|
||||||
"no parent and no Content Section");
|
+ "no parent and no Content Section");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -485,8 +487,8 @@ public class FlatItemList extends SegmentedPanel
|
||||||
if (liveSection != null) {
|
if (liveSection != null) {
|
||||||
PermissionService.setContext(liveVersion, liveSection);
|
PermissionService.setContext(liveVersion, liveSection);
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalStateException("Cannot set the context for a folder with " +
|
throw new IllegalStateException("Cannot set the context for a folder with "
|
||||||
"no parent and no Content Section");
|
+ "no parent and no Content Section");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -505,7 +507,8 @@ public class FlatItemList extends SegmentedPanel
|
||||||
ObjectPermissionCollection livePerms = PermissionService.getGrantedPermissions(liveVersion.getOID());
|
ObjectPermissionCollection livePerms = PermissionService.getGrantedPermissions(liveVersion.getOID());
|
||||||
while (livePerms.next()) {
|
while (livePerms.next()) {
|
||||||
if (!livePerms.isInherited()) {
|
if (!livePerms.isInherited()) {
|
||||||
PermissionDescriptor desc2 = new PermissionDescriptor(livePerms.getPrivilege(), liveVersion.getOID(),
|
PermissionDescriptor desc2 = new PermissionDescriptor(livePerms.getPrivilege(), liveVersion.
|
||||||
|
getOID(),
|
||||||
livePerms.getGranteeOID());
|
livePerms.getGranteeOID());
|
||||||
PermissionService.revokePermission(desc2);
|
PermissionService.revokePermission(desc2);
|
||||||
}
|
}
|
||||||
|
|
@ -549,6 +552,7 @@ public class FlatItemList extends SegmentedPanel
|
||||||
public ContentSection getContentSection(PageState s) {
|
public ContentSection getContentSection(PageState s) {
|
||||||
return CMS.getContext().getContentSection();
|
return CMS.getContext().getContentSection();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ public abstract class NewItemForm extends Form {
|
||||||
m_emptyLabel.setIdAttr("empty_label");
|
m_emptyLabel.setIdAttr("empty_label");
|
||||||
panel.add(m_emptyLabel);
|
panel.add(m_emptyLabel);
|
||||||
|
|
||||||
m_createLabel = new Label(globalize("cms.ui.authoring.create_new"), false);
|
m_createLabel = new Label((String)globalize("cms.ui.authoring.create_new").localize(), false);
|
||||||
m_createLabel.setIdAttr("create_label");
|
m_createLabel.setIdAttr("create_label");
|
||||||
panel.add(m_createLabel);
|
panel.add(m_createLabel);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -291,7 +291,11 @@ public class ContentSectionContainer extends CMSContainer {
|
||||||
// add columns to the table
|
// add columns to the table
|
||||||
TableColumnModel columnModel = getColumnModel();
|
TableColumnModel columnModel = getColumnModel();
|
||||||
|
|
||||||
TableColumn contentSectionColumn = new TableColumn(colNo, COLUMN_SECTION);
|
//TableColumn contentSectionColumn = new TableColumn(colNo, COLUMN_SECTION);
|
||||||
|
TableColumn contentSectionColumn = new TableColumn(
|
||||||
|
colNo,
|
||||||
|
(String)GlobalizationUtil.globalize("cms.ui.contentcenter.section").localize(),
|
||||||
|
COLUMN_SECTION);
|
||||||
contentSectionColumn.setCellRenderer(new AdminURLTableCellRenderer());
|
contentSectionColumn.setCellRenderer(new AdminURLTableCellRenderer());
|
||||||
columnModel.add(contentSectionColumn);
|
columnModel.add(contentSectionColumn);
|
||||||
|
|
||||||
|
|
@ -302,7 +306,10 @@ public class ContentSectionContainer extends CMSContainer {
|
||||||
columnModel.add(locationColumn);
|
columnModel.add(locationColumn);
|
||||||
}
|
}
|
||||||
|
|
||||||
TableColumn actionColumn = new TableColumn(colNo ++, COLUMN_ACTION);
|
TableColumn actionColumn = new TableColumn(
|
||||||
|
colNo++,
|
||||||
|
(String)GlobalizationUtil.globalize("cms.ui.contentcenter.action").localize(),
|
||||||
|
COLUMN_ACTION);
|
||||||
actionColumn.setCellRenderer(new ActionTableCellRenderer());
|
actionColumn.setCellRenderer(new ActionTableCellRenderer());
|
||||||
columnModel.add(actionColumn);
|
columnModel.add(actionColumn);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -145,8 +145,14 @@ public class MainPage extends CMSApplicationPage implements ActionListener {
|
||||||
protected TabbedPane createTabbedPane() {
|
protected TabbedPane createTabbedPane() {
|
||||||
TabbedPane pane = new TabbedPane();
|
TabbedPane pane = new TabbedPane();
|
||||||
pane.setClassAttr(XSL_CLASS);
|
pane.setClassAttr(XSL_CLASS);
|
||||||
addToPane(pane, "Tasks/Sections", getTasksPane(m_typeSel, m_sectionSel));
|
//addToPane(pane, "Tasks/Sections", getTasksPane(m_typeSel, m_sectionSel));
|
||||||
addToPane(pane, "Search", getSearchPane());
|
//addToPane(pane, "Search", getSearchPane());
|
||||||
|
addToPane(pane,
|
||||||
|
(String)GlobalizationUtil.globalize("cms.ui.contentcenter.mainpage.taskssections").localize(),
|
||||||
|
getTasksPane(m_typeSel, m_sectionSel));
|
||||||
|
addToPane(pane,
|
||||||
|
(String)GlobalizationUtil.globalize("cms.ui.contentcenter.mainpage.search").localize(),
|
||||||
|
getSearchPane());
|
||||||
pane.addActionListener(this);
|
pane.addActionListener(this);
|
||||||
return pane;
|
return pane;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@
|
||||||
*/
|
*/
|
||||||
package com.arsdigita.cms.ui.contentcenter;
|
package com.arsdigita.cms.ui.contentcenter;
|
||||||
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
@ -90,13 +89,10 @@ public class TasksPanel extends CMSContainer {
|
||||||
|
|
||||||
private static Logger s_log =
|
private static Logger s_log =
|
||||||
Logger.getLogger(TasksPanel.class);
|
Logger.getLogger(TasksPanel.class);
|
||||||
|
|
||||||
// The default number of rows to show
|
// The default number of rows to show
|
||||||
private static final int DEFAULT_MAX_ROWS = 15;
|
private static final int DEFAULT_MAX_ROWS = 15;
|
||||||
|
|
||||||
// Number of tasks to show
|
// Number of tasks to show
|
||||||
private final int m_maxRows;
|
private final int m_maxRows;
|
||||||
|
|
||||||
private TaskList m_taskList;
|
private TaskList m_taskList;
|
||||||
private ActionLink m_viewAllLink;
|
private ActionLink m_viewAllLink;
|
||||||
private ActionLink m_viewShortLink;
|
private ActionLink m_viewShortLink;
|
||||||
|
|
@ -106,12 +102,10 @@ public class TasksPanel extends CMSContainer {
|
||||||
private StringParameter m_sortDirectionParam;
|
private StringParameter m_sortDirectionParam;
|
||||||
private StringParameter m_sortTypeParam;
|
private StringParameter m_sortTypeParam;
|
||||||
private StringParameter m_lockFilterParam;
|
private StringParameter m_lockFilterParam;
|
||||||
|
|
||||||
// control link variable
|
// control link variable
|
||||||
private static final String TASK_ACTION = "taskAction";
|
private static final String TASK_ACTION = "taskAction";
|
||||||
private static final String SORT_DOWN = "sortActionUp";
|
private static final String SORT_DOWN = "sortActionUp";
|
||||||
private static final String SORT_UP = "sortActionDown";
|
private static final String SORT_UP = "sortActionDown";
|
||||||
|
|
||||||
private static final String LOCK_FILTER_TYPE = "lockFilterType";
|
private static final String LOCK_FILTER_TYPE = "lockFilterType";
|
||||||
private static final String SORT_TYPE = "sortType";
|
private static final String SORT_TYPE = "sortType";
|
||||||
private static final String SORT_DIRECTION = "sortDirection";
|
private static final String SORT_DIRECTION = "sortDirection";
|
||||||
|
|
@ -121,13 +115,11 @@ public class TasksPanel extends CMSContainer {
|
||||||
private static final String SORT_TITLE = "title";
|
private static final String SORT_TITLE = "title";
|
||||||
private static final String SORT_USER = "user";
|
private static final String SORT_USER = "user";
|
||||||
private static final String SORT_WORKFLOW = "workflow";
|
private static final String SORT_WORKFLOW = "workflow";
|
||||||
|
|
||||||
// IMAGES
|
// IMAGES
|
||||||
public static final String UP_ARROW_IMAGE =
|
public static final String UP_ARROW_IMAGE =
|
||||||
"/themes/heirfloom/images/gray-triangle-up.gif";
|
"/themes/heirfloom/images/gray-triangle-up.gif";
|
||||||
public static final String DOWN_ARROW_IMAGE =
|
public static final String DOWN_ARROW_IMAGE =
|
||||||
"/themes/heirfloom/images/gray-triangle-down.gif";
|
"/themes/heirfloom/images/gray-triangle-down.gif";
|
||||||
|
|
||||||
// CREATION PANE CONSTANTS
|
// CREATION PANE CONSTANTS
|
||||||
private Label m_selectorLabel;
|
private Label m_selectorLabel;
|
||||||
private CreationSelector m_selector;
|
private CreationSelector m_selector;
|
||||||
|
|
@ -168,7 +160,6 @@ public class TasksPanel extends CMSContainer {
|
||||||
addComponents();
|
addComponents();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the components to this tasks panel
|
* Adds the components to this tasks panel
|
||||||
**/
|
**/
|
||||||
|
|
@ -197,6 +188,7 @@ public class TasksPanel extends CMSContainer {
|
||||||
t.setFontWeight(Label.BOLD);
|
t.setFontWeight(Label.BOLD);
|
||||||
t.setClassAttr("creationLabel");
|
t.setClassAttr("creationLabel");
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
m_selectorLabel.setClassAttr("creationLabel");
|
m_selectorLabel.setClassAttr("creationLabel");
|
||||||
m_creationPane.add(m_selectorLabel);
|
m_creationPane.add(m_selectorLabel);
|
||||||
|
|
@ -222,36 +214,37 @@ public class TasksPanel extends CMSContainer {
|
||||||
m_sections.setVisible(s, !isSelected);
|
m_sections.setVisible(s, !isSelected);
|
||||||
m_creationPane.setVisible(s, isSelected);
|
m_creationPane.setVisible(s, isSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
m_viewLockLink = new ActionLink(new
|
m_viewLockLink = new ActionLink(new Label(GlobalizationUtil
|
||||||
Label(GlobalizationUtil
|
|
||||||
.globalize("cms.ui.workflow.task.view_locked")));
|
.globalize("cms.ui.workflow.task.view_locked")));
|
||||||
m_viewLockLink.addActionListener(new ActionListener() {
|
m_viewLockLink.addActionListener(new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
PageState ps = e.getPageState();
|
PageState ps = e.getPageState();
|
||||||
ps.setValue(m_lockFilterParam, "lock");
|
ps.setValue(m_lockFilterParam, "lock");
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
m_viewUnlockLink = new ActionLink(new
|
m_viewUnlockLink = new ActionLink(new Label(GlobalizationUtil
|
||||||
Label(GlobalizationUtil
|
|
||||||
.globalize("cms.ui.workflow.task.view_unlocked")));
|
.globalize("cms.ui.workflow.task.view_unlocked")));
|
||||||
m_viewUnlockLink.addActionListener(new ActionListener() {
|
m_viewUnlockLink.addActionListener(new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
PageState ps = e.getPageState();
|
PageState ps = e.getPageState();
|
||||||
ps.setValue(m_lockFilterParam, "unlock");
|
ps.setValue(m_lockFilterParam, "unlock");
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
m_viewAllLockLink = new ActionLink(new
|
m_viewAllLockLink = new ActionLink(new Label(GlobalizationUtil
|
||||||
Label(GlobalizationUtil
|
|
||||||
.globalize("cms.ui.workflow.task.view_all")));
|
.globalize("cms.ui.workflow.task.view_all")));
|
||||||
m_viewAllLockLink.addActionListener(new ActionListener() {
|
m_viewAllLockLink.addActionListener(new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
PageState ps = e.getPageState();
|
PageState ps = e.getPageState();
|
||||||
ps.setValue(m_lockFilterParam, "all");
|
ps.setValue(m_lockFilterParam, "all");
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
m_viewLockLabel = new Label(GlobalizationUtil
|
m_viewLockLabel = new Label(GlobalizationUtil
|
||||||
|
|
@ -331,6 +324,7 @@ public class TasksPanel extends CMSContainer {
|
||||||
m_viewAllLockLink.setVisible(state, false);
|
m_viewAllLockLink.setVisible(state, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -347,7 +341,6 @@ public class TasksPanel extends CMSContainer {
|
||||||
return m_paginator;
|
return m_paginator;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the bebop List component to display the tasks
|
* Returns the bebop List component to display the tasks
|
||||||
**/
|
**/
|
||||||
|
|
@ -433,6 +426,7 @@ public class TasksPanel extends CMSContainer {
|
||||||
|
|
||||||
private static class RootFolderSelectionModel
|
private static class RootFolderSelectionModel
|
||||||
extends FolderSelectionModel {
|
extends FolderSelectionModel {
|
||||||
|
|
||||||
ACSObjectSelectionModel m_sectionSel;
|
ACSObjectSelectionModel m_sectionSel;
|
||||||
|
|
||||||
public RootFolderSelectionModel(ACSObjectSelectionModel sectionSel) {
|
public RootFolderSelectionModel(ACSObjectSelectionModel sectionSel) {
|
||||||
|
|
@ -454,9 +448,11 @@ public class TasksPanel extends CMSContainer {
|
||||||
}
|
}
|
||||||
return sec.getRootFolder().getID();
|
return sec.getRootFolder().getID();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class TasksPaginationModelBuilder implements PaginationModelBuilder {
|
private class TasksPaginationModelBuilder implements PaginationModelBuilder {
|
||||||
|
|
||||||
public int getTotalSize(Paginator paginator,
|
public int getTotalSize(Paginator paginator,
|
||||||
PageState state) {
|
PageState state) {
|
||||||
return numberTasksForUser(state);
|
return numberTasksForUser(state);
|
||||||
|
|
@ -465,13 +461,13 @@ public class TasksPanel extends CMSContainer {
|
||||||
public boolean isVisible(PageState state) {
|
public boolean isVisible(PageState state) {
|
||||||
return numberTasksForUser(state) > m_maxRows;
|
return numberTasksForUser(state) > m_maxRows;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class TaskList extends SimpleComponent {
|
private class TaskList extends SimpleComponent {
|
||||||
|
|
||||||
private final static String QUERY_NAME =
|
private final static String QUERY_NAME =
|
||||||
"com.arsdigita.cms.workflow.getEnabledUserTasks";
|
"com.arsdigita.cms.workflow.getEnabledUserTasks";
|
||||||
|
|
||||||
private boolean m_paginate = false;
|
private boolean m_paginate = false;
|
||||||
|
|
||||||
public TaskList(boolean paginate) {
|
public TaskList(boolean paginate) {
|
||||||
|
|
@ -498,6 +494,7 @@ public class TasksPanel extends CMSContainer {
|
||||||
DataQuery query = makeQuery(state);
|
DataQuery query = makeQuery(state);
|
||||||
return new Long(query.size());
|
return new Long(query.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -524,30 +521,21 @@ public class TasksPanel extends CMSContainer {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sortKey.equals(SORT_TITLE)) {
|
if (sortKey.equals(SORT_TITLE)) {
|
||||||
query.setOrder("lower(pageTitle) " + sortPostfix +
|
query.setOrder("lower(pageTitle) " + sortPostfix + ", lower(status) asc, dueDate desc");
|
||||||
", lower(status) asc, dueDate desc");
|
|
||||||
} else if (sortKey.equals(SORT_DATE)) {
|
} else if (sortKey.equals(SORT_DATE)) {
|
||||||
query.setOrder("dueDate " + sortPostfix +
|
query.setOrder("dueDate " + sortPostfix + ", lower(status) asc, lower(pageTitle) asc");
|
||||||
", lower(status) asc, lower(pageTitle) asc");
|
|
||||||
} else if (sortKey.equals(SORT_USER)) {
|
} else if (sortKey.equals(SORT_USER)) {
|
||||||
query.setOrder("lockingUserID " + sortPostfix +
|
query.setOrder("lockingUserID " + sortPostfix + ", lower(status) asc, dueDate desc "
|
||||||
", lower(status) asc, dueDate desc " +
|
+ ", lower(pageTitle) asc");
|
||||||
", lower(pageTitle) asc");
|
|
||||||
} else if (sortKey.equals(SORT_STATUS)) {
|
} else if (sortKey.equals(SORT_STATUS)) {
|
||||||
query.setOrder("lower(status) " + sortPostfix +
|
query.setOrder("lower(status) " + sortPostfix + ", dueDate desc " + ", lower(pageTitle) asc");
|
||||||
", dueDate desc " +
|
|
||||||
", lower(pageTitle) asc");
|
|
||||||
|
|
||||||
} else if (sortKey.equals(SORT_ACTION)) {
|
} else if (sortKey.equals(SORT_ACTION)) {
|
||||||
query.setOrder("taskType " + sortPostfix +
|
query.setOrder("taskType " + sortPostfix + ", lower(status) asc, dueDate desc "
|
||||||
", lower(status) asc, dueDate desc " +
|
+ ", lower(pageTitle) asc");
|
||||||
", lower(pageTitle) asc"
|
|
||||||
);
|
|
||||||
} else if (sortKey.equals(SORT_WORKFLOW)) {
|
} else if (sortKey.equals(SORT_WORKFLOW)) {
|
||||||
query.setOrder("processLabel " + sortPostfix +
|
query.setOrder("processLabel " + sortPostfix + ", lower(status) asc, dueDate desc "
|
||||||
", lower(status) asc, dueDate desc " +
|
+ ", lower(pageTitle) asc");
|
||||||
", lower(pageTitle) asc"
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HashMap sections = new HashMap();
|
HashMap sections = new HashMap();
|
||||||
|
|
@ -628,8 +616,7 @@ public class TasksPanel extends CMSContainer {
|
||||||
|
|
||||||
// m_actionLabel.generateXML(state, content);
|
// m_actionLabel.generateXML(state, content);
|
||||||
|
|
||||||
String[][] sortableHeaders =
|
String[][] sortableHeaders = {{SORT_TITLE, "cms.ui.workflow.task.item_title"},
|
||||||
{{SORT_TITLE, "cms.ui.workflow.task.item_title"},
|
|
||||||
{SORT_ACTION, "cms.ui.action"},
|
{SORT_ACTION, "cms.ui.action"},
|
||||||
{SORT_DATE, "cms.ui.tasks_due_date"},
|
{SORT_DATE, "cms.ui.tasks_due_date"},
|
||||||
{SORT_STATUS, "cms.ui.tasks_status_no_colon"},
|
{SORT_STATUS, "cms.ui.tasks_status_no_colon"},
|
||||||
|
|
@ -644,7 +631,7 @@ public class TasksPanel extends CMSContainer {
|
||||||
state.setControlEvent(this, SORT_UP, header);
|
state.setControlEvent(this, SORT_UP, header);
|
||||||
}
|
}
|
||||||
SimpleContainer container = new SimpleContainer();
|
SimpleContainer container = new SimpleContainer();
|
||||||
container.add(new Label(GlobalizationUtil.globalize(labelKey)));
|
container.add(new Label((String)GlobalizationUtil.globalize(labelKey).localize()));
|
||||||
if (header.equals(sortKey)) {
|
if (header.equals(sortKey)) {
|
||||||
String imageURLStub = null;
|
String imageURLStub = null;
|
||||||
if (SORT_UP.equals(sortDirection)) {
|
if (SORT_UP.equals(sortDirection)) {
|
||||||
|
|
@ -664,7 +651,6 @@ public class TasksPanel extends CMSContainer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void respond(PageState state) throws ServletException {
|
public void respond(PageState state) throws ServletException {
|
||||||
String key = state.getControlEventName();
|
String key = state.getControlEventName();
|
||||||
|
|
@ -715,10 +701,10 @@ public class TasksPanel extends CMSContainer {
|
||||||
throw new ServletException("Unknown control event: " + key);
|
throw new ServletException("Unknown control event: " + key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Filter getTaskFilter(CMSTaskType taskType
|
private static Filter getTaskFilter(CMSTaskType taskType, Party party, FilterFactory factory) {
|
||||||
, Party party, FilterFactory factory) {
|
|
||||||
PrivilegeDescriptor privilege;
|
PrivilegeDescriptor privilege;
|
||||||
String queryName;
|
String queryName;
|
||||||
String queryType;
|
String queryType;
|
||||||
|
|
@ -727,5 +713,5 @@ public class TasksPanel extends CMSContainer {
|
||||||
|
|
||||||
return PermissionService.getFilterQuery(factory, "itemID", privilege, partyOID);
|
return PermissionService.getFilterQuery(factory, "itemID", privilege, partyOID);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,10 @@ import com.arsdigita.globalization.GlobalizedMessage;
|
||||||
public class GlobalizationUtil {
|
public class GlobalizationUtil {
|
||||||
|
|
||||||
/** */
|
/** */
|
||||||
|
// public static String s_bundleName =
|
||||||
|
// "com.arsdigita.cms.util.CMSResourceBundle";
|
||||||
public static String s_bundleName =
|
public static String s_bundleName =
|
||||||
"com.arsdigita.cms.util.CMSResourceBundle";
|
"com.arsdigita.cms.CMSResources";
|
||||||
|
|
||||||
public static GlobalizedMessage globalize(String key) {
|
public static GlobalizedMessage globalize(String key) {
|
||||||
return new GlobalizedMessage(key, getBundleName());
|
return new GlobalizedMessage(key, getBundleName());
|
||||||
|
|
|
||||||
|
|
@ -44,8 +44,7 @@ import org.apache.log4j.Logger;
|
||||||
*/
|
*/
|
||||||
public class GlobalizedMessage {
|
public class GlobalizedMessage {
|
||||||
|
|
||||||
private static final Logger s_cat =
|
private static final Logger LOGGER = Logger.getLogger(GlobalizedMessage.class.getName());
|
||||||
Logger.getLogger(GlobalizedMessage.class.getName());
|
|
||||||
private String m_key = "";
|
private String m_key = "";
|
||||||
private String m_bundleName = "";
|
private String m_bundleName = "";
|
||||||
private Object[] m_args = null;
|
private Object[] m_args = null;
|
||||||
|
|
@ -60,7 +59,7 @@ public class GlobalizedMessage {
|
||||||
*
|
*
|
||||||
* @param key The key to use to look up a message in the ResourceBundle.
|
* @param key The key to use to look up a message in the ResourceBundle.
|
||||||
*/
|
*/
|
||||||
public GlobalizedMessage(String key) {
|
public GlobalizedMessage(final String key) {
|
||||||
setKey(key);
|
setKey(key);
|
||||||
setBundleName();
|
setBundleName();
|
||||||
}
|
}
|
||||||
|
|
@ -74,7 +73,7 @@ public class GlobalizedMessage {
|
||||||
* @param key The key to use to look up a message in the ResourceBundle.
|
* @param key The key to use to look up a message in the ResourceBundle.
|
||||||
* @param bundleName The base name of the target ResourceBundle.
|
* @param bundleName The base name of the target ResourceBundle.
|
||||||
*/
|
*/
|
||||||
public GlobalizedMessage(String key, String bundleName) {
|
public GlobalizedMessage(final String key, final String bundleName) {
|
||||||
setKey(key);
|
setKey(key);
|
||||||
setBundleName(bundleName);
|
setBundleName(bundleName);
|
||||||
}
|
}
|
||||||
|
|
@ -92,7 +91,7 @@ public class GlobalizedMessage {
|
||||||
* @param args An Object[] of arguments to interpolate into the retrieved
|
* @param args An Object[] of arguments to interpolate into the retrieved
|
||||||
* message.
|
* message.
|
||||||
*/
|
*/
|
||||||
public GlobalizedMessage(String key, Object[] args) {
|
public GlobalizedMessage(final String key, final Object[] args) {
|
||||||
this(key);
|
this(key);
|
||||||
setArgs(args);
|
setArgs(args);
|
||||||
}
|
}
|
||||||
|
|
@ -109,7 +108,7 @@ public class GlobalizedMessage {
|
||||||
* @param args An Object[] of arguments to interpolate into the retrieved
|
* @param args An Object[] of arguments to interpolate into the retrieved
|
||||||
* message.
|
* message.
|
||||||
*/
|
*/
|
||||||
public GlobalizedMessage(String key, String bundleName, Object[] args) {
|
public GlobalizedMessage(final String key, final String bundleName, final Object[] args) {
|
||||||
this(key, bundleName);
|
this(key, bundleName);
|
||||||
setArgs(args);
|
setArgs(args);
|
||||||
}
|
}
|
||||||
|
|
@ -129,7 +128,7 @@ public class GlobalizedMessage {
|
||||||
*
|
*
|
||||||
* @param key
|
* @param key
|
||||||
*/
|
*/
|
||||||
private void setKey(String key) {
|
private void setKey(final String key) {
|
||||||
if (key == null || key.length() == 0) {
|
if (key == null || key.length() == 0) {
|
||||||
throw new IllegalArgumentException("key cannot be empty.");
|
throw new IllegalArgumentException("key cannot be empty.");
|
||||||
}
|
}
|
||||||
|
|
@ -146,7 +145,7 @@ public class GlobalizedMessage {
|
||||||
setBundleName("com.arsdigita.dummy.DummyResources");
|
setBundleName("com.arsdigita.dummy.DummyResources");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setBundleName(String bundleName) {
|
private void setBundleName(final String bundleName) {
|
||||||
if (bundleName == null || bundleName.length() == 0) {
|
if (bundleName == null || bundleName.length() == 0) {
|
||||||
throw new IllegalArgumentException("bundleName cannot be empty.");
|
throw new IllegalArgumentException("bundleName cannot be empty.");
|
||||||
}
|
}
|
||||||
|
|
@ -154,7 +153,7 @@ public class GlobalizedMessage {
|
||||||
m_bundleName = bundleName;
|
m_bundleName = bundleName;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setArgs(Object[] args) {
|
private void setArgs(final Object[] args) {
|
||||||
m_args = args;
|
m_args = args;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -192,7 +191,7 @@ public class GlobalizedMessage {
|
||||||
* java.text.MessageFormat class.
|
* java.text.MessageFormat class.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @param req The current running request.
|
* @param request The current running request.
|
||||||
*
|
*
|
||||||
* @return Object Represents the localized version of this
|
* @return Object Represents the localized version of this
|
||||||
* message. The reason this method returns an Object and
|
* message. The reason this method returns an Object and
|
||||||
|
|
@ -201,7 +200,7 @@ public class GlobalizedMessage {
|
||||||
* bites. Maybe this class should have been called
|
* bites. Maybe this class should have been called
|
||||||
* GlobalizedObject?
|
* GlobalizedObject?
|
||||||
*/
|
*/
|
||||||
public Object localize(HttpServletRequest request) {
|
public Object localize(final HttpServletRequest request) {
|
||||||
return localize(com.arsdigita.globalization.GlobalizationHelper.getNegotiatedLocale());
|
return localize(com.arsdigita.globalization.GlobalizationHelper.getNegotiatedLocale());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -226,34 +225,54 @@ public class GlobalizedMessage {
|
||||||
* bites. Maybe this class should have been called
|
* bites. Maybe this class should have been called
|
||||||
* GlobalizedObject?
|
* GlobalizedObject?
|
||||||
*/
|
*/
|
||||||
public Object localize(Locale locale) {
|
public Object localize(final Locale locale) {
|
||||||
Object message = getKey();
|
Object message = getKey();
|
||||||
ResourceBundle rb = null;
|
ResourceBundle resourceBundle = null;
|
||||||
|
|
||||||
if (locale == null) {
|
if (locale == null) {
|
||||||
throw new IllegalArgumentException("locale cannot be null.");
|
throw new IllegalArgumentException("locale cannot be null.");
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
rb = ResourceBundle.getBundle(getBundleName(), locale);
|
// jensp 2013-03-16:
|
||||||
|
// Previously, ResourceBundle#getBundle(String, Locale) was called here. That was causing problems under
|
||||||
|
// specific circumstances:
|
||||||
|
// - The browser of the user is set the english (britain), languge code en_GB
|
||||||
|
// - The system language of the server running CCM is set to german (de_DE).
|
||||||
|
// In this case, the ResourceBundle.getBundle method first tries to find a ResourceBundle for en_GB, than
|
||||||
|
// for en. Usally, both attempts will fail because the english labels are in the default bundle
|
||||||
|
// (no language code). The standard search algorithm of ResourceBundle#getBundle than falls back to the
|
||||||
|
// system language (the language of the SERVER), which is German is this case. Therefore the content center
|
||||||
|
// was shown with german texts...
|
||||||
|
// Luckily, there is a simple solution: The search algorithm is implemented in the inner class
|
||||||
|
// ResourceBundle.Control. There are also variants of the getBundle method which allow it to pass an
|
||||||
|
// custom implementation of ResouceBundle.Control. Also ResourceBundle.Control has a factory method which
|
||||||
|
// offers an implementation of ResourceBundle.Control which does not use the system language.
|
||||||
|
// Therefore, all what was to do was to change the call of getBundle here from
|
||||||
|
// ResourceBundle#getBundle(String, Locale) to ResourceBundle#getBundle(String, Locale, ResourceControl)
|
||||||
|
// with ResourceBundle.Control.getNoFallbackControl(List<String>).
|
||||||
|
resourceBundle = ResourceBundle.getBundle(
|
||||||
|
getBundleName(),
|
||||||
|
locale,
|
||||||
|
ResourceBundle.Control.getNoFallbackControl(ResourceBundle.Control.FORMAT_PROPERTIES));
|
||||||
} catch (MissingResourceException e) {
|
} catch (MissingResourceException e) {
|
||||||
if (s_cat.isDebugEnabled()) {
|
if (LOGGER.isDebugEnabled()) {
|
||||||
s_cat.debug(
|
LOGGER.debug(
|
||||||
"ResourceBundle " + getBundleName() + " was not found.");
|
"ResourceBundle " + getBundleName() + " was not found.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (rb != null) {
|
if (resourceBundle == null) {
|
||||||
message = rb.getObject(getKey());
|
if (LOGGER.isDebugEnabled()) {
|
||||||
} else {
|
LOGGER.debug("No ResourceBundle available");
|
||||||
if (s_cat.isDebugEnabled()) {
|
|
||||||
s_cat.debug("No ResourceBundle available");
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
message = resourceBundle.getObject(getKey());
|
||||||
}
|
}
|
||||||
} catch (MissingResourceException e2) {
|
} catch (MissingResourceException e2) {
|
||||||
if (s_cat.isDebugEnabled()) {
|
if (LOGGER.isDebugEnabled()) {
|
||||||
s_cat.debug(getKey() + " was not found in the ResourceBundle.");
|
LOGGER.debug(getKey() + " was not found in the ResourceBundle.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -282,7 +301,9 @@ public class GlobalizedMessage {
|
||||||
*
|
*
|
||||||
* @return The contents in String form for debugging.
|
* @return The contents in String form for debugging.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return getBundleName() + "#" + getKey();
|
return getBundleName() + "#" + getKey();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue