Kleine Korrekturen
git-svn-id: https://svn.libreccm.org/ccm/trunk@1761 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
4a4fc56df1
commit
2ff87520fb
|
|
@ -45,22 +45,22 @@ import java.util.HashSet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* abstract form for assigning categories to acs_objects. The assigned
|
* abstract form for assigning categories to acs_objects. The assigned
|
||||||
* categories are those specified by the category widget, which is
|
* categories are those specified by the category widget, which is
|
||||||
* retrieved by the concrete subclass' implementation of getCategoryWidget.
|
* retrieved by the concrete subclass' implementation of getCategoryWidget.
|
||||||
*
|
*
|
||||||
* The category widget may be an implementation of CategoryWidget, which
|
* The category widget may be an implementation of CategoryWidget, which
|
||||||
* generates a javascript tree of categories. Implementations need only
|
* generates a javascript tree of categories. Implementations need only
|
||||||
* specify an XML prefix and namespace.
|
* specify an XML prefix and namespace.
|
||||||
*
|
*
|
||||||
* The object that is to be assigned to the categories is specified
|
* The object that is to be assigned to the categories is specified
|
||||||
* by the concrete subclass' implentation of getObject
|
* by the concrete subclass' implentation of getObject
|
||||||
*
|
*
|
||||||
* @author chris.gilbert@westsussex.gov.uk
|
* @author chris.gilbert@westsussex.gov.uk
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
// this class has been abstracted out from the original cms specific category form
|
// this class has been abstracted out from the original cms specific category form
|
||||||
// in ccm-cms
|
// in ccm-cms
|
||||||
public abstract class ACSObjectCategoryForm extends Form {
|
public abstract class ACSObjectCategoryForm extends Form {
|
||||||
|
|
||||||
private Widget m_category;
|
private Widget m_category;
|
||||||
|
|
@ -111,10 +111,10 @@ public abstract class ACSObjectCategoryForm extends Form {
|
||||||
|
|
||||||
ACSObject object = getObject(state);
|
ACSObject object = getObject(state);
|
||||||
|
|
||||||
HashSet curSelectesdCat = new HashSet();
|
HashSet curSelectedCat = new HashSet();
|
||||||
CategoryCollection cats = new CategorizedObject(object).getParents();
|
CategoryCollection cats = new CategorizedObject(object).getParents();
|
||||||
while (cats.next()) {
|
while (cats.next()) {
|
||||||
curSelectesdCat.add(cats.getCategory().getID());
|
curSelectedCat.add(cats.getCategory().getID());
|
||||||
}
|
}
|
||||||
|
|
||||||
BigDecimal[] ids = (BigDecimal[]) m_category.getValue(state);
|
BigDecimal[] ids = (BigDecimal[]) m_category.getValue(state);
|
||||||
|
|
@ -123,7 +123,7 @@ public abstract class ACSObjectCategoryForm extends Form {
|
||||||
new OID(Category.BASE_DATA_OBJECT_TYPE,
|
new OID(Category.BASE_DATA_OBJECT_TYPE,
|
||||||
ids[i]));
|
ids[i]));
|
||||||
|
|
||||||
if(!curSelectesdCat.contains(ids[i])) {
|
if(!curSelectedCat.contains(ids[i])) {
|
||||||
cat.addChild(object);
|
cat.addChild(object);
|
||||||
} else {
|
} else {
|
||||||
cat.removeChild(object);
|
cat.removeChild(object);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue