[Yanel-commits] rev 34842 - public/yanel/contributions/ajax-components/src/access-policy-editor/java/org/wyona/security/gwt/accesspolicyeditor/client

simon at wyona.com simon at wyona.com
Fri Apr 4 15:37:54 CEST 2008


Author: simon
Date: 2008-04-04 15:37:53 +0200 (Fri, 04 Apr 2008)
New Revision: 34842

Modified:
   public/yanel/contributions/ajax-components/src/access-policy-editor/java/org/wyona/security/gwt/accesspolicyeditor/client/AccessPolicyEditor.java
Log:
commented out debug alerts. 
fixes url problem when url contains &
added id to rootpanel to hook it to a certain element

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	2008-04-04 13:29:22 UTC (rev 34841)
+++ public/yanel/contributions/ajax-components/src/access-policy-editor/java/org/wyona/security/gwt/accesspolicyeditor/client/AccessPolicyEditor.java	2008-04-04 13:37:53 UTC (rev 34842)
@@ -75,7 +75,7 @@
 
         // Setup GUI
         VerticalPanel vp = new VerticalPanel();
-        RootPanel.get().add(vp);
+        RootPanel.get("access-policy-editor-hook").add(vp);
 
         VerticalPanel searchFilterVP = new VerticalPanel();
         vp.add(searchFilterVP);
@@ -105,7 +105,7 @@
         //buttonHP.add(new Button("Apply Policy"));
 
         // Save Button
-        final String savePolicyUrl = savePolicyURL;
+        final String savePolicyUrl = savePolicyURL.replaceAll("&", "&");
         //saveButton = new Button("Save Policy and Exit", new ClickListener() {
         saveButton = new Button("Save Policy", new ClickListener() {
             public void onClick(Widget sender) {
@@ -126,7 +126,7 @@
         final String cancelUrl = cancelURL;
         Button cancelButton = new Button("Cancel", new ClickListener() {
             public void onClick(Widget sender) {
-                Window.alert("Redirect to " + cancelUrl);
+                //Window.alert("Redirect to " + cancelUrl);
                 redirectTo(cancelUrl);
             }
             public native void redirectTo(String url) /*-{
@@ -155,6 +155,7 @@
      */
     private void getIdentitiesAndRights(String url) {
         //Window.alert("Load identities: " + url);
+        url = url.replaceAll("&", "&");
         final AsynchronousIdentitiesAndRightsGetter ag = new AsynchronousIdentitiesAndRightsGetter(url);
         try {
             final com.google.gwt.http.client.Request request = ag.execute();
@@ -171,7 +172,7 @@
                         // TODO: "Redraw" Policy Listbox
                         policyLBW.set(ag.getRights());
                         this.cancel();
-                        Window.alert("Identities have been loaded!");
+                        //Window.alert("Identities have been loaded!");
                     }
                 }
             };
@@ -189,6 +190,7 @@
      */
     private void getPolicy(String url) {
         //Window.alert("Load policy: " + url);
+        url = url.replaceAll("&", "&");
         final AsynchronousPolicyGetter apg = new AsynchronousPolicyGetter(url);
         try {
             final com.google.gwt.http.client.Request request = apg.execute();
@@ -209,7 +211,7 @@
                         policyLBW.setInheritRightsFlag(useInheritedPolicies);
 
                         this.cancel();
-                        Window.alert("Policy has been loaded!");
+                        //Window.alert("Policy has been loaded!");
                     }
                 }
             };



More information about the Yanel-commits mailing list