[OGo-Developer] accessing telephone numbers of team members in OGOGroupsPage
Sebastian Reitenbach
developer@opengroupware.org
Wed, 07 Mar 2007 08:02:03 +0100
Hi,
>
> members = [cmdctx runCommand:@"team::members",
> @"teams", self->groupList,
> @"returnType", intObj(LSDBReturnType_ManyObjects),
> nil];
> for (int i = 0; i < [members count]; i++) {
> NSLog(@"member: %@", [members objectAtIndex:i]);
>
> NSArray *tels = [[members objectAtIndex:i]
> valueForKey:@"telephones"];
> for (int j = 0; j < [tels count]; j++)
> NSLog(@" tel: %@", [tels objectAtIndex:j]);
> }
>
thanks a lot for the example, tested it and this works well for the telephones
and also for
the companyValue.
> Of course you need no code at all when you do this using
> WORepetition's as I initially suggested.
I haven't tried the WORepetition yet, but just another question to something I
have observed,
but I was unable to find an explanation for it yet:
when I add these lines to OGoGroupsPage.wox:
<var:string value="account.companyValue" /><html:br />
<var:string value="account.telephones" /><html:br />
the EOGenericRecords are printed in the WebUI, and they look generally the same,
besides the
contents ;).
when I add lines like these:
<var:string value="account.companyValue.email1" /><html:br />
<var:string value="account.telephones.01_tel" /><html:br />
then I see the following in the webui: ("","","","") (depending on companyValue
or
telephones)
when I add a line like this:
<var:string value="account.email1" /><html:br />
then the value of email1 shows up in the WebUI.
and finally, when I add a line like this:
<var:string value="account.01_tel" /><html:br />
an empty line is produced.
now the question: what are the differences between these two EOGenericRecords,
so that I can
make the extended attributes show up in the webui, but not the telephone
numbers?
kind regards
Sebastian