[Yanel-commits] rev 32529 -
public/yanel/contributions/ajax-components/src/access-policy-editor/java/org/wyona/yanel/gwt/accesspolicyeditor/client
michi at wyona.com
michi at wyona.com
Tue Feb 26 22:58:55 CET 2008
Author: michi
Date: 2008-02-26 22:58:54 +0100 (Tue, 26 Feb 2008)
New Revision: 32529
Modified:
public/yanel/contributions/ajax-components/src/access-policy-editor/java/org/wyona/yanel/gwt/accesspolicyeditor/client/AccessPolicyEditor.java
Log:
cancel and redirect to implemented
Modified: public/yanel/contributions/ajax-components/src/access-policy-editor/java/org/wyona/yanel/gwt/accesspolicyeditor/client/AccessPolicyEditor.java
===================================================================
--- public/yanel/contributions/ajax-components/src/access-policy-editor/java/org/wyona/yanel/gwt/accesspolicyeditor/client/AccessPolicyEditor.java 2008-02-26 21:33:39 UTC (rev 32528)
+++ public/yanel/contributions/ajax-components/src/access-policy-editor/java/org/wyona/yanel/gwt/accesspolicyeditor/client/AccessPolicyEditor.java 2008-02-26 21:58:54 UTC (rev 32529)
@@ -65,8 +65,6 @@
} catch (java.util.MissingResourceException e) {
Window.alert("Exception: " + e.getMessage());
}
- Window.alert("Cancel URL: " + cancelURL);
- Window.alert("Save policy URL: " + savePolicyURL);
// Get data from server
getPolicy(readPolicyURL);
@@ -88,8 +86,20 @@
vp.add(hp);
//vp.add(new Button("Apply Policy"));
vp.add(new Button("Save Policy and Exit"));
- vp.add(new Button("Cancel"));
+ // Cancel Button
+ final String cancelUrl = cancelURL;
+ Button cancelButton = new Button("Cancel", new ClickListener() {
+ public void onClick(Widget sender) {
+ Window.alert("Redirect to " + cancelUrl);
+ redirectTo(cancelUrl);
+ }
+ public native void redirectTo(String url) /*-{
+ $wnd.location.href=url;
+ }-*/;
+ });
+ vp.add(cancelButton);
+
identitiesLBW = new IdentitiesListBoxWidget(visibleItemCount, users, groups);
policyLBW = new PolicyListBoxWidget(visibleItemCount, policyIdentities);
More information about the Yanel-commits
mailing list