security.getGroups()

Find out how to get things done with Servoy. Post how YOU get things done with Servoy

security.getGroups()

Postby tweetie » Fri Feb 20, 2004 8:50 pm

Is there a way to get all the groupnames??
User avatar
tweetie
 
Posts: 345
Joined: Thu Jan 08, 2004 11:32 am
Location: Rotterdam, Netherlands

Postby IT2Be » Fri Feb 20, 2004 9:08 pm

yes :lol:
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Postby tweetie » Fri Feb 20, 2004 9:37 pm

You want to enlighten this poor guy??
I only see:

security.changeGroupName(Object groupid, String groupname)
security.createGroup(String groupname)
security.getGroups() --->>>only ID's
security.getUserGroups(number [userid])
User avatar
tweetie
 
Posts: 345
Joined: Thu Jan 08, 2004 11:32 am
Location: Rotterdam, Netherlands

Postby IT2Be » Fri Feb 20, 2004 9:52 pm

Sure, was just kiddin'

Here it is:

var Groups = security.getGroups();
var showArray = new Array(Groups.getMaxRowIndex());

for ( var i = 0 ; i < Groups.getMaxRowIndex() ; i++ )
showArray[i] = Groups.getValue(i + 1, 2);
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Postby tweetie » Mon Feb 23, 2004 2:47 pm

Thankx...i got it working....
There is one part I don't understand...
Groups.getValue(i + 1, 2);


GetValue from where? ....If I understand correctly (problably not) Groups only has ID's of the group...
User avatar
tweetie
 
Posts: 345
Joined: Thu Jan 08, 2004 11:32 am
Location: Rotterdam, Netherlands

Postby IT2Be » Mon Feb 23, 2004 2:52 pm

There is a second value and that is the name...
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany


Return to How To

Who is online

Users browsing this forum: No registered users and 11 guests