[Yanel-commits] rev 47571 - in
public/yanel/contributions/ajax-components/src/access-policy-editor/java/org/wyona/security/gwt/accesspolicyeditor:
client public
michi at wyona.com
michi at wyona.com
Fri Feb 12 12:20:40 CET 2010
Author: michi
Date: 2010-02-12 12:20:40 +0100 (Fri, 12 Feb 2010)
New Revision: 47571
Modified:
public/yanel/contributions/ajax-components/src/access-policy-editor/java/org/wyona/security/gwt/accesspolicyeditor/client/AccessPolicyEditor.java
public/yanel/contributions/ajax-components/src/access-policy-editor/java/org/wyona/security/gwt/accesspolicyeditor/public/TestAccessPolicyEditor.html
Log:
i18n started to make configurable
Modified: public/yanel/contributions/ajax-components/src/access-policy-editor/java/org/wyona/security/gwt/accesspolicyeditor/client/AccessPolicyEditor.java
===================================================================
--- public/yanel/contributions/ajax-components/src/access-policy-editor/java/org/wyona/security/gwt/accesspolicyeditor/client/AccessPolicyEditor.java 2010-02-12 11:09:43 UTC (rev 47570)
+++ public/yanel/contributions/ajax-components/src/access-policy-editor/java/org/wyona/security/gwt/accesspolicyeditor/client/AccessPolicyEditor.java 2010-02-12 11:20:40 UTC (rev 47571)
@@ -63,25 +63,29 @@
int visibleItemCount = 20;
/**
- *
+ * Execute at the very beginning
*/
public void onModuleLoad() {
- String language = "en";
- //String language = "de";
+ String language = "en"; // DEFAULT
String identitiesURL = "DEFAULT-identities-and-usecases.xml";
String readPolicyURL = "DEFAULT-policy.xml";
boolean cancelURLBaseEqualsHostPageURL = false;
String cancelURL = "DEFAULT-cancel.html";
String savePolicyURL = "DEFAULT-save-policy.xml";
+ String i18nURL = "DEFAULT-i18n.xml";
// Get URLs from host/html page
try {
Dictionary dict = Dictionary.getDictionary("getURLs");
+ language = dict.get("language");
identitiesURL = dict.get("identities-url");
readPolicyURL = dict.get("policy-url");
cancelURL = dict.get("cancel-url");
cancelURLBaseEqualsHostPageURL = new Boolean(dict.get("cancel-url-base-equals-host-page-url")).booleanValue();
savePolicyURL = dict.get("save-url");
+
+ // TODO: Read this URL and use data instead from hardcoded I18n class
+ i18nURL = dict.get("i18n-url");
} catch (java.util.MissingResourceException e) {
Window.alert("Exception: " + e.getMessage());
}
Modified: public/yanel/contributions/ajax-components/src/access-policy-editor/java/org/wyona/security/gwt/accesspolicyeditor/public/TestAccessPolicyEditor.html
===================================================================
--- public/yanel/contributions/ajax-components/src/access-policy-editor/java/org/wyona/security/gwt/accesspolicyeditor/public/TestAccessPolicyEditor.html 2010-02-12 11:09:43 UTC (rev 47570)
+++ public/yanel/contributions/ajax-components/src/access-policy-editor/java/org/wyona/security/gwt/accesspolicyeditor/public/TestAccessPolicyEditor.html 2010-02-12 11:20:40 UTC (rev 47571)
@@ -9,7 +9,7 @@
<h1>Test Access Policy Editor</h1>
<p>
<script language="javascript">
- var getURLs = {"identities-url": "sample-identities-and-usecases.xml", "policy-url": "sample-policy.xml", "cancel-url": "http://www.yanel.org", "cancel-url-base-equals-host-page-url": "true", "save-url": "save-policy.xml"};
+ var getURLs = {"identities-url": "sample-identities-and-usecases.xml", "policy-url": "sample-policy.xml", "cancel-url": "http://www.yanel.org", "cancel-url-base-equals-host-page-url": "true", "save-url": "save-policy.xml", "language": "de", "i18n-url": "i18n.xml"};
//window.alert(getURLs);
</script>
More information about the Yanel-commits
mailing list