I discover a way to do that using javascript. Modify C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\Picker.aspx
,add some combobox to select group.
List all group with following code:
var siteUrl = '/';
var groupsCallback = function(a){
console.debug(a);
}
function retrieveAllUserGroups(callback) {
var clientContext = new SP.ClientContext(siteUrl);
groupsCallback = callback || groupsCallback;
this.collGroup = clientContext.get_web().get_siteGroups();
clientContext.load(collGroup);
clientContext.executeQueryAsync(Function.createDelegate(this, this.onGroupsQuerySucceeded), Function.createDelegate(this, this.onGroupsQueryFailed));
}
function onGroupsQuerySucceeded() {
var groupEnumerator = collGroup.getEnumerator();
var SPG = [];
while (groupEnumerator.moveNext()) {
var oGroup = groupEnumerator.get_current();
var gjson = {
'id': oGroup.get_id(),
'title': oGroup.get_title(),
'description': oGroup.get_description()
}
SPG.push(gjson);
}
if (groupsCallback){
groupsCallback(SPG);
}
}
function onGroupsQueryFailed(sender, args) {
alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
}
To list user from a group use this code:
function retrieveAllUsersInGroup(gid, callback) {
var clientContext = new SP.ClientContext(siteUrl);
usersCallback = callback || usersCallback;
var collGroup = clientContext.get_web().get_siteGroups();
var oGroup = collGroup.getById(gid);
this.collUser = oGroup.get_users();
clientContext.load(collUser);
clientContext.executeQueryAsync(Function.createDelegate(this, this.onUsersQuerySucceeded), Function.createDelegate(this, this.onUsersQueryFailed));
}
gid
is the group id taken from above code. Good luck