[Yanel-commits] rev 54600 -
public/yanel/contributions/ajax-components/src/access-policy-editor/java/org/wyona/security/gwt/accesspolicyeditor/client
michi at wyona.com
michi at wyona.com
Thu Nov 11 15:46:38 CET 2010
Author: michi
Date: 2010-11-11 15:46:37 +0100 (Thu, 11 Nov 2010)
New Revision: 54600
Modified:
public/yanel/contributions/ajax-components/src/access-policy-editor/java/org/wyona/security/gwt/accesspolicyeditor/client/PolicyListBoxWidget.java
Log:
insert before started
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 2010-11-11 13:26:00 UTC (rev 54599)
+++ public/yanel/contributions/ajax-components/src/access-policy-editor/java/org/wyona/security/gwt/accesspolicyeditor/client/PolicyListBoxWidget.java 2010-11-11 14:46:37 UTC (rev 54600)
@@ -435,10 +435,11 @@
}
}
- /*
+ /**
+ * Append either user or group to policy list
* @param type User or Group
* @param name Name of user or group
- * @param selected Sets wheter list item is selected. True to select the item.
+ * @param selected Sets whether list item is selected. True to select the item.
*/
public void addItem(String type, String name, boolean selected) {
StringBuffer emptyRights = new StringBuffer("(-");
@@ -450,4 +451,22 @@
lb.addItem(type + ": " + emptyRights + " " + name, type + ": " + name);
lb.setItemSelected(lb.getItemCount() - 1, selected);
}
+
+ /**
+ * Append either user or group to policy list
+ * @param type User or Group
+ * @param name Name of user or group
+ * @param selected Sets whether list item is selected. True to select the item.
+ */
+ public void insertItemBefore(String type, String name, boolean selected, String typeInsertBefore, String nameInsertBefore) {
+ Window.alert("DEBUG: Insert before ...");
+ StringBuffer emptyRights = new StringBuffer("(-");
+ for (int i = 1; i < availableRightsCB.length; i++) {
+ emptyRights.append(",-");
+ }
+ emptyRights.append(")");
+
+ lb.addItem(type + ": " + emptyRights + " " + name, type + ": " + name);
+ lb.setItemSelected(lb.getItemCount() - 1, selected);
+ }
}
More information about the Yanel-commits
mailing list