git-svn-id: https://svn.libreccm.org/ccm/trunk@477 8810af33-2d31-482b-a856-94f89814c4df
parent
5de5304e4f
commit
fd85d47191
|
|
@ -34,17 +34,18 @@ public class GenericOrganizationalUnitAddChildForm extends BasicItemForm {
|
|||
|
||||
public GenericOrganizationalUnitAddChildForm(ItemSelectionModel itemModel) {
|
||||
super("ChildAddForm", itemModel);
|
||||
m_itemModel = itemModel;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addWidgets() {
|
||||
add(new Label((String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.genericorgaunit.select_child").localize()));
|
||||
this.m_itemSearch = new ItemSearchWidget(ITEM_SEARCH, ContentType.findByAssociatedObjectType(GenericOrganizationalUnit.BASE_DATA_OBJECT_TYPE));
|
||||
add(new Label((String) ContenttypesGlobalizationUtil.globalize(
|
||||
"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);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void init(FormSectionEvent fse) throws FormProcessException {
|
||||
FormData data = fse.getFormData();
|
||||
|
|
@ -57,10 +58,12 @@ public class GenericOrganizationalUnitAddChildForm extends BasicItemForm {
|
|||
public void process(FormSectionEvent fse) throws FormProcessException {
|
||||
FormData data = fse.getFormData();
|
||||
PageState state = fse.getPageState();
|
||||
GenericOrganizationalUnit parent = (GenericOrganizationalUnit) getItemSelectionModel().getSelectedObject(state);
|
||||
GenericOrganizationalUnit parent = (GenericOrganizationalUnit) getItemSelectionModel().
|
||||
getSelectedObject(state);
|
||||
|
||||
if (!(this.getSaveCancelSection().getCancelButton().isSelected(state))) {
|
||||
parent.addOrgaUnitChildren((GenericOrganizationalUnit) data.get(ITEM_SEARCH));
|
||||
parent.addOrgaUnitChildren((GenericOrganizationalUnit) data.get(
|
||||
ITEM_SEARCH));
|
||||
}
|
||||
|
||||
init(fse);
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
package com.arsdigita.cms.contenttypes.ui;
|
||||
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.cms.contenttypes.GenericOrganizationalUnit;
|
||||
import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil;
|
||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||
import com.arsdigita.cms.ui.authoring.BasicItemForm;
|
||||
|
|
|
|||
|
|
@ -60,3 +60,6 @@ log4j.logger.com.arsdigita.packaging.Loader=INFO
|
|||
|
||||
# For debugging all queries run by persistence
|
||||
#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
|
||||
Loading…
Reference in New Issue