Update of /cvsroot/cobricks/cobricks2/src/org/cobricks/category
In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv19053
Modified Files:
Category.java CategoryPresenter.java
Log Message:
Index: CategoryPresenter.java
===================================================================
RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/category/CategoryPresenter.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- CategoryPresenter.java 2 May 2006 11:55:41 -0000 1.17
+++ CategoryPresenter.java 27 Jun 2006 09:27:38 -0000 1.18
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Cobricks Group. All rights reserved.
+ * Copyright (c) 2004-2006 Cobricks Group. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted under the terms of the Cobricks Software
@@ -15,10 +15,9 @@
import java.sql.Timestamp;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
-
import java.util.*;
-import org.apache.log4j.*;
+import org.apache.log4j.Logger;
import org.cobricks.core.ComponentDirectory;
import org.cobricks.core.ComponentEvent;
@@ -32,7 +31,6 @@
import org.cobricks.user.UserManager;
import org.cobricks.user.UserManagerImpl;
-
/**
* Presenter class for the Category Component
*
@@ -394,6 +392,11 @@
return "";
}
+ public final String printAttrInput(String categoryClass, String aname,
+ String lang)
+ {
+ return printAttrInput(categoryClass, aname, lang, null);
+ }
private List userList = null;
@@ -1049,6 +1052,7 @@
String attrKey = keys.next().toString();
if (!(classAttrs.contains(attrKey)
|| attrKey.startsWith("title_")
+ || attrKey.startsWith("description_")
|| attrKey.equals("updaterid")
|| attrKey.equals("creatorid"))) {
result.add(attrKey);
Index: Category.java
===================================================================
RCS file: /cvsroot/cobricks/cobricks2/src/org/cobricks/category/Category.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- Category.java 2 May 2006 11:55:41 -0000 1.14
+++ Category.java 27 Jun 2006 09:27:37 -0000 1.15
@@ -98,7 +98,7 @@
if (o!=null) return o.toString();
// try german
- o = getAttribute("title_de");
+ o = getAttribute("title_de");
if (o!=null) return o.toString();
// try french
@@ -217,6 +217,13 @@
return super.getAttribute(aname);
}
+ public Object getAttribute(String aname, String lang)
+ {
+ if (aname == null) return null;
+ return super.getAttribute(aname+"_"+lang);
+ }
+
+
/**
*
*/
|