Diverse Formatierungen und Dokumentation. Sprachumschaltung funktioniert jetzt komplett, solange die property-Dateien benutzt werden.
git-svn-id: https://svn.libreccm.org/ccm/trunk@2099 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
2a5d642762
commit
7a33e117e8
|
|
@ -35,7 +35,6 @@ public class EventGlobalizationUtil {
|
|||
/** Name of the Java class to handle Event's globalisation. */
|
||||
final public static String BUNDLE_NAME =
|
||||
"com.arsdigita.cms.contenttypes.util.EventResourceBundle";
|
||||
|
||||
|
||||
/**
|
||||
* This returns a globalized message using the type specific bundle,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import java.util.PropertyResourceBundle;
|
|||
* @author Shashin Shinde (sshinde@redhat.com)
|
||||
*/
|
||||
public class EventResourceBundle extends ChainedResourceBundle
|
||||
implements CMSGlobalized {
|
||||
implements CMSGlobalized {
|
||||
|
||||
public final static String EVENT_BUNDLE_NAME =
|
||||
"com.arsdigita.cms.contenttypes.EventResources";
|
||||
|
|
|
|||
|
|
@ -1099,7 +1099,6 @@ cms.ui.image_upload=Bild hochladen
|
|||
cms.ui.images=Bilder
|
||||
cms.ui.search.create.select_close=Item ausw\u00e4hlen und schlie\u00dfen
|
||||
cms.ui.search.create.select_edit=Item ausw\u00e4hlen und weiter bearbeiten
|
||||
|
||||
cms.ui.clear=Zur\u00fccksetzen
|
||||
cms.ui.type.minimum_number_of_values_bigger_than_maximum_number_of_values=Maximaler Wert kleiner als minimaler Wert
|
||||
cms.ui.type.minimummaximum_number_of_values_cannot_be_negative=Keine negativen Werte erlaubt
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,61 +1,61 @@
|
|||
cms.tasks.ui.content_center=Content Centre
|
||||
cms.ui.content_center=Content Centre
|
||||
cms.ui.lifecycles=Lifecycles
|
||||
cms.ui.unknownRole=
|
||||
cms.ui.unknownRole=Unknown role
|
||||
cms.ui.unknownStatus=Unknown status
|
||||
cms.contenttypes.ui.genericorgaunit.persons.status=Status
|
||||
cms.contenttypes.shared.basic_properties.title=
|
||||
cms.ui.edit_assoc=
|
||||
cms.ui.type.permissions=
|
||||
cms.ui.type.permissions.role=
|
||||
cms.ui.type.permissions_can_use=
|
||||
cms.ui.type.permission.action=
|
||||
cms.ui.type.permissions.can_use.yes=
|
||||
cms.ui.type.permissions.actions.restrict_to_this_role=
|
||||
cms.ui.type.permissions.can_use.grant=
|
||||
cms.ui.type.permissions.actions.revoke=
|
||||
cms.ui.type.permissions.can_use.no=
|
||||
cms.contenttypes.ui.person.set_alias=
|
||||
cms.contenttypes.ui.person.delete_alias=
|
||||
cms.contenttypes.ui.person.alias.none=
|
||||
cms.contenttypes.ui.person.alias=
|
||||
cms.contenttypes.ui.person.alias.select=
|
||||
cms.contenttypes.ui.contact.alias.select.add=
|
||||
cms.contenttypes.person.alias.select.wrong_type=
|
||||
cms.contenttypes.person.alias.select.same_as_person=
|
||||
cms.contenttypes.person.alias.select.no_suitable_language_variant=
|
||||
cms.ui.item.lifecycle.do=
|
||||
cms.ui.item.lifecycle.do.not_authorized=
|
||||
cms.ui.item.lifecycle.publish_locked=
|
||||
cms.ui.item.lifecycle.publish_locked.update=
|
||||
cms.ui.lifecycle.publish.error=
|
||||
cms.ui.delete_confirmation=
|
||||
cms.ui.lifecycle.details.last_published=
|
||||
cms.ui.item_search.flat.filter=
|
||||
cms.ui.item_search.flat.no_items=
|
||||
cms.contenttypes.shared.basic_properties.title=Basic Properties
|
||||
cms.ui.edit_assoc=Edit association
|
||||
cms.ui.type.permissions=Permissions (Create new items of this type)
|
||||
cms.ui.type.permissions.role=Role
|
||||
cms.ui.type.permissions_can_use=Use this type
|
||||
cms.ui.type.permission.action=Action
|
||||
cms.ui.type.permissions.can_use.yes=Yes
|
||||
cms.ui.type.permissions.actions.restrict_to_this_role=Restrict to this role
|
||||
cms.ui.type.permissions.can_use.grant=Grant permissions to this role
|
||||
cms.ui.type.permissions.actions.revoke=Revoke permission
|
||||
cms.ui.type.permissions.can_use.no=No
|
||||
cms.contenttypes.ui.person.set_alias=Set former name
|
||||
cms.contenttypes.ui.person.delete_alias=Remove former name
|
||||
cms.contenttypes.ui.person.alias.none=No former name
|
||||
cms.contenttypes.ui.person.alias=Former name
|
||||
cms.contenttypes.ui.person.alias.select=Select former name
|
||||
cms.contenttypes.ui.contact.alias.select.add=Select former name
|
||||
cms.contenttypes.person.alias.select.wrong_type=No person selected
|
||||
cms.contenttypes.person.alias.select.same_as_person=Selected person is the same as the current person. Alias and person can't be identical.
|
||||
cms.contenttypes.person.alias.select.no_suitable_language_variant=The selected item has no suitable language variant.
|
||||
cms.ui.item.lifecycle.do=Execute
|
||||
cms.ui.item.lifecycle.do.not_authorized=Your not authorized to publish this item.
|
||||
cms.ui.item.lifecycle.publish_locked=This content item is being (re-)published
|
||||
cms.ui.item.lifecycle.publish_locked.update=Update
|
||||
cms.ui.lifecycle.publish.error=An error occured while publishing this item.The system administrator has been notified about this problem. This item will stay locked until the lock is removed by the system administrator manually.
|
||||
cms.ui.delete_confirmation=Permanently delete this item?
|
||||
cms.ui.lifecycle.details.last_published=Item last (re-)published
|
||||
cms.ui.item_search.flat.filter=Filter list
|
||||
cms.ui.item_search.flat.no_items=No items matching the filter found
|
||||
cms.ui.item_search.flat.title=Title
|
||||
cms.ui.item_search.flat.place=Place
|
||||
cms.ui.item_search.flat.type=Type
|
||||
cms.ui.item_search.flatBrowse=Select item
|
||||
cms.ui.category.undeletable=
|
||||
cms.ui.item_search.flat.filter.submit=
|
||||
cms.ui.item_search.selected=
|
||||
cms.ui.item_search.create=
|
||||
cms.ui.item_search.create.folder_select=
|
||||
cms.ui.category.undeletable=This category can't be deleted.
|
||||
cms.ui.item_search.flat.filter.submit=Filter
|
||||
cms.ui.item_search.selected=Selected content item (id)
|
||||
cms.ui.item_search.create=Create new
|
||||
cms.ui.item_search.create.folder_select=Select folder
|
||||
cms.ui.image_library=Image Library
|
||||
cms.ui.image_upload=Upload Image
|
||||
cms.ui.images=Images
|
||||
cms.ui.search.create.select_close=
|
||||
cms.ui.search.create.select_edit=
|
||||
cms.ui.search.create.select_close=Select item and close
|
||||
cms.ui.search.create.select_edit=Select item and edit
|
||||
|
||||
cms.ui.clear=
|
||||
cms.ui.item_search.create.folder_missing=
|
||||
cms.ui.clear=Clear
|
||||
cms.ui.item_search.create.folder_missing=No folder selected
|
||||
cms.ui.images_links=
|
||||
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=
|
||||
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
|
||||
|
|
|
|||
|
|
@ -535,58 +535,58 @@ yes=Oui
|
|||
cms.contenttypes.ui.address.uri=URL (TRANSLATE THIS cms.contenttypes.ui.address.uri)
|
||||
cms.contenttypes.ui.address.email.desc=Means of contacting someone at this address (TRANSLATE THIS cms.contenttypes.ui.address.email.desc)
|
||||
cms.contenttypes.ui.address.uri.desc=A URL to find more information about this Address (TRANSLATE THIS cms.contenttypes.ui.address.uri.desc)
|
||||
cms.contenttypes.shared.basic_properties.title=
|
||||
cms.contenttypes.shared.basic_properties.title=Basic Properties
|
||||
cms.ui.edit_assoc=
|
||||
cms.ui.type.permissions=
|
||||
cms.ui.type.permissions.role=
|
||||
cms.ui.type.permissions_can_use=
|
||||
cms.ui.type.permission.action=
|
||||
cms.ui.type.permissions.can_use.yes=
|
||||
cms.ui.type.permissions.actions.restrict_to_this_role=
|
||||
cms.ui.type.permissions.can_use.grant=
|
||||
cms.ui.type.permissions.actions.revoke=
|
||||
cms.ui.type.permissions.can_use.no=
|
||||
cms.contenttypes.ui.person.set_alias=
|
||||
cms.contenttypes.ui.person.delete_alias=
|
||||
cms.contenttypes.ui.person.alias.none=
|
||||
cms.contenttypes.ui.person.alias=
|
||||
cms.contenttypes.ui.person.alias.select=
|
||||
cms.contenttypes.ui.contact.alias.select.add=
|
||||
cms.contenttypes.person.alias.select.wrong_type=
|
||||
cms.contenttypes.person.alias.select.same_as_person=
|
||||
cms.contenttypes.person.alias.select.no_suitable_language_variant=
|
||||
cms.ui.item.lifecycle.do=
|
||||
cms.ui.item.lifecycle.do.not_authorized=
|
||||
cms.ui.item.lifecycle.publish_locked=
|
||||
cms.ui.item.lifecycle.publish_locked.update=
|
||||
cms.ui.lifecycle.publish.error=
|
||||
cms.ui.type.permissions=Permissions (Create new items of this type)
|
||||
cms.ui.type.permissions.role=Role
|
||||
cms.ui.type.permissions_can_use=Use this type
|
||||
cms.ui.type.permission.action=Action
|
||||
cms.ui.type.permissions.can_use.yes=Yes
|
||||
cms.ui.type.permissions.actions.restrict_to_this_role=Restrict to this role
|
||||
cms.ui.type.permissions.can_use.grant=Grant permissions to this role
|
||||
cms.ui.type.permissions.actions.revoke=Revoke permission
|
||||
cms.ui.type.permissions.can_use.no=No
|
||||
cms.contenttypes.ui.person.set_alias=Set former name
|
||||
cms.contenttypes.ui.person.delete_alias=Remove former name
|
||||
cms.contenttypes.ui.person.alias.none=No former name
|
||||
cms.contenttypes.ui.person.alias=Former name
|
||||
cms.contenttypes.ui.person.alias.select=Select former name
|
||||
cms.contenttypes.ui.contact.alias.select.add=Select former name
|
||||
cms.contenttypes.person.alias.select.wrong_type=No person selected
|
||||
cms.contenttypes.person.alias.select.same_as_person=Selected person is the same as the current person. Alias and person can't be identical.
|
||||
cms.contenttypes.person.alias.select.no_suitable_language_variant=The selected item has no suitable language variant.
|
||||
cms.ui.item.lifecycle.do=Execute
|
||||
cms.ui.item.lifecycle.do.not_authorized=Your not authorized to publish this item.
|
||||
cms.ui.item.lifecycle.publish_locked=This content item is being (re-)published
|
||||
cms.ui.item.lifecycle.publish_locked.update=Update
|
||||
cms.ui.lifecycle.publish.error=An error occured while publishing this item.The system administrator has been notified about this problem. This item will stay locked until the lock is removed by the system administrator manually.
|
||||
cms.ui.delete_confirmation=
|
||||
cms.ui.lifecycle.details.last_published=
|
||||
cms.ui.item_search.flat.filter=
|
||||
cms.ui.item_search.flat.no_items=
|
||||
cms.ui.lifecycle.details.last_published=Item last (re-)published
|
||||
cms.ui.item_search.flat.filter=Filter list
|
||||
cms.ui.item_search.flat.no_items=No items matching the filter found
|
||||
cms.ui.item_search.flat.title=Title
|
||||
cms.ui.item_search.flat.place=Place
|
||||
cms.ui.item_search.flat.type=Type
|
||||
cms.ui.item_search.flatBrowse=Select item
|
||||
cms.ui.category.undeletable=
|
||||
cms.ui.item_search.flat.filter.submit=
|
||||
cms.ui.item_search.selected=
|
||||
cms.ui.item_search.create=
|
||||
cms.ui.item_search.create.folder_select=
|
||||
cms.ui.category.undeletable=This category can't be deleted.
|
||||
cms.ui.item_search.flat.filter.submit=Filter
|
||||
cms.ui.item_search.selected=Selected content item (id)
|
||||
cms.ui.item_search.create=Create new
|
||||
cms.ui.item_search.create.folder_select=Select folder
|
||||
cms.ui.image_library=Image Library
|
||||
cms.ui.image_upload=Upload Image
|
||||
cms.ui.images=Images
|
||||
cms.ui.search.create.select_close=
|
||||
cms.ui.search.create.select_edit=
|
||||
cms.ui.search.create.select_close=Select item and close
|
||||
cms.ui.search.create.select_edit=Select item and edit
|
||||
|
||||
cms.ui.clear=
|
||||
cms.ui.item_search.create.folder_missing=
|
||||
cms.ui.item_search.create.folder_missing=No folder selected
|
||||
cms.ui.images_links=
|
||||
cms.contenttypes.ui.person.alias.delete.label=
|
||||
cms.contenttypes.ui.person.alias.delete.label=Delete
|
||||
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.set_home_folder=Set as home folder
|
||||
cms.ui.go_to_home_folder=
|
||||
cms.ui.no_home_folder_selected=
|
||||
cms.ui.no_home_folder_selected=No home folder selected
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@ public class BrowsePane extends LayoutPanel implements Resettable {
|
|||
(new SubmissionListener());
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void register(Page page) {
|
||||
super.register(page);
|
||||
|
||||
|
|
@ -93,6 +94,7 @@ public class BrowsePane extends LayoutPanel implements Resettable {
|
|||
page.addActionListener(new TreeListener());
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void reset(PageState state) {
|
||||
super.reset(state);
|
||||
|
||||
|
|
|
|||
|
|
@ -143,30 +143,50 @@ public class MainPage extends CMSApplicationPage implements ActionListener {
|
|||
* or to add additional tabs after the default CMS tabs are added.
|
||||
**/
|
||||
protected TabbedPane createTabbedPane() {
|
||||
TabbedPane pane = new TabbedPane();
|
||||
pane.setClassAttr(XSL_CLASS);
|
||||
//addToPane(pane, "Tasks/Sections", getTasksPane(m_typeSel, m_sectionSel));
|
||||
//addToPane(pane, "Search", getSearchPane());
|
||||
addToPane(pane,
|
||||
(String)GlobalizationUtil.globalize("cms.ui.contentcenter.mainpage.taskssections").localize(),
|
||||
TabbedPane tabbedPane = new TabbedPane();
|
||||
tabbedPane.setClassAttr(XSL_CLASS);
|
||||
Label taskLabel = new Label(GlobalizationUtil
|
||||
.globalize("cms.ui.contentcenter.mainpage.taskssections"));
|
||||
Label searchLabel = new Label(GlobalizationUtil
|
||||
.globalize("cms.ui.contentcenter.mainpage.search"));
|
||||
addToPane(tabbedPane,
|
||||
taskLabel,
|
||||
getTasksPane(m_typeSel, m_sectionSel));
|
||||
addToPane(pane,
|
||||
(String)GlobalizationUtil.globalize("cms.ui.contentcenter.mainpage.search").localize(),
|
||||
addToPane(tabbedPane,
|
||||
// searchLabel,
|
||||
new Label(GlobalizationUtil.globalize(
|
||||
"cms.ui.contentcenter.mainpage.search")),
|
||||
getSearchPane());
|
||||
pane.addActionListener(this);
|
||||
return pane;
|
||||
tabbedPane.addActionListener(this);
|
||||
return tabbedPane;
|
||||
}
|
||||
|
||||
|
||||
// /**
|
||||
// * Adds the specified component, with the specified tab name, to the
|
||||
// * tabbed pane only if it is not null.
|
||||
// *
|
||||
// * @param pane The pane to which to add the tab
|
||||
// * @param tabName The name of the tab if it's added
|
||||
// * @param comp The component to add to the pane
|
||||
// * @deprecated refactor to use addToPane(Label, Component) instead to
|
||||
// * enable localized tab strips.
|
||||
// */
|
||||
// protected void addToPane(TabbedPane pane, String tabName, Component comp) {
|
||||
// if (comp != null) {
|
||||
// pane.addTab(tabName, comp);
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* Adds the specified component, with the specified tab name, to the
|
||||
* tabbed pane only if it is not null.
|
||||
* Adds the specified component, with the specified Label as tab name,
|
||||
* to the tabbed pane only if it is not null.
|
||||
*
|
||||
* @param pane The pane to which to add the tab
|
||||
* @param tabName The name of the tab if it's added
|
||||
* @param comp The component to add to the pane
|
||||
**/
|
||||
protected void addToPane(TabbedPane pane, String tabName, Component comp) {
|
||||
*/
|
||||
protected void addToPane(TabbedPane pane, Label tabName, Component comp) {
|
||||
if (comp != null) {
|
||||
pane.addTab(tabName, comp);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -250,7 +250,8 @@ public class MainPage extends CMSApplicationPage implements ActionListener {
|
|||
if (m_searchPane == null) {
|
||||
m_searchPane = new LayoutPanel();
|
||||
m_searchPane.setLeft(new SimpleComponent());
|
||||
m_searchPane.setBody(new ItemSearch(ContentItem.DRAFT, CMS.getConfig().limitToContentSection()));
|
||||
m_searchPane.setBody(new ItemSearch(ContentItem.DRAFT,
|
||||
CMS.getConfig().limitToContentSection()));
|
||||
}
|
||||
return m_searchPane;
|
||||
}
|
||||
|
|
@ -356,6 +357,12 @@ public class MainPage extends CMSApplicationPage implements ActionListener {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param pane
|
||||
* @param key
|
||||
* @param tab
|
||||
*/
|
||||
private void tab(final TabbedPane pane,
|
||||
final String key,
|
||||
final Component tab) {
|
||||
|
|
|
|||
|
|
@ -31,31 +31,45 @@ import com.arsdigita.globalization.GlobalizedMessage;
|
|||
*/
|
||||
public class GlobalizationUtil {
|
||||
|
||||
/** */
|
||||
/** Name of the Java class to handle CMS's globalisation. */
|
||||
// public static String s_bundleName =
|
||||
// "com.arsdigita.cms.util.CMSResourceBundle";
|
||||
public static String s_bundleName =
|
||||
"com.arsdigita.cms.CMSResources";
|
||||
|
||||
public static GlobalizedMessage globalize(String key) {
|
||||
return new GlobalizedMessage(key, getBundleName());
|
||||
}
|
||||
/**
|
||||
* This returns a globalized message using the package specific bundle,
|
||||
* provided by method getBundleName()
|
||||
*/
|
||||
public static GlobalizedMessage globalize(String key) {
|
||||
return new GlobalizedMessage(key, getBundleName());
|
||||
}
|
||||
|
||||
public static GlobalizedMessage globalize(String key, Object[] args) {
|
||||
return new GlobalizedMessage(key, getBundleName(), args);
|
||||
}
|
||||
|
||||
public static String getBundleName() {
|
||||
return s_bundleName;
|
||||
}
|
||||
/**
|
||||
* Returns a globalized message object, using the package specific bundle,
|
||||
* provided by method getBundleName(). Also takes in an Object[] of
|
||||
* arguments to interpolate into the retrieved message using the
|
||||
* MessageFormat class.
|
||||
*/
|
||||
public static GlobalizedMessage globalize(String key, Object[] args) {
|
||||
return new GlobalizedMessage(key, getBundleName(), args);
|
||||
}
|
||||
|
||||
/*
|
||||
* Not a part of API. Otherwise it would need to be properly synchronized.
|
||||
* Only meant be used to override resource keys in CMSResources
|
||||
* by a custom application, in Initializer.
|
||||
*/
|
||||
public static void internalSetBundleName(String bundleName) {
|
||||
s_bundleName = bundleName;
|
||||
}
|
||||
/**
|
||||
* Returns the name of the package specific resource bundle.
|
||||
* @return
|
||||
*/
|
||||
public static String getBundleName() {
|
||||
return s_bundleName;
|
||||
}
|
||||
|
||||
/*
|
||||
* Not a part of API. Otherwise it would need to be properly synchronized.
|
||||
* Only meant be used to override resource keys in CMSResources
|
||||
* by a custom application, in Initializer.
|
||||
*/
|
||||
public static void internalSetBundleName(String bundleName) {
|
||||
s_bundleName = bundleName;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,21 +18,18 @@
|
|||
*/
|
||||
package com.arsdigita.bebop;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
|
||||
import com.arsdigita.bebop.parameters.IntegerParameter;
|
||||
import com.arsdigita.util.Assert;
|
||||
import com.arsdigita.bebop.event.ActionEvent;
|
||||
import com.arsdigita.bebop.event.ActionListener;
|
||||
import com.arsdigita.xml.Element;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/* FIXME: Add methods for using images in the tab strip */
|
||||
|
|
|
|||
|
|
@ -18,32 +18,30 @@
|
|||
*/
|
||||
package com.arsdigita.globalization;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Enumeration;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.ResourceBundle;
|
||||
import java.util.PropertyResourceBundle;
|
||||
import java.util.ListResourceBundle;
|
||||
import java.util.Enumeration;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.PropertyResourceBundle;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
/**
|
||||
* This is a ResourceBundle that allows the developer to add additional
|
||||
* ChainableResourceBundles to it. Then, when the bundle is asked for
|
||||
* a key, it checks the ChainableResourceBundles in the order that they
|
||||
* were added. A typical use would be something like this
|
||||
* <pre><code>
|
||||
* public class EventResourceBundle extends ChainedResourceBundle {
|
||||
* public EventResourceBundle() {
|
||||
* super();
|
||||
* addBundle((PropertyResourceBundle)getBundle("EVENT_BUNDLE_NAME"));
|
||||
* addBundle((PropertyResourceBundle)getBundle("DEFAULT_BUNDLE_NAME"));
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* </code></pre>
|
||||
**/
|
||||
* This is a ResourceBundle that allows the developer to add additional
|
||||
* ChainableResourceBundles to it. Then, when the bundle is asked for
|
||||
* a key, it checks the ChainableResourceBundles in the order that they
|
||||
* were added. A typical use would be something like this
|
||||
* <pre><code>
|
||||
* public class EventResourceBundle extends ChainedResourceBundle {
|
||||
* public EventResourceBundle() {
|
||||
* super();
|
||||
* addBundle((PropertyResourceBundle)getBundle("EVENT_BUNDLE_NAME"));
|
||||
* addBundle((PropertyResourceBundle)getBundle("DEFAULT_BUNDLE_NAME"));
|
||||
* }
|
||||
* }
|
||||
* </code></pre>
|
||||
*/
|
||||
public class ChainedResourceBundle extends ResourceBundle {
|
||||
|
||||
private List m_bundles;
|
||||
|
|
@ -92,7 +90,7 @@ public class ChainedResourceBundle extends ResourceBundle {
|
|||
}
|
||||
|
||||
private void putBundle(ChainableResourceBundle bundle) {
|
||||
m_bundles.add(0,bundle);
|
||||
m_bundles.add(0,bundle);
|
||||
Enumeration enu = bundle.getKeys();
|
||||
List bundleKeys = new LinkedList();
|
||||
while (enu.hasMoreElements()) {
|
||||
|
|
@ -129,7 +127,8 @@ public class ChainedResourceBundle extends ResourceBundle {
|
|||
* an internal PropertyResourceBundle.
|
||||
*/
|
||||
private class ChainablePropertyResourceBundle
|
||||
implements ChainableResourceBundle {
|
||||
implements ChainableResourceBundle {
|
||||
|
||||
private PropertyResourceBundle m_wrappedBundle = null;
|
||||
|
||||
/**
|
||||
|
|
@ -159,7 +158,8 @@ public class ChainedResourceBundle extends ResourceBundle {
|
|||
* an internal PropertyResourceBundle.
|
||||
*/
|
||||
private class ChainableListResourceBundle
|
||||
implements ChainableResourceBundle {
|
||||
implements ChainableResourceBundle {
|
||||
|
||||
private ListResourceBundle m_wrappedBundle = null;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -16,153 +16,178 @@ import com.arsdigita.bebop.parameters.ParameterModel;
|
|||
import com.arsdigita.bebop.parameters.StringParameter;
|
||||
import com.arsdigita.domain.DataObjectNotFoundException;
|
||||
import com.arsdigita.kernel.Group;
|
||||
import com.arsdigita.ui.admin.GroupAdministrationTab;
|
||||
|
||||
/**
|
||||
* Series of screens required for adding existing groups as subgroups -
|
||||
* based on existing functionality for adding permissions to a folder in content/admin
|
||||
* @version $Id: ExistingGroupAddPane.java,v 1.4 2004/06/21 11:34:03 cgyg9330 Exp $ by $Author: cgyg9330 $
|
||||
* based on existing functionality for adding permissions to a folder in
|
||||
* content/admin
|
||||
* @version $Id: ExistingGroupAddPane.java,v 1.4 2004/06/21 11:34:03 cgyg9330 Exp $
|
||||
*/
|
||||
public class ExistingGroupAddPane extends SimpleContainer implements AdminConstants {
|
||||
|
||||
private static final Logger s_log = Logger.getLogger(ExistingGroupAddPane.class);
|
||||
|
||||
private ParameterModel searchString = new StringParameter(SEARCH_QUERY);
|
||||
|
||||
|
||||
private GroupSearchForm groupSearchForm;
|
||||
private SimpleContainer selectGroupsPanel;
|
||||
private SimpleContainer noResultsPanel;
|
||||
private Tree groupTree;
|
||||
private GroupAdministrationTab parentPage;
|
||||
|
||||
private RequestLocal parentGroup = new RequestLocal() {
|
||||
protected Object initialValue(PageState ps) {
|
||||
String key = (String) groupTree.getSelectedKey(ps);
|
||||
private static final Logger s_log = Logger.getLogger(ExistingGroupAddPane.class);
|
||||
|
||||
Group group = null;
|
||||
|
||||
if (key != null) {
|
||||
BigDecimal id = new BigDecimal(key);
|
||||
|
||||
try {
|
||||
group = new Group(id);
|
||||
} catch (DataObjectNotFoundException exc) {
|
||||
// Silently ignore if group does not
|
||||
// exist.
|
||||
}
|
||||
}
|
||||
return group;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
public ExistingGroupAddPane(Tree groupTree, GroupAdministrationTab parentPage) {
|
||||
this.groupTree = groupTree;
|
||||
this.parentPage = parentPage;
|
||||
|
||||
}
|
||||
private ParameterModel searchString = new StringParameter(SEARCH_QUERY);
|
||||
|
||||
|
||||
public void register(Page p) {
|
||||
super.register(p);
|
||||
add(getGroupSearchForm());
|
||||
add(getSelectGroupsPanel());
|
||||
add(getNoSearchResultPanel());
|
||||
private GroupSearchForm groupSearchForm;
|
||||
private SimpleContainer selectGroupsPanel;
|
||||
private SimpleContainer noResultsPanel;
|
||||
private Tree groupTree;
|
||||
private GroupAdministrationTab parentPage;
|
||||
|
||||
// set initial visibility of components
|
||||
p.setVisibleDefault(getGroupSearchForm(), true);
|
||||
p.setVisibleDefault(getSelectGroupsPanel(), false);
|
||||
p.setVisibleDefault(getNoSearchResultPanel(),false);
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private RequestLocal parentGroup = new RequestLocal() {
|
||||
@Override
|
||||
protected Object initialValue(PageState ps) {
|
||||
String key = (String) groupTree.getSelectedKey(ps);
|
||||
|
||||
p.addGlobalStateParam(searchString);
|
||||
Group group = null;
|
||||
|
||||
if (key != null) {
|
||||
BigDecimal id = new BigDecimal(key);
|
||||
|
||||
try {
|
||||
group = new Group(id);
|
||||
} catch (DataObjectNotFoundException exc) {
|
||||
// Silently ignore if group does not
|
||||
// exist.
|
||||
}
|
||||
}
|
||||
return group;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* @param groupTree
|
||||
* @param parentPage
|
||||
*/
|
||||
public ExistingGroupAddPane(Tree groupTree, GroupAdministrationTab parentPage) {
|
||||
this.groupTree = groupTree;
|
||||
this.parentPage = parentPage;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param p
|
||||
*/
|
||||
@Override
|
||||
public void register(Page p) {
|
||||
super.register(p);
|
||||
add(getGroupSearchForm());
|
||||
add(getSelectGroupsPanel());
|
||||
add(getNoSearchResultPanel());
|
||||
|
||||
// set initial visibility of components
|
||||
p.setVisibleDefault(getGroupSearchForm(), true);
|
||||
p.setVisibleDefault(getSelectGroupsPanel(), false);
|
||||
p.setVisibleDefault(getNoSearchResultPanel(),false);
|
||||
|
||||
p.addGlobalStateParam(searchString);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public GroupSearchForm getGroupSearchForm() {
|
||||
|
||||
if (groupSearchForm==null) {
|
||||
groupSearchForm = new GroupSearchForm(this);
|
||||
}
|
||||
return groupSearchForm;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a panel with a set of checkboxes for groups
|
||||
* fulfilling search criteria
|
||||
*/
|
||||
public SimpleContainer getSelectGroupsPanel() {
|
||||
if (selectGroupsPanel==null) {
|
||||
SelectGroups selectGroups = new SelectGroups(this, getGroupSearchForm());
|
||||
selectGroupsPanel = selectGroups.getPanel();
|
||||
}
|
||||
return selectGroupsPanel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a bebop panel indicating that the user search
|
||||
* yielded no results.
|
||||
*/
|
||||
public SimpleContainer getNoSearchResultPanel() {
|
||||
if (noResultsPanel==null) {
|
||||
Label errorMsg = GROUP_NO_RESULTS;
|
||||
errorMsg.setClassAttr("errorBullet");
|
||||
BoxPanel bp = new BoxPanel();
|
||||
bp.add(errorMsg);
|
||||
bp.add(new GroupSearchForm(this));
|
||||
noResultsPanel = new SegmentedPanel().addSegment(new Label(" "),bp);
|
||||
}
|
||||
return noResultsPanel;
|
||||
}
|
||||
|
||||
|
||||
public GroupSearchForm getGroupSearchForm() {
|
||||
if (groupSearchForm==null) {
|
||||
groupSearchForm = new GroupSearchForm(this);
|
||||
}
|
||||
return groupSearchForm;
|
||||
}
|
||||
/**
|
||||
* Shows panel with no results to user search.
|
||||
*/
|
||||
public void showNoResults(PageState s) {
|
||||
getGroupSearchForm().setVisible(s, false);
|
||||
getSelectGroupsPanel().setVisible(s,false);
|
||||
getNoSearchResultPanel().setVisible(s, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a panel with a set of checkboxes for groups
|
||||
* fulfilling search criteria
|
||||
*/
|
||||
public SimpleContainer getSelectGroupsPanel() {
|
||||
if (selectGroupsPanel==null) {
|
||||
SelectGroups selectGroups = new SelectGroups(this, getGroupSearchForm());
|
||||
selectGroupsPanel = selectGroups.getPanel();
|
||||
}
|
||||
return selectGroupsPanel;
|
||||
}
|
||||
/**
|
||||
* Show the select groups to add as subgroups panel
|
||||
*/
|
||||
public void showGroups(PageState s) {
|
||||
getGroupSearchForm().setVisible(s, false);
|
||||
getSelectGroupsPanel().setVisible(s,true);
|
||||
getNoSearchResultPanel().setVisible(s, false);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns a bebop panel indicating that the user search
|
||||
* yielded no results.
|
||||
*/
|
||||
/**
|
||||
*
|
||||
* show the search form
|
||||
*/
|
||||
public void showSearch(PageState s) {
|
||||
getGroupSearchForm().setVisible(s, true);
|
||||
getSelectGroupsPanel().setVisible(s,false);
|
||||
getNoSearchResultPanel().setVisible(s, false);
|
||||
}
|
||||
|
||||
public SimpleContainer getNoSearchResultPanel() {
|
||||
if (noResultsPanel==null) {
|
||||
Label errorMsg = GROUP_NO_RESULTS;
|
||||
errorMsg.setClassAttr("errorBullet");
|
||||
BoxPanel bp = new BoxPanel();
|
||||
bp.add(errorMsg);
|
||||
bp.add(new GroupSearchForm(this));
|
||||
noResultsPanel = new SegmentedPanel().addSegment(new Label(" "),bp);
|
||||
}
|
||||
return noResultsPanel;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public ParameterModel getSearchString() {
|
||||
return searchString;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public GroupAdministrationTab getParentPage() {
|
||||
return parentPage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows panel with no results to user search.
|
||||
*/
|
||||
|
||||
public void showNoResults(PageState s) {
|
||||
getGroupSearchForm().setVisible(s, false);
|
||||
getSelectGroupsPanel().setVisible(s,false);
|
||||
getNoSearchResultPanel().setVisible(s, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the select groups to add as subgroups panel
|
||||
*/
|
||||
|
||||
public void showGroups(PageState s) {
|
||||
getGroupSearchForm().setVisible(s, false);
|
||||
getSelectGroupsPanel().setVisible(s,true);
|
||||
getNoSearchResultPanel().setVisible(s, false);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* show the search form
|
||||
*/
|
||||
public void showSearch(PageState s) {
|
||||
getGroupSearchForm().setVisible(s, true);
|
||||
getSelectGroupsPanel().setVisible(s,false);
|
||||
getNoSearchResultPanel().setVisible(s, false);
|
||||
}
|
||||
|
||||
public ParameterModel getSearchString() {
|
||||
return searchString;
|
||||
}
|
||||
|
||||
public GroupAdministrationTab getParentPage() {
|
||||
return parentPage;
|
||||
}
|
||||
|
||||
public Group getParentGroup(PageState ps) {
|
||||
return (Group) parentGroup.get(ps);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param ps
|
||||
* @return
|
||||
*/
|
||||
public Group getParentGroup(PageState ps) {
|
||||
return (Group) parentGroup.get(ps);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,7 +74,6 @@ class GroupAddForm extends GroupForm implements AdminConstants,
|
|||
// Parent group does not exist.
|
||||
// This is normal behavior with the new group
|
||||
// been add with no parent.
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -394,6 +394,7 @@ class GroupAdministrationTab extends BoxPanel
|
|||
private Component buildMemberListPanel(SegmentedPanel main) {
|
||||
|
||||
BoxPanel body = new BoxPanel() {
|
||||
@Override
|
||||
public void register(Page p) {
|
||||
p.setVisibleDefault(m_subMemberSearch, false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue