[Yanel-commits] rev 49887 -
public/yanel/contributions/resources/creatable-modifiable-deletable-v3/src/java/org/wyona/yanel/impl/resources/jellyadapterofcmdv3
michi at wyona.com
michi at wyona.com
Wed May 26 11:07:12 CEST 2010
Author: michi
Date: 2010-05-26 11:07:11 +0200 (Wed, 26 May 2010)
New Revision: 49887
Modified:
public/yanel/contributions/resources/creatable-modifiable-deletable-v3/src/java/org/wyona/yanel/impl/resources/jellyadapterofcmdv3/ControllerAdapter.java
Log:
get catalogues fixed
Modified: public/yanel/contributions/resources/creatable-modifiable-deletable-v3/src/java/org/wyona/yanel/impl/resources/jellyadapterofcmdv3/ControllerAdapter.java
===================================================================
--- public/yanel/contributions/resources/creatable-modifiable-deletable-v3/src/java/org/wyona/yanel/impl/resources/jellyadapterofcmdv3/ControllerAdapter.java 2010-05-26 09:01:01 UTC (rev 49886)
+++ public/yanel/contributions/resources/creatable-modifiable-deletable-v3/src/java/org/wyona/yanel/impl/resources/jellyadapterofcmdv3/ControllerAdapter.java 2010-05-26 09:07:11 UTC (rev 49887)
@@ -119,12 +119,19 @@
* @return i18n catalogue name
*/
protected String[] getI18NCatalogueNames() throws Exception {
- String[] catalogueNames = getResourceConfigProperties(I18N_CATALOG_PROPERTY);
- if (catalogueNames == null || catalogueNames.length == 0) {
- catalogueNames = new String[1];
- catalogueNames[0] = "global";
+ java.util.ArrayList<String> catalogues = new java.util.ArrayList<String>();
+ String[] rcCatalogues = getResourceConfigProperties("i18n-catalogue");
+ if (rcCatalogues != null) {
+ for (int i = 0; i < rcCatalogues.length; i++) {
+ catalogues.add(rcCatalogues[i]);
+ }
}
- return catalogueNames;
+ String realmCatalogue = getRealm().getI18nCatalogue();
+ if (realmCatalogue != null) {
+ catalogues.add(realmCatalogue);
+ }
+ catalogues.add("global");
+ return catalogues.toArray(new String[catalogues.size()]);
}
public long getSize() throws Exception {
More information about the Yanel-commits
mailing list