git-svn-id: https://svn.libreccm.org/ccm/trunk@477 8810af33-2d31-482b-a856-94f89814c4df

master
jensp 2010-07-12 15:50:27 +00:00
parent 5de5304e4f
commit fd85d47191
3 changed files with 14 additions and 7 deletions

View File

@ -34,17 +34,18 @@ public class GenericOrganizationalUnitAddChildForm extends BasicItemForm {
public GenericOrganizationalUnitAddChildForm(ItemSelectionModel itemModel) { public GenericOrganizationalUnitAddChildForm(ItemSelectionModel itemModel) {
super("ChildAddForm", itemModel); super("ChildAddForm", itemModel);
m_itemModel = itemModel;
} }
@Override @Override
protected void addWidgets() { protected void addWidgets() {
add(new Label((String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.genericorgaunit.select_child").localize())); add(new Label((String) ContenttypesGlobalizationUtil.globalize(
this.m_itemSearch = new ItemSearchWidget(ITEM_SEARCH, ContentType.findByAssociatedObjectType(GenericOrganizationalUnit.BASE_DATA_OBJECT_TYPE)); "cms.contenttypes.ui.genericorgaunit.select_child").localize()));
this.m_itemSearch = new ItemSearchWidget(ITEM_SEARCH, ContentType.
findByAssociatedObjectType(
GenericOrganizationalUnit.BASE_DATA_OBJECT_TYPE));
add(this.m_itemSearch); add(this.m_itemSearch);
} }
@Override @Override
public void init(FormSectionEvent fse) throws FormProcessException { public void init(FormSectionEvent fse) throws FormProcessException {
FormData data = fse.getFormData(); FormData data = fse.getFormData();
@ -57,10 +58,12 @@ public class GenericOrganizationalUnitAddChildForm extends BasicItemForm {
public void process(FormSectionEvent fse) throws FormProcessException { public void process(FormSectionEvent fse) throws FormProcessException {
FormData data = fse.getFormData(); FormData data = fse.getFormData();
PageState state = fse.getPageState(); PageState state = fse.getPageState();
GenericOrganizationalUnit parent = (GenericOrganizationalUnit) getItemSelectionModel().getSelectedObject(state); GenericOrganizationalUnit parent = (GenericOrganizationalUnit) getItemSelectionModel().
getSelectedObject(state);
if (!(this.getSaveCancelSection().getCancelButton().isSelected(state))) { if (!(this.getSaveCancelSection().getCancelButton().isSelected(state))) {
parent.addOrgaUnitChildren((GenericOrganizationalUnit) data.get(ITEM_SEARCH)); parent.addOrgaUnitChildren((GenericOrganizationalUnit) data.get(
ITEM_SEARCH));
} }
init(fse); init(fse);

View File

@ -5,6 +5,7 @@
package com.arsdigita.cms.contenttypes.ui; package com.arsdigita.cms.contenttypes.ui;
import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.GenericOrganizationalUnit;
import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil; import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.cms.ui.authoring.BasicItemForm; import com.arsdigita.cms.ui.authoring.BasicItemForm;

View File

@ -60,3 +60,6 @@ log4j.logger.com.arsdigita.packaging.Loader=INFO
# For debugging all queries run by persistence # For debugging all queries run by persistence
#log4j.logger.com.redhat.persistence.engine.rdbms.RDBMSEngine=INFO #log4j.logger.com.redhat.persistence.engine.rdbms.RDBMSEngine=INFO
log4j.logger.com.arsdigita.cms.contenttypes.ui.GenericOrganizationalUnitAddChildForm=DEBUG
log4j.logger.com.arsdigita.cms.contenttypes.ui.OrganizationChildrenPropertiesStep=DEBUG