- GlossaryItem verwendete falschen GlobalizationUtil (aus anderem Modul)
- Einbindung WebLog in Applications-Tab git-svn-id: https://svn.libreccm.org/ccm/trunk@2239 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
1a5f8672d6
commit
27aed37070
|
|
@ -20,24 +20,24 @@ package com.arsdigita.cms.contenttypes.ui;
|
|||
|
||||
import com.arsdigita.bebop.Component;
|
||||
import com.arsdigita.cms.contenttypes.GlossaryItem;
|
||||
import com.arsdigita.cms.contenttypes.util.FormSectionGlobalizationUtil;
|
||||
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.cms.contenttypes.util.GlossaryGlobalizationUtil;
|
||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
||||
import com.arsdigita.cms.util.GlobalizationUtil;
|
||||
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
|
||||
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
||||
|
||||
|
||||
/**
|
||||
* Authoring step to edit the simple attributes of the GlossaryItem content
|
||||
* type (and its subclasses).
|
||||
* Authoring step to edit the simple attributes of the GlossaryItem content type (and its subclasses).
|
||||
*/
|
||||
public class GlossaryItemPropertiesStep
|
||||
extends SimpleEditStep {
|
||||
|
||||
/** The name of the editing sheet added to this step */
|
||||
/**
|
||||
* The name of the editing sheet added to this step
|
||||
*/
|
||||
public static final String EDIT_SHEET_NAME = "edit";
|
||||
|
||||
public GlossaryItemPropertiesStep(ItemSelectionModel itemModel,
|
||||
|
|
@ -57,24 +57,23 @@ public class GlossaryItemPropertiesStep
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns a component that displays the properties of the
|
||||
* GlossaryItem specified by the ItemSelectionModel passed in.
|
||||
* Returns a component that displays the properties of the GlossaryItem specified by the ItemSelectionModel passed
|
||||
* in.
|
||||
*
|
||||
* @param itemModel The ItemSelectionModel to use
|
||||
* @pre itemModel != null
|
||||
* @return A component to display the state of the basic properties
|
||||
* of the release
|
||||
* @return A component to display the state of the basic properties of the release
|
||||
*/
|
||||
public static Component getGlossaryDomainObjectPropertySheet( ItemSelectionModel
|
||||
itemModel ) {
|
||||
public static Component getGlossaryDomainObjectPropertySheet(ItemSelectionModel itemModel) {
|
||||
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
|
||||
|
||||
sheet.add(FormSectionGlobalizationUtil
|
||||
sheet.add(GlossaryGlobalizationUtil
|
||||
.globalize("cms.contenttypes.ui.glossary.term"),
|
||||
GlossaryItem.TITLE);
|
||||
sheet.add(GlobalizationUtil
|
||||
sheet.add(GlossaryGlobalizationUtil
|
||||
.globalize("cms.contenttypes.ui.name"),
|
||||
GlossaryItem.NAME);
|
||||
sheet.add(FormSectionGlobalizationUtil
|
||||
sheet.add(GlossaryGlobalizationUtil
|
||||
.globalize("cms.contenttypes.ui.glossary.definition"),
|
||||
GlossaryItem.DEFINITION);
|
||||
|
||||
|
|
|
|||
|
|
@ -24,14 +24,14 @@ import com.arsdigita.bebop.event.FormProcessListener;
|
|||
import com.arsdigita.bebop.event.FormSectionEvent;
|
||||
import com.arsdigita.bebop.event.FormSubmissionListener;
|
||||
import com.arsdigita.cms.contenttypes.GlossaryItem;
|
||||
import com.arsdigita.cms.contenttypes.util.FormSectionGlobalizationUtil;
|
||||
import com.arsdigita.cms.contenttypes.util.GlossaryGlobalizationUtil;
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
||||
import com.arsdigita.globalization.GlobalizedMessage;
|
||||
|
||||
/**
|
||||
* Form to edit the basic properties of an GlossaryItem. This form can be
|
||||
* extended to create forms for GlossaryItem subclasses.
|
||||
* Form to edit the basic properties of an GlossaryItem. This form can be extended to create forms for GlossaryItem
|
||||
* subclasses.
|
||||
*/
|
||||
public class GlossaryItemPropertyForm extends BasicPageForm
|
||||
implements FormProcessListener,
|
||||
|
|
@ -39,31 +39,32 @@ public class GlossaryItemPropertyForm extends BasicPageForm
|
|||
FormSubmissionListener {
|
||||
|
||||
private GlossaryItemPropertiesStep m_step;
|
||||
|
||||
/** parameter names */
|
||||
/**
|
||||
* parameter names
|
||||
*/
|
||||
public static final String DEFINITION = "definition";
|
||||
|
||||
/** Name of this form */
|
||||
/**
|
||||
* Name of this form
|
||||
*/
|
||||
public static final String ID = "GlossaryItem_edit";
|
||||
|
||||
/**
|
||||
* Creates a new form to edit the GlossaryItem object specified by the item
|
||||
* selection model passed in.
|
||||
* Creates a new form to edit the GlossaryItem object specified by the item selection model passed in.
|
||||
*
|
||||
* @param itemModel The ItemSelectionModel to use to obtain the GlossaryItem to
|
||||
* work on
|
||||
**/
|
||||
* @param itemModel The ItemSelectionModel to use to obtain the GlossaryItem to work on
|
||||
*
|
||||
*/
|
||||
public GlossaryItemPropertyForm(ItemSelectionModel itemModel) {
|
||||
this(itemModel, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new form to edit the GlossaryItem object specified by the item
|
||||
* selection model passed in.
|
||||
* Creates a new form to edit the GlossaryItem object specified by the item selection model passed in.
|
||||
*
|
||||
* @param itemModel The ItemSelectionModel to use to obtain the GlossaryItem to
|
||||
* work on
|
||||
* @param itemModel The ItemSelectionModel to use to obtain the GlossaryItem to work on
|
||||
* @param step The GlossaryItemPropertiesStep which controls this form.
|
||||
**/
|
||||
*
|
||||
*/
|
||||
public GlossaryItemPropertyForm(ItemSelectionModel itemModel,
|
||||
GlossaryItemPropertiesStep step) {
|
||||
super(ID, itemModel);
|
||||
|
|
@ -71,14 +72,15 @@ public class GlossaryItemPropertyForm extends BasicPageForm
|
|||
addSubmissionListener(this);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Adds widgets to the form.
|
||||
*/
|
||||
@Override
|
||||
protected void addWidgets() {
|
||||
|
||||
/** Insert default widgets (title/name) */
|
||||
/**
|
||||
* Insert default widgets (title/name)
|
||||
*/
|
||||
super.addWidgets();
|
||||
|
||||
GlossaryItemWidgetBuilder builder = new GlossaryItemWidgetBuilder();
|
||||
|
|
@ -88,45 +90,48 @@ public class GlossaryItemPropertyForm extends BasicPageForm
|
|||
|
||||
/**
|
||||
* Replace the default Label ("Title") by a module specific one.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
protected GlobalizedMessage getTitleLabel() {
|
||||
return FormSectionGlobalizationUtil
|
||||
return GlossaryGlobalizationUtil
|
||||
.globalize("cms.contenttypes.ui.glossary.term");
|
||||
}
|
||||
|
||||
/** Form initialisation hook. Fills widgets with data. */
|
||||
/**
|
||||
* Form initialisation hook. Fills widgets with data.
|
||||
*/
|
||||
public void init(FormSectionEvent fse) {
|
||||
FormData data = fse.getFormData();
|
||||
GlossaryItem glossary_item
|
||||
= (GlossaryItem) super.initBasicWidgets( fse );
|
||||
GlossaryItem glossary_item = (GlossaryItem) super.initBasicWidgets(fse);
|
||||
|
||||
data.put(DEFINITION, glossary_item.getDefinition());
|
||||
}
|
||||
|
||||
/** Cancels streamlined editing. */
|
||||
/**
|
||||
* Cancels streamlined editing.
|
||||
*/
|
||||
public void submitted(FormSectionEvent fse) {
|
||||
if (m_step != null &&
|
||||
getSaveCancelSection().getCancelButton()
|
||||
if (m_step != null && getSaveCancelSection().getCancelButton()
|
||||
.isSelected(fse.getPageState())) {
|
||||
m_step.cancelStreamlinedCreation(fse.getPageState());
|
||||
}
|
||||
}
|
||||
|
||||
/** Form processing hook. Saves GlossaryItem object. */
|
||||
/**
|
||||
* Form processing hook. Saves GlossaryItem object.
|
||||
*/
|
||||
public void process(FormSectionEvent fse) {
|
||||
FormData data = fse.getFormData();
|
||||
|
||||
GlossaryItem glossary_item
|
||||
= (GlossaryItem) super.processBasicWidgets( fse );
|
||||
GlossaryItem glossary_item = (GlossaryItem) super.processBasicWidgets(fse);
|
||||
|
||||
// save only if save button was pressed
|
||||
if (glossary_item != null
|
||||
&& getSaveCancelSection().getSaveButton()
|
||||
.isSelected(fse.getPageState())) {
|
||||
glossary_item.setDefinition( (String)
|
||||
data.get( DEFINITION ) );
|
||||
glossary_item.setDefinition((String) data.get(DEFINITION));
|
||||
glossary_item.save();
|
||||
}
|
||||
if (m_step != null) {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import com.arsdigita.bebop.parameters.NotNullValidationListener;
|
|||
import com.arsdigita.bebop.util.BebopConstants;
|
||||
import com.arsdigita.cms.contenttypes.GlossaryItem;
|
||||
import com.arsdigita.cms.contenttypes.ui.authoring.GlossaryItemCreate;
|
||||
import com.arsdigita.cms.contenttypes.util.FormSectionGlobalizationUtil;
|
||||
import com.arsdigita.cms.contenttypes.util.GlossaryGlobalizationUtil;
|
||||
import com.arsdigita.cms.ui.CMSDHTMLEditor;
|
||||
|
||||
import static com.arsdigita.cms.contenttypes.ui.GlossaryItemPropertyForm.DEFINITION;
|
||||
|
|
@ -69,7 +69,7 @@ public class GlossaryItemWidgetBuilder {
|
|||
}
|
||||
|
||||
public Label makeDefinitionLabel() {
|
||||
return new Label(FormSectionGlobalizationUtil
|
||||
return new Label(GlossaryGlobalizationUtil
|
||||
.globalize("cms.contenttypes.ui.glossary.definition"));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import com.arsdigita.cms.contenttypes.ui.GlossaryItemWidgetBuilder;
|
|||
import com.arsdigita.cms.Folder;
|
||||
import com.arsdigita.cms.ContentBundle;
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.cms.contenttypes.util.FormSectionGlobalizationUtil;
|
||||
import com.arsdigita.cms.contenttypes.util.GlossaryGlobalizationUtil;
|
||||
import com.arsdigita.cms.ui.authoring.PageCreate;
|
||||
import com.arsdigita.cms.ui.authoring.CreationSelector;
|
||||
import com.arsdigita.globalization.GlobalizedMessage;
|
||||
|
|
@ -77,7 +77,7 @@ public class GlossaryItemCreate extends PageCreate {
|
|||
*/
|
||||
@Override
|
||||
protected GlobalizedMessage getTitleLabel() {
|
||||
return FormSectionGlobalizationUtil
|
||||
return GlossaryGlobalizationUtil
|
||||
.globalize("cms.contenttypes.ui.glossary.term");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
org.undp.weblog.WebLogAppManager
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* Copyright (c) 2013 Jens Pelzetter
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.undp.weblog;
|
||||
|
||||
import com.arsdigita.bebop.BoxPanel;
|
||||
import com.arsdigita.bebop.Label;
|
||||
import com.arsdigita.ui.admin.GlobalizationUtil;
|
||||
import com.arsdigita.ui.admin.applications.AbstractApplicationManager;
|
||||
import com.arsdigita.ui.admin.applications.ApplicationInstanceAwareContainer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class WebLogAppManager extends AbstractApplicationManager<WebLogApplication> {
|
||||
|
||||
public Class<WebLogApplication> getApplication() {
|
||||
return WebLogApplication.class;
|
||||
}
|
||||
|
||||
public ApplicationInstanceAwareContainer getApplicationAdminForm() {
|
||||
final ApplicationInstanceAwareContainer container = new ApplicationInstanceAwareContainer();
|
||||
|
||||
final BoxPanel panel = new BoxPanel(BoxPanel.VERTICAL);
|
||||
panel.add(new Label(GlobalizationUtil.globalize("ui.admin.applications.no_settings")));
|
||||
container.add(panel);
|
||||
|
||||
return container;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue