2 Copyright (C) 2004 SKYRIX Software AG
4 This file is part of OpenGroupware.org.
6 OGo is free software; you can redistribute it and/or modify it under
7 the terms of the GNU Lesser General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 OGo is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with OGo; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
23 #include <SOGoUI/UIxComponent.h>
25 @interface UIxPageFrame : UIxComponent
29 NSString *userRootURL;
33 - (NSString *)rootURL;
34 - (NSString *)userRootURL;
35 - (NSString *)calendarRootURL;
40 #include <NGObjWeb/SoComponent.h>
42 @implementation UIxPageFrame
46 [self->title release];
47 [self->rootURL release];
48 [self->userRootURL release];
54 - (void)setTitle:(NSString *)_value {
55 ASSIGNCOPY(self->title, _value);
58 if ([self isUIxDebugEnabled])
61 return [self labelForKey:@"OpenGroupware.org"];
64 - (void)setItem:(id)_item {
65 ASSIGN(self->item, _item);
74 [self->item release]; self->item = nil;
80 - (NSString *)rootURL {
82 NSArray *traversalObjects;
84 if (self->rootURL != nil)
88 traversalObjects = [ctx objectTraversalStack];
89 self->rootURL = [[[traversalObjects objectAtIndex:0]
95 - (NSString *)userRootURL {
97 NSArray *traversalObjects;
99 if (self->userRootURL)
100 return self->userRootURL;
102 ctx = [self context];
103 traversalObjects = [ctx objectTraversalStack];
104 self->userRootURL = [[[[traversalObjects objectAtIndex:1]
105 baseURLInContext:ctx]
106 stringByAppendingString:@"/"]
108 return self->userRootURL;
111 - (NSString *)calendarRootURL {
112 return [[self userRootURL] stringByAppendingString:@"Calendar/"];
114 - (NSString *)contactsRootURL {
115 return [[self userRootURL] stringByAppendingString:@"Contacts/"];
118 @end /* UIxPageFrame */