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

michi at wyona.com michi at wyona.com
Sun Mar 16 00:09:15 CET 2008


Author: michi
Date: 2008-03-16 00:09:15 +0100 (Sun, 16 Mar 2008)
New Revision: 33447

Modified:
   public/yanel/contributions/ajax-components/src/access-policy-editor/java/org/wyona/security/gwt/accesspolicyeditor/client/PolicyListBoxWidget.java
Log:
set name of right checkbox

Modified: public/yanel/contributions/ajax-components/src/access-policy-editor/java/org/wyona/security/gwt/accesspolicyeditor/client/PolicyListBoxWidget.java
===================================================================
--- public/yanel/contributions/ajax-components/src/access-policy-editor/java/org/wyona/security/gwt/accesspolicyeditor/client/PolicyListBoxWidget.java	2008-03-15 23:08:34 UTC (rev 33446)
+++ public/yanel/contributions/ajax-components/src/access-policy-editor/java/org/wyona/security/gwt/accesspolicyeditor/client/PolicyListBoxWidget.java	2008-03-15 23:09:15 UTC (rev 33447)
@@ -195,14 +195,14 @@
             }
         }
         if (selectedRightCB != null) {
-            Window.alert("Right checkbox has been selected, but implementation is not finished yet!");
+            //Window.alert("Right checkbox has been selected, but implementation is not finished yet!");
             String selectedIdentity = getSelectedItemText();
             if (selectedIdentity != null) {
                 if (selectedRightCB.isChecked()) {
-                    Window.alert("Add " + selectedRight.getLabel() + " right of selected identity " + selectedIdentity + " to policy");
+                    Window.alert("Add \"" + selectedRightCB.getName() + " (" + selectedRightCB.getText() + ")\" right of selected identity " + selectedIdentity + " to policy");
                     //newRights = addRight(currentRights, READ_RIGHT);
                 } else {
-                    Window.alert("Remove " + selectedRight.getLabel() + " right of selected identity " + selectedIdentity + " from policy");
+                    Window.alert("Remove \"" + selectedRightCB.getName() + " (" + selectedRightCB.getText() + ")\" right of selected identity " + selectedIdentity + " from policy");
                     //newRights = removeRight(currentRights, READ_RIGHT);
                 }
             } else {
@@ -498,7 +498,8 @@
             availableRightsCB = new CheckBox[availableRights.length];
             for (int i = 0; i < availableRightsCB.length; i++) {
                 // TODO: Also set label
-                availableRightsCB[i] = new CheckBox(availableRights[i].getId());
+                availableRightsCB[i] = new CheckBox(availableRights[i].getLabel());
+                availableRightsCB[i].setName(availableRights[i].getId());
                 availableRightsCB[i].addClickListener(this);
                 vp.add(availableRightsCB[i]);
             }



More information about the Yanel-commits mailing list